Showing 134 of 134 total issues
Whitespace found at end of line Open
Open
*
- Exclude checks
Whitespace found at end of line Open
Open
*
- Exclude checks
Whitespace found at end of line Open
Open
*
- Exclude checks
Whitespace found at end of line Open
Open
*
- Exclude checks
Expected 1 newline at end of file; 0 found Open
Open
}
- 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
Call to undeclared method \Activerules\Nugget\GClient::setAuthConfig
Open
Open
$this->setAuthConfig($credentials);
- Exclude checks
Saw an @param annotation for credentials,
but it was not found in the param list of function __construct($url)
Open
Open
* @param array $credentials
- Exclude checks
Parameter $data
has undeclared type \Activerules\Nugget\type
Open
Open
public function valid($data)
- Exclude checks
Reference to undeclared property \Activerules\Nugget\Nugget->openAPI
Open
Open
$this->openAPI = new \Activerules\Nugget\OpenAPI();
- Exclude checks
Reference to undeclared class \Aws\S3\S3Client
Open
Open
parent::__construct($config);
- 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
Reference to constant SPREADSHEETS_READONLY
from undeclared class \Google_Service_Sheets
Open
Open
define('SCOPES', implode(' ', array(Google_Service_Sheets::SPREADSHEETS_READONLY)));
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'name',
but expected the index to be of type int
Open
Open
$propertyName = $property['name'];
- Exclude checks
Suspicious attempt to unset an offset of a value of type string
Open
Open
unset($property['name']);
- Exclude checks
Parameter $property
has undeclared type \type
Open
Open
function propertyExists($property)
- Exclude checks
Returning type bool
but propertyExists()
is declared to return \type
Open
Open
return file_exists(PROPERTYDIR + DIRECTORY_SEPARATOR + $property['name'] + '.json');
- Exclude checks
Argument 1 (schema)
is false|string
but \populateRef()
takes object
defined at /code/src/bin/schemaFromObject.php:68
Open
Open
populateRef($name, $defs);
- Exclude checks
Define a constant instead of duplicating this literal "string" 9 times. Open
Open
'string' => [
- 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.