src/JSON.php
Missing class import via use statement (line '17', column '30'). Open
Open
$this->filesys = new \Activerules\Nugget\Filesys();
- Read upRead up
- Exclude checks
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
Open
public function valid($data)
- Exclude checks
Possibly zero references to use statement for classlike/namespace Filesys
(\Activerules\Filesys)
Open
Open
use Activerules\Filesys;
- Exclude checks
Argument 1 (data)
is false|string
but \Activerules\Nugget\JSON::valid()
takes \Activerules\Nugget\type
defined at /code/src/JSON.php:57
Open
Open
$json = $this->valid($json);
- Exclude checks
Argument 1 (json)
is \Activerules\Nugget\type
but \json_decode()
takes string
Open
Open
$data = json_decode($data);
- Exclude checks
Possibly zero references to use statement for classlike/namespace NuggetException
(\Activerules\Nugget\Exception\NuggetException)
Open
Open
use Activerules\Nugget\Exception\NuggetException;
- Exclude checks
Whitespace found at end of line Open
Open
* @return mixed False or object
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 11 Open
Open
return $data;
- Exclude checks
Whitespace found at end of line Open
Open
*
- Exclude checks
Whitespace found at end of line Open
Open
public function valid($data)
- Exclude checks