Method I_can_get_calculated_filled_half_rows_for_given_wound_value
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function I_can_get_calculated_filled_half_rows_for_given_wound_value(): void
{
// limit of wounds divisible by two (odd)
$gridOfWounds = new GridOfWounds($this->createHealth([] /* no wounds*/));
self::assertSame(
Avoid using static access to class '\DrdPlus\Health\WoundSize' in method 'I_can_get_calculated_filled_half_rows_for_given_wound_value'. Open
$gridOfWounds->calculateFilledHalfRowsFor(WoundSize::createIt(492), $this->createWoundBoundary(124)),
- 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 '\DrdPlus\Health\WoundSize' in method 'I_can_get_calculated_filled_half_rows_for_given_wound_value'. Open
$gridOfWounds->calculateFilledHalfRowsFor(WoundSize::createIt(0), $this->createWoundBoundary(124)),
- 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 '\DrdPlus\Health\WoundSize' in method 'I_can_get_calculated_filled_half_rows_for_given_wound_value'. Open
$gridOfWounds->calculateFilledHalfRowsFor(WoundSize::createIt(11), $this->createWoundBoundary(22)),
- 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 '\DrdPlus\Health\WoundSize' in method 'I_can_get_calculated_filled_half_rows_for_given_wound_value'. Open
$gridOfWounds->calculateFilledHalfRowsFor(WoundSize::createIt(999), $this->createWoundBoundary(111)),
- 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 '\DrdPlus\Health\WoundSize' in method 'I_can_get_calculated_filled_half_rows_for_given_wound_value'. Open
$gridOfWounds->calculateFilledHalfRowsFor(WoundSize::createIt(5), $this->createWoundBoundary(333)),
- 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 '\DrdPlus\Health\WoundSize' in method 'I_can_get_calculated_filled_half_rows_for_given_wound_value'. Open
$gridOfWounds->calculateFilledHalfRowsFor(WoundSize::createIt(10), $this->createWoundBoundary(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
Avoid using static access to class '\DrdPlus\Health\WoundSize' in method 'I_can_get_calculated_filled_half_rows_for_given_wound_value'. Open
$gridOfWounds->calculateFilledHalfRowsFor(WoundSize::createIt(6), $this->createWoundBoundary(13)),
- 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 '\DrdPlus\Health\WoundSize' in method 'I_can_get_calculated_filled_half_rows_for_given_wound_value'. Open
$gridOfWounds->calculateFilledHalfRowsFor(WoundSize::createIt(10), $this->createWoundBoundary(5))
- 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 '\DrdPlus\Health\WoundSize' in method 'I_can_get_calculated_filled_half_rows_for_given_wound_value'. Open
$gridOfWounds->calculateFilledHalfRowsFor(WoundSize::createIt(13), $this->createWoundBoundary(13)),
- 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 '\DrdPlus\Health\WoundSize' in method 'I_can_get_calculated_filled_half_rows_for_given_wound_value'. Open
$gridOfWounds->calculateFilledHalfRowsFor(WoundSize::createIt(7), $this->createWoundBoundary(5)),
- 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 '\DrdPlus\Health\WoundSize' in method 'I_can_get_calculated_filled_half_rows_for_given_wound_value'. Open
$gridOfWounds->calculateFilledHalfRowsFor(WoundSize::createIt(8), $this->createWoundBoundary(5))
- 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 '\DrdPlus\Health\WoundSize' in method 'I_can_get_calculated_filled_half_rows_for_given_wound_value'. Open
$gridOfWounds->calculateFilledHalfRowsFor(WoundSize::createIt(7), $this->createWoundBoundary(13))
- 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 method I_can_get_calculated_filled_half_rows_for_given_wound_value is not named in camelCase. Open
public function I_can_get_calculated_filled_half_rows_for_given_wound_value(): void
{
// limit of wounds divisible by two (odd)
$gridOfWounds = new GridOfWounds($this->createHealth([] /* no wounds*/));
self::assertSame(
- 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_get_maximum_of_wounds_per_row is not named in camelCase. Open
public function I_can_get_maximum_of_wounds_per_row(): void
{
$gridOfWounds = new GridOfWounds($this->createHealth([] /* no wounds*/));
self::assertSame(123, $gridOfWounds->getWoundsPerRowMaximum($this->createWoundBoundary(123)));
}
- 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_get_number_of_filled_rows is not named in camelCase. Open
public function I_can_get_number_of_filled_rows(): void
{
$gridOfWounds = new GridOfWounds($this->createHealth($this->createWounds([3, 1])));
self::assertSame(
0,
- 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() {
}
}