public function allPathsToTarget(Certificate $target,
        CertificateBundle $intermediate = null): array
    {
        $paths = $this->_resolvePathsToTarget($target, $intermediate);
        // map paths to CertificationPath objects
        return array_map(
            function ($certs) {
                return new CertificationPath(...$certs);
            }, $paths);
    }
public function allPathsToTarget(Certificate $target,
        CertificateBundle $intermediate = null): array
    {
        $paths = $this->_resolvePathsToTarget($target, $intermediate);
        // map paths to CertificationPath objects
        return array_map(
            function ($certs) {
                return new CertificationPath(...$certs);
            }, $paths);
    }
public function allPathsToTarget ( Certificate $ target , CertificateBundle $ intermediate = null ) : array { $ paths = $ this -> _resolvePathsToTarget ( $ target , $ intermediate ) ; // map paths to CertificationPath objects return array_map ( function ( $ certs ) { return new CertificationPath ( ... $ certs ) ; } , $ paths ) ; }
Get all certification paths to given target certificate from
any trust anchor.

@param Certificate $target Target certificate
@param CertificateBundle|null $intermediate Optional intermediate
certificates
@return CertificationPath[]
Get all certification paths to given target certificate from any trust anchor .