bwinkers/nugget

View on GitHub
src/Schema.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '25', column '26').
Open

        $validator = new \Activerules\JsonGuard\Validator($data, $schema);
Severity: Minor
Found in src/Schema.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 Validator (\Activerules\JsonGuard\Validator)
Open

use Activerules\JsonGuard\Validator;
Severity: Minor
Found in src/Schema.php by phan

Parameter $schema has undeclared type \Activerules\Nugget\type
Open

    public function meetsSchema(string $object, $schema)
Severity: Minor
Found in src/Schema.php by phan

Possibly zero references to use statement for classlike/namespace NuggetException (\Activerules\Nugget\Exception\NuggetException)
Open

use Activerules\Nugget\Exception\NuggetException;
Severity: Minor
Found in src/Schema.php by phan

Call to method __construct from undeclared class \Activerules\JsonGuard\Validator
Open

        $validator = new \Activerules\JsonGuard\Validator($data, $schema);
Severity: Critical
Found in src/Schema.php by phan

Call to method fails from undeclared class \Activerules\JsonGuard\Validator
Open

        return $validator->fails() ? false : true;
Severity: Critical
Found in src/Schema.php by phan

Parameter $schema has undeclared type \Activerules\Nugget\type
Open

    public function limitToSchema(string $object, $schema)
Severity: Minor
Found in src/Schema.php by phan

Reference to instance property properties from undeclared class \Activerules\Nugget\type
Open

        foreach (array_keys((array) $schema->properties) as $prop) {
Severity: Minor
Found in src/Schema.php by phan

There are no issues that match your filters.

Category
Status