netglue/prismic-php-kit

View on GitHub

Showing 316 of 316 total issues

Call to method getItem from undeclared class \Psr\Cache\CacheItemPoolInterface
Open

            return $this->cache->getItem($key);
Severity: Critical
Found in src/Prismic/Api.php by phan

Catching undeclared class \GuzzleHttp\Exception\GuzzleException
Open

        } catch (GuzzleException $exception) {
Severity: Critical
Found in src/Prismic/Api.php by phan

@throws annotation of query has suspicious interface type \Prismic\Exception\exceptioninterface for an @throws annotation, expected class (PHP allows interfaces to be caught, so this might be intentional)
Open

    public function query($q, array $options = []) : Response
Severity: Minor
Found in src/Prismic/Api.php by phan

@throws annotation of getByUid has suspicious interface type \Prismic\Exception\exceptioninterface for an @throws annotation, expected class (PHP allows interfaces to be caught, so this might be intentional)
Open

    public function getByUid(string $type, string $uid, array $options = []) :? DocumentInterface
Severity: Minor
Found in src/Prismic/Api.php by phan

Call to method __construct from undeclared class \Symfony\Component\Cache\Adapter\ArrayAdapter
Open

        return new ArrayAdapter();
Severity: Critical
Found in src/Prismic/Cache/DefaultCache.php by phan

Checking instanceof against undeclared class \GuzzleHttp\Exception\RequestException
Open

        if (! $this->guzzleException instanceof RequestException) {

@throws annotation of fetch has suspicious interface type \Prismic\Exception\exceptioninterface for an @throws annotation, expected class (PHP allows interfaces to be caught, so this might be intentional)
Open

    public function fetch(string ...$fields) : self
Severity: Minor
Found in src/Prismic/SearchForm.php by phan

Call to undeclared method \stdClass::getType
Open

                $this->document->getType()
Severity: Critical
Found in samples/document-explorer.php by phan

Call to method request from undeclared class \GuzzleHttp\ClientInterface
Open

            $response = $this->httpClient->request('GET', $token);
Severity: Critical
Found in src/Prismic/Api.php by phan

Catching undeclared class \GuzzleHttp\Exception\RequestException
Open

        } catch (RequestException $requestException) {
Severity: Critical
Found in src/Prismic/Api.php by phan

@throws annotation of getSingle has suspicious interface type \Prismic\Exception\exceptioninterface for an @throws annotation, expected class (PHP allows interfaces to be caught, so this might be intentional)
Open

    public function getSingle(string $type, array $options = []) :? DocumentInterface
Severity: Minor
Found in src/Prismic/Api.php by phan

Checking instanceof against undeclared class \GuzzleHttp\Exception\RequestException
Open

        if ($e instanceof RequestException) {

Argument 3 (previous) is \GuzzleHttp\Exception\RequestException but \Prismic\Exception\RequestFailureException::__construct() takes ?\RuntimeException|?\Throwable
Open

        $exception = new static($message, $code, $e);

Assigning \GuzzleHttp\Exception\RequestException to property but \Prismic\Exception\RequestFailureException->guzzleException is \GuzzleHttp\Exception\GuzzleException|null
Open

        $exception->guzzleException = $e;

Doc-block of $accessToken in get is phpdoc param type string which is not a permitted replacement of the nullable param type ?string declared in the signature ('?T' should be documented as 'T|null' or '?T')
Open

     * @param string $accessToken A permanent access token to use if your repository API is set to private
Severity: Minor
Found in src/Prismic/Api.php by phan

Return type of getEscapeHelper() is undeclared type \Zend\Escaper\Escaper
Open

    private function getEscapeHelper() : Escaper

Call to method getBody from undeclared class \Psr\Http\Message\ResponseInterface
Open

        $body = json_decode((string) $response->getBody(), true);

Return type of getApcCache() is undeclared type \Psr\Cache\CacheItemPoolInterface
Open

    public static function getApcCache() : CacheItemPoolInterface
Severity: Minor
Found in src/Prismic/Cache/DefaultCache.php by phan

Returning type \Symfony\Component\Cache\Adapter\ApcuAdapter but getApcCache() is declared to return \Psr\Cache\CacheItemPoolInterface
Open

        return new ApcuAdapter(\str_replace('\\', '', __NAMESPACE__));
Severity: Minor
Found in src/Prismic/Cache/DefaultCache.php by phan

Reference to undeclared property \Prismic\Document\Fragment\LinkInterface->width
Open

        $link->width  = isset($value->width) ? (int) $value->width : null;
Severity
Category
Status
Source
Language