app/Debug/DebugBar/TraceablePDOStatement.php
Avoid using static access to class '\App\Debuger' in method 'execute'. Open
Open
$this->boundParameters['backtrace'] = \App\Debuger::getBacktrace(4);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Reference to undeclared class \DebugBar\DataCollector\PDO\TraceablePDOStatement
(Did you mean class \App\Debug\DebugBar\TraceablePDOStatement) Open
Open
return parent::execute($input_parameters);
- Exclude checks
Reference to undeclared property \App\Debug\DebugBar\TraceablePDOStatement->boundParameters
Open
Open
$this->boundParameters['backtrace'] = \App\Debuger::getBacktrace(4);
- Exclude checks
Reference to undeclared property \App\Debug\DebugBar\TraceablePDOStatement->pdo
Open
Open
$this->boundParameters['driverName'] = $this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME);
- Exclude checks
Reference to undeclared property \App\Debug\DebugBar\TraceablePDOStatement->boundParameters
Open
Open
$this->boundParameters['driverName'] = $this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME);
- Exclude checks
Class extends undeclared class \DebugBar\DataCollector\PDO\TraceablePDOStatement
(Did you mean class \App\Debug\DebugBar\TraceablePDOStatement) Open
Open
class TraceablePDOStatement extends \DebugBar\DataCollector\PDO\TraceablePDOStatement
- Exclude checks
The parameter $input_parameters is not named in camelCase. Open
Open
public function execute($input_parameters = null)
{
$this->boundParameters['backtrace'] = \App\Debuger::getBacktrace(4);
$this->boundParameters['driverName'] = $this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME);
return parent::execute($input_parameters);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Spaces must be used to indent lines; tabs are not allowed Open
Open
return parent::execute($input_parameters);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* are bound parameters in the SQL statement being executed. All values are treated as
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->boundParameters['driverName'] = $this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME);
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
Open
* are bound parameters in the SQL statement being executed. All values are treated as
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function execute($input_parameters = null)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return bool TRUE on success or FALSE on failure.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Executes a prepared statement.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param array $input_parameters [optional] An array of values with as many elements as there
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @throws PDOException
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->boundParameters['backtrace'] = \App\Debuger::getBacktrace(4);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @see http://php.net/manual/en/pdostatement.execute.php
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* PDO::PARAM_STR.
- Exclude checks
The variable $input_parameters is not named in camelCase. Open
Open
public function execute($input_parameters = null)
{
$this->boundParameters['backtrace'] = \App\Debuger::getBacktrace(4);
$this->boundParameters['driverName'] = $this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME);
return parent::execute($input_parameters);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}