tests/Codes/Partials/TranslatableCodeTest.php
Missing class import via use statement (line '19', column '18'). Open
Open
if ((new \ReflectionClass(self::getSutClass()))->isAbstract()) {
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '33', column '18'). Open
Open
if ((new \ReflectionClass(self::getSutClass()))->isAbstract()) {
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '47', column '18'). Open
Open
if ((new \ReflectionClass(self::getSutClass()))->isAbstract()) {
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '20', column '23'). Open
Open
throw new \DrdPlus\Codes\Partials\Exceptions\UnknownValueForCode(
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid unused parameters such as '$translatableCode'. Open
Open
TranslatableCode $translatableCode): string
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
The method I_can_get_translation_for_few_with_decimal is not named in camelCase. Open
Open
public function I_can_get_translation_for_few_with_decimal()
{
if ((new \ReflectionClass(self::getSutClass()))->isAbstract()) {
self::assertFalse(false, 'Can not create enum from abstract class');
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method I_can_not_create_code_from_unknown_value is not named in camelCase. Open
Open
public function I_can_not_create_code_from_unknown_value()
{
$this->expectException(\DrdPlus\Codes\Partials\Exceptions\UnknownValueForCode::class);
$this->expectExceptionMessageMatches('~da Vinci~');
if ((new \ReflectionClass(self::getSutClass()))->isAbstract()) {
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method I_can_use_code_object_as_its_string_value is not named in camelCase. Open
Open
public function I_can_use_code_object_as_its_string_value()
{
if ((new \ReflectionClass(self::getSutClass()))->isAbstract()) {
self::assertFalse(false, 'Can not create enum from abstract class');
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}