Avoid unused private fields such as '$parser'. Open
private $parser;
- Read upRead up
- Exclude checks
UnusedPrivateField
Since: 0.2
Detects when a private field is declared and/or assigned a value, but not used.
Example
class Something
{
private static $FOO = 2; // Unused
private $i = 5; // Unused
private $j = 6;
public function addOne()
{
return $this->j++;
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatefield
Avoid using static access to class '\QuackCompiler\Lexer\Tag' in method 'getExpectedTokenName'. Open
? Tag::getName($this->expected)
- 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
Avoid using static access to class '\QuackCompiler\Lexer\Tag' in method 'getFoundTokenName'. Open
return Tag::getName($found_tag) ?: $found_tag;
- 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
The variable $token_val is not named in camelCase. Open
private function getFoundTokenSize()
{
if ($this->found instanceof Word) {
// Keyword found
return strlen($this->found->lexeme);
- 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();
}
}
Source
The variable $found_tag is not named in camelCase. Open
protected function getFoundTokenName()
{
$found_tag = $this->found->getTag();
return Tag::getName($found_tag) ?: $found_tag;
}
- 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();
}
}
Source
The variable $found_tag is not named in camelCase. Open
private function getFoundTokenSize()
{
if ($this->found instanceof Word) {
// Keyword found
return strlen($this->found->lexeme);
- 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();
}
}
Source
The variable $new_column is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $line_indicator is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $correct_piece is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $token_size is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $correct_piece is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $out_buffer is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $token_val is not named in camelCase. Open
private function getFoundTokenSize()
{
if ($this->found instanceof Word) {
// Keyword found
return strlen($this->found->lexeme);
- 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();
}
}
Source
The variable $new_column is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $line_indicator is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $out_buffer is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $out_buffer is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $token_val is not named in camelCase. Open
private function getFoundTokenSize()
{
if ($this->found instanceof Word) {
// Keyword found
return strlen($this->found->lexeme);
- 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();
}
}
Source
The variable $new_column is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $correct_piece is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $error_piece is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $error_line is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $error_piece is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $found_tag is not named in camelCase. Open
private function getFoundTokenSize()
{
if ($this->found instanceof Word) {
// Keyword found
return strlen($this->found->lexeme);
- 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();
}
}
Source
The variable $found_tag is not named in camelCase. Open
private function getFoundTokenSize()
{
if ($this->found instanceof Word) {
// Keyword found
return strlen($this->found->lexeme);
- 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();
}
}
Source
The variable $error_line is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $new_column is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $line_indicator is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $new_column is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $error_line is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $out_buffer is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $found_tag is not named in camelCase. Open
protected function getFoundTokenName()
{
$found_tag = $this->found->getTag();
return Tag::getName($found_tag) ?: $found_tag;
}
- 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();
}
}
Source
The variable $found_tag is not named in camelCase. Open
private function getFoundTokenSize()
{
if ($this->found instanceof Word) {
// Keyword found
return strlen($this->found->lexeme);
- 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();
}
}
Source
The variable $out_buffer is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $out_buffer is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $found_tag is not named in camelCase. Open
protected function getFoundTokenName()
{
$found_tag = $this->found->getTag();
return Tag::getName($found_tag) ?: $found_tag;
}
- 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();
}
}
Source
The variable $token_size is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $error_piece is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}
Source
The variable $out_buffer is not named in camelCase. Open
private function extractPieceOfSource()
{
$out_buffer = [];
$position = $this->getPosition();
$token_size = $this->getFoundTokenSize();
- 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();
}
}