BaguettePHP/mastodon-api

View on GitHub
src/Grant/CodeGrant.php

Summary

Maintainability
A
35 mins
Test Coverage

Method getRedirectUrl has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public static function getRedirectUrl(Mastodon\Client $client, Mastodon\Service\AuthFactory $auth, Scope $scope, $callback_uri, $state = null)
Severity: Minor
Found in src/Grant/CodeGrant.php - About 35 mins to fix

    Parameter $http has undeclared type \GuzzleHttp\ClientInterface
    Open

        public function auth(Client $http, AuthFactory $factory, Scope $scope = null)
    Severity: Minor
    Found in src/Grant/CodeGrant.php by phan

    Call to method stringType from undeclared class \Respect\Validation\Validator
    Open

                v::stringType()->length(1, null)->assert($state);
    Severity: Critical
    Found in src/Grant/CodeGrant.php by phan

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

            return $http->request('POST', static::getPathToOAuthToken($factory->client), [
    Severity: Critical
    Found in src/Grant/CodeGrant.php by phan

    Doc-block of $scope in auth is phpdoc param type \Baguette\Mastodon\Service\Scope which is not a permitted replacement of the nullable param type ?\Baguette\Mastodon\Service\Scope declared in the signature ('?T' should be documented as 'T|null' or '?T')
    Open

         * @param  Scope       $scope
    Severity: Minor
    Found in src/Grant/CodeGrant.php by phan

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

        public function auth(Client $http, AuthFactory $factory, Scope $scope = null)
    Severity: Minor
    Found in src/Grant/CodeGrant.php by phan

    There are no issues that match your filters.

    Category
    Status