netglue/prismic-php-kit

View on GitHub

Showing 316 of 316 total issues

@throws annotation of pageSize 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 pageSize(int $pageSize) : self
Severity: Minor
Found in src/Prismic/SearchForm.php by phan

@throws annotation of orderings 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 orderings(string ...$fields) : self
Severity: Minor
Found in src/Prismic/SearchForm.php by phan

Argument 3 (vars) is ?string but \sprintf() takes float|int|string
Open

        return sprintf('/app/%s/%s', $link->getType(), $link->getUid());
Severity: Minor
Found in samples/LinkResolverExample.php by phan

Parameter $httpClient has undeclared type ?\GuzzleHttp\ClientInterface
Open

    public static function get(
Severity: Minor
Found in src/Prismic/Api.php by phan

@throws annotation of getById 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 getById(string $id, array $options = []) :? DocumentInterface
Severity: Minor
Found in src/Prismic/Api.php by phan

@throws annotation of getByIds 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 getByIds(array $ids, array $options = []) : Response
Severity: Minor
Found in src/Prismic/Api.php by phan

Instantiation of abstract class \Prismic\Document\Fragment\AbstractScalarFragment
Open

        $fragment = new static();

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

        $link->height = isset($value->height) ? (int) $value->height : null;

Argument 2 (vars) is ?string but \sprintf() takes float|int|string
Open

            $this->openTag(),

Parameter $response has undeclared type \Psr\Http\Message\ResponseInterface
Open

    public static function isTokenExpiryResponse(ResponseInterface $response) : bool

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

        $exception = new static('Api Request Failed', 500, $e);

@throws annotation of lang 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 lang(string $lang) : self
Severity: Minor
Found in src/Prismic/SearchForm.php by phan

@throws annotation of previewSession 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 previewSession(string $token, string $defaultUrl) : string
Severity: Minor
Found in src/Prismic/Api.php by phan

Reference to undeclared property \Prismic\Document\Fragment\AbstractScalarFragment->format
Open

            $fragment->format = 'Y-m-d';
Severity: Minor
Found in src/Prismic/Document/Fragment/Date.php by phan

Parameter $e has undeclared type \GuzzleHttp\Exception\RequestException
Open

    protected static function fromGuzzleRequestException(RequestException $e) : self

Return type of getResponse() is undeclared type ?\Psr\Http\Message\ResponseInterface
Open

    public function getResponse() :? ResponseInterface

Possibly zero references to use statement for classlike/namespace SearchForm (\Prismic\SearchForm)
Open

    use Prismic\SearchForm;
Severity: Minor
Found in samples/document-explorer.php by phan

Assigning ?\Prismic\DocumentInterface|\Prismic\DocumentInterface to property but \Prismic\Sample\Finder->document is \stdClass
Open

                $this->document = $document;
Severity: Minor
Found in samples/document-explorer.php by phan

Call to undeclared method \stdClass::getId
Open

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

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

     * @param ClientInterface $httpClient Custom Guzzle http client
Severity: Minor
Found in src/Prismic/Api.php by phan
Severity
Category
Status
Source
Language