BaguettePHP/mastodon-api

View on GitHub
src/Service/Authorization.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '45', column '38').
Open

            $this->created_at = (new \DateTimeImmutable)->setTimeStamp($created_at);
Severity: Minor
Found in src/Service/Authorization.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Cannot modify read-only magic property \Baguette\Mastodon\Service\authorization->access_token defined at src/Service/Authorization.php:11
Open

        $this->access_token = $access_token;
Severity: Minor
Found in src/Service/Authorization.php by phan

Doc-block of $scope in __construct contains phpdoc param type string[] which is incompatible with the param type ?\Baguette\Mastodon\Service\Scope declared in the signature
Open

     * @param string[] $scope
Severity: Minor
Found in src/Service/Authorization.php by phan

Cannot modify read-only magic property \Baguette\Mastodon\Service\authorization->created_at defined at src/Service/Authorization.php:14
Open

            $this->created_at = (new \DateTimeImmutable)->setTimeStamp($created_at);
Severity: Minor
Found in src/Service/Authorization.php by phan

Cannot modify read-only magic property \Baguette\Mastodon\Service\authorization->token_type defined at src/Service/Authorization.php:12
Open

        $this->token_type = $token_type;
Severity: Minor
Found in src/Service/Authorization.php by phan

Class uses undeclared trait \Teto\Object\PrivateGetter
Open

class Authorization
Severity: Critical
Found in src/Service/Authorization.php by phan

Cannot modify read-only magic property \Baguette\Mastodon\Service\authorization->scope defined at src/Service/Authorization.php:13
Open

        $this->scope      = $scope;
Severity: Minor
Found in src/Service/Authorization.php by phan

There are no issues that match your filters.

Category
Status