Showing 134 of 134 total issues
Possibly zero references to use statement for classlike/namespace NuggetException
(\Activerules\Nugget\Exception\NuggetException)
Open
Open
use Activerules\Nugget\Exception\NuggetException;
- Exclude checks
Reference to undeclared property \Activerules\Nugget\Nugget->openAPI
Open
Open
$this->openAPI = new \Activerules\Nugget\OpenAPI();
- 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
Parameter $schema
has undeclared type \Activerules\Nugget\type
Open
Open
public function limitToSchema(string $object, $schema)
- Exclude checks
Reference to undeclared property \Activerules\Nugget\Nugget->schemaBuilder
Open
Open
$nugget->schemaBuilder->mergeProps($parentDef, $schemaDef);
- Exclude checks
Argument 2 (ref)
is array
but \populateRef()
takes string
defined at /code/src/bin/schemaFromObject.php:68
Open
Open
populateRef($name, $defs);
- Exclude checks
Define a constant instead of duplicating this literal ".json" 4 times. Open
Open
$objFile = realpath($schemaDir . '/' . $refSchemaName . '.json');
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Variable $types
is undeclared (Did you mean $this->types or $type) Open
Open
$this->types = $types;
- Exclude checks
Call to method setScopes
from undeclared class \Google_Client
Open
Open
$client->setScopes(SCOPES);
- Exclude checks
Call to method __construct
from undeclared class \Google_Service_Sheets
Open
Open
$service = new Google_Service_Sheets($client);
- Exclude checks
Method \processProperty
is declared to return string
but has no return value Open
Open
function processProperty($property)
- Exclude checks
Call to undeclared method \Activerules\Nugget\Nugget::jsonType
Open
Open
$jsonType = $nugget->jsonType($type);
- Exclude checks
Possibly zero references to use statement for classlike/namespace GClient
(\Activerules\Nugget\GClient)
Open
Open
use Activerules\Nugget\GClient;
- Exclude checks
Reference to undeclared property \Activerules\Nugget\Nugget->schemaBuilder
Open
Open
$this->schemaBuilder = new \Activerules\Nugget\SchemaBuilder();
- Exclude checks
Possibly zero references to use statement for classlike/namespace S3Client
(\Aws\S3\S3Client)
Open
Open
use Aws\S3\S3Client;
- Exclude checks
Argument 1 (arr1)
is string
but \array_merge()
takes array
Open
Open
$property = array_merge($property, $typeData);
- Exclude checks
Define a constant instead of duplicating this literal "format" 8 times. Open
Open
'format' => 'int32',
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Parameter $data
has undeclared type \Activerules\Nugget\type
Open
Open
public function valid($data)
- Exclude checks
Reference to undeclared class \Aws\S3\S3Client
Open
Open
parent::__construct($config);
- Exclude checks
Reference to instance property properties
from undeclared class \Activerules\Nugget\type
Open
Open
foreach (array_keys((array) $schema->properties) as $prop) {
- Exclude checks