phpcheckstyle icon indicating copy to clipboard operation
phpcheckstyle copied to clipboard

PHPCheckstyle is an open-source tool that helps PHP programmers adhere to certain coding conventions.

Results 18 phpcheckstyle issues
Sort by recently updated
recently updated
newest added

Installed with ``` composer require phpcheckstyle/phpcheckstyle --dev ``` Installed version `V0.14.7` Running `vendor/bin/phpcheckstyle` or `vendor/bin/phpcheckstyle -h` Recieved: `Could not open input file: vendor/bin/run.php` Changed version to dev-master - using commit...

Don' t generated a warning if a variable is used somewhere else. ``` Class B extends A var $myVar = 'B'; ``` ==> unused variable $myVar.

This function should be replaced using a test on the statement stack level.

We should add support for [PSR-2 Coding Standards](http://www.php-fig.org/psr/psr-2/) and potentially use this as the default standards if none are supplied.

enhancement
help wanted

Hi! Docblock for closure is strange :) > The function anonymous returns a value and must include @returns in its docblock

First of all: big thanks for this awesome tool! Trying it out however, I have run into a small problem with using relative paths. Running the following line: ``` php...

Hi! I am using "new line" open curly brace position in my code. But in closure need position in same line. ```php $response->setCallback(function () use($path) { readfile($path); }); ```

Instead of having in _processAnnotation : ``` if ($token == T_CLASS) { $this->_classSuppressWarnings[] = $suppressedCheck; } elseif ($token == T_INTERFACE) { $this->_interfaceSuppressWarnings[] = $suppressedCheck; } elseif ($token == T_FUNCTION) {...

Some flag should be moved into the current statement context instead of being treated as a global value. $this->_inFuncCall $this->_inControlStatement $this->_inFunctionStatement $this->_inInterface $this->_justAfterFuncStmt .... We should know if we are...

This code: ``` php App::error(function(Exception $exception, $code) { Log::error($exception); if (Config::get('app.debug') === FALSE && $code 404) { switch ($code) { case 401: $errorTitle = 'Unauthorized'; break; case 403: $errorTitle =...

bug