bwinkers/nugget

View on GitHub
src/JSON.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '17', column '30').
Open

        $this->filesys = new \Activerules\Nugget\Filesys();
Severity: Minor
Found in src/JSON.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

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

    public function valid($data) 
Severity: Minor
Found in src/JSON.php by phan

Possibly zero references to use statement for classlike/namespace Filesys (\Activerules\Filesys)
Open

use Activerules\Filesys;
Severity: Minor
Found in src/JSON.php by phan

Argument 1 (data) is false|string but \Activerules\Nugget\JSON::valid() takes \Activerules\Nugget\type defined at /code/src/JSON.php:57
Open

        $json = $this->valid($json);
Severity: Minor
Found in src/JSON.php by phan

Argument 1 (json) is \Activerules\Nugget\type but \json_decode() takes string
Open

        $data = json_decode($data);
Severity: Minor
Found in src/JSON.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/JSON.php by phan

Whitespace found at end of line
Open

     * @return mixed False or object 
Severity: Minor
Found in src/JSON.php by phpcodesniffer

Line indented incorrectly; expected at least 12 spaces, found 11
Open

           return $data;
Severity: Minor
Found in src/JSON.php by phpcodesniffer

Whitespace found at end of line
Open

     * 
Severity: Minor
Found in src/JSON.php by phpcodesniffer

Whitespace found at end of line
Open

    public function valid($data) 
Severity: Minor
Found in src/JSON.php by phpcodesniffer

There are no issues that match your filters.

Category
Status