src/CoreBundle/Entity/HookCall.php
Add a single space around assignment operators Open
Open
declare(strict_types=1);
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Id]
- Exclude checks
You must use "/**" style comments for a class comment Open
Open
class HookCall
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'type', type: 'boolean', nullable: false)]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Table(name: 'hook_call')]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'hook_observer_id', type: 'integer', nullable: false)]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'enabled', type: 'boolean', nullable: false)]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\GeneratedValue(strategy: 'IDENTITY')]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'hook_order', type: 'integer', nullable: false)]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Entity]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'id', type: 'integer')]
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[ORM\Column(name: 'hook_event_id', type: 'integer', nullable: false)]
- Exclude checks
The 'getEnabled()' method which returns a boolean should be named 'is...()' or 'has...()' Open
Open
public function getEnabled()
{
return $this->enabled;
}
- Read upRead up
- Exclude checks
BooleanGetMethodName
Since: 0.2
Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.
Example
class Foo {
/**
* @return boolean
*/
public function getFoo() {} // bad
/**
* @return bool
*/
public function isFoo(); // ok
/**
* @return boolean
*/
public function getFoo($bar); // ok, unless checkParameterizedMethods=true
}
Source https://phpmd.org/rules/naming.html#booleangetmethodname
The 'getType()' method which returns a boolean should be named 'is...()' or 'has...()' Open
Open
public function getType()
{
return $this->type;
}
- Read upRead up
- Exclude checks
BooleanGetMethodName
Since: 0.2
Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.
Example
class Foo {
/**
* @return boolean
*/
public function getFoo() {} // bad
/**
* @return bool
*/
public function isFoo(); // ok
/**
* @return boolean
*/
public function getFoo($bar); // ok, unless checkParameterizedMethods=true
}