| Conditions | 1 |
| Paths | 1 |
| Total Lines | 61 |
| Code Lines | 45 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php declare(strict_types=1); |
||
| 21 | public function initializeTaxFixtures(): void |
||
| 22 | { |
||
| 23 | $this->taxFixtures = [ |
||
| 24 | 'NineteenPercentTax' => [ |
||
| 25 | 'id' => Uuid::randomHex(), |
||
| 26 | 'name' => 'NineteenPercentTax', |
||
| 27 | 'taxRate' => 19, |
||
| 28 | ], |
||
| 29 | 'NineteenPercentTaxWithAreaRule' => [ |
||
| 30 | 'id' => Uuid::randomHex(), |
||
| 31 | 'name' => 'foo tax', |
||
| 32 | 'taxRate' => 20, |
||
| 33 | 'areaRules' => [ |
||
| 34 | [ |
||
| 35 | 'id' => Uuid::randomHex(), |
||
| 36 | 'taxRate' => 99, |
||
| 37 | 'active' => true, |
||
| 38 | 'name' => 'required', |
||
| 39 | 'customerGroupId' => TestDefaults::FALLBACK_CUSTOMER_GROUP, |
||
| 40 | ], |
||
| 41 | ], |
||
| 42 | ], |
||
| 43 | 'SeventeenPointOnePercentTax' => [ |
||
| 44 | 'id' => Uuid::randomHex(), |
||
| 45 | 'name' => 'SeventeenPointOnePercentTax', |
||
| 46 | 'taxRate' => 17.1, |
||
| 47 | 'areaRules' => [ |
||
| 48 | [ |
||
| 49 | 'id' => Uuid::randomHex(), |
||
| 50 | 'taxRate' => 17.1, |
||
| 51 | 'active' => true, |
||
| 52 | 'name' => 'required', |
||
| 53 | 'customerGroupId' => TestDefaults::FALLBACK_CUSTOMER_GROUP, |
||
| 54 | ], |
||
| 55 | ], |
||
| 56 | ], |
||
| 57 | 'NinePointSevenFourPercentTax' => [ |
||
| 58 | 'id' => Uuid::randomHex(), |
||
| 59 | 'name' => 'NinePointSevenFourPercentTax', |
||
| 60 | 'taxRate' => 9.74, |
||
| 61 | 'areaRules' => [ |
||
| 62 | [ |
||
| 63 | 'id' => Uuid::randomHex(), |
||
| 64 | 'taxRate' => 9.74, |
||
| 65 | 'active' => true, |
||
| 66 | 'name' => 'required', |
||
| 67 | 'customerGroupId' => TestDefaults::FALLBACK_CUSTOMER_GROUP, |
||
| 68 | ], |
||
| 69 | ], |
||
| 70 | ], |
||
| 71 | 'ThirteenPointFourEightSixPercentTax' => [ |
||
| 72 | 'id' => Uuid::randomHex(), |
||
| 73 | 'name' => 'ThirteenPointFourEightSixPercentTax', |
||
| 74 | 'taxRate' => 13.486, |
||
| 75 | 'areaRules' => [ |
||
| 76 | [ |
||
| 77 | 'id' => Uuid::randomHex(), |
||
| 78 | 'taxRate' => 13.486, |
||
| 79 | 'active' => true, |
||
| 80 | 'name' => 'required', |
||
| 81 | 'customerGroupId' => TestDefaults::FALLBACK_CUSTOMER_GROUP, |
||
| 82 | ], |
||
| 125 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths