BaguettePHP/mastodon-api

View on GitHub
src/EntityCaster.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '41', column '20').
Open

        $ref = new \ReflectionClass($c);
Severity: Minor
Found in src/EntityCaster.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

Possibly zero references to use statement for classlike/namespace ClassStub (\Symfony\Component\VarDumper\Caster\ClassStub)
Open

use Symfony\Component\VarDumper\Caster\ClassStub;
Severity: Minor
Found in src/EntityCaster.php by phan

Reference to constant PREFIX_PROTECTED from undeclared class \Symfony\Component\VarDumper\Caster\Caster
Open

            $a[Caster::PREFIX_PROTECTED.'property_types'] = $types;
Severity: Critical
Found in src/EntityCaster.php by phan

Parameter $stub has undeclared type \Symfony\Component\VarDumper\Cloner\Stub
Open

    public function __invoke(Entity $c, array $_, Stub $stub, $isNested)
Severity: Minor
Found in src/EntityCaster.php by phan

Reference to constant PREFIX_DYNAMIC from undeclared class \Symfony\Component\VarDumper\Caster\Caster
Open

            $a[Caster::PREFIX_DYNAMIC.$key] = $prop;
Severity: Critical
Found in src/EntityCaster.php by phan

There are no issues that match your filters.

Category
Status