| Conditions | 1 |
| Paths | 1 |
| Total Lines | 94 |
| Code Lines | 59 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
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 |
||
| 42 | public function getDictionary(): array |
||
| 43 | { |
||
| 44 | return [ |
||
| 45 | 'values.*' => 'MeasureUnitToInt', |
||
| 46 | 'values' => [ |
||
| 47 | [ |
||
| 48 | 'EnrichAttributes', |
||
| 49 | 'options' => [ |
||
| 50 | 'map' => $this->getAttributeMap(), |
||
| 51 | 'excludeKeys' => [ |
||
| 52 | 'country_availability', |
||
| 53 | ], |
||
| 54 | ], |
||
| 55 | ], |
||
| 56 | [ |
||
| 57 | 'ValuesToAttributes', |
||
| 58 | 'options' => [ |
||
| 59 | 'locales' => $this->config->getLocalesForImport(), |
||
| 60 | ], |
||
| 61 | ], |
||
| 62 | [ |
||
| 63 | 'ValuesToLocalizedAttributes', |
||
| 64 | 'options' => [ |
||
| 65 | 'locales' => $this->config->getLocalesForImport(), |
||
| 66 | ], |
||
| 67 | ], |
||
| 68 | ], |
||
| 69 | 'values.price' => [ |
||
| 70 | [ |
||
| 71 | 'PriceSelector', |
||
| 72 | 'options' => [ |
||
| 73 | PriceSelector::OPTION_LOCALE_TO_PRICE_MAP => $this->config->getLocaleToPriceMap(), |
||
| 74 | ], |
||
| 75 | ], |
||
| 76 | ], |
||
| 77 | 'values.localizedAttributes' => [ |
||
| 78 | [ |
||
| 79 | 'LocaleKeysToIds', |
||
| 80 | 'options' => [ |
||
| 81 | 'map' => $this->getLocaleMap(), |
||
| 82 | ], |
||
| 83 | ], |
||
| 84 | [ |
||
| 85 | 'MoveLocalizedAttributesToAttributes', |
||
| 86 | 'options' => [ |
||
| 87 | 'blacklist' => [ |
||
| 88 | 'name', |
||
| 89 | 'title', |
||
| 90 | 'product_description', |
||
| 91 | 'tax_set', |
||
| 92 | 'is_active_per_locale', |
||
| 93 | 'price', |
||
| 94 | 'bild_information', |
||
| 95 | 'picto_informationen', |
||
| 96 | 'meta_title', |
||
| 97 | 'meta_description', |
||
| 98 | 'meta_keywords', |
||
| 99 | ], |
||
| 100 | ], |
||
| 101 | ], |
||
| 102 | ], |
||
| 103 | 'values.localizedAttributes.*' => [ |
||
| 104 | [ |
||
| 105 | 'ExcludeKeysAssociativeFilter', |
||
| 106 | 'options' => [ |
||
| 107 | 'excludeKeys' => [ |
||
| 108 | 'price', |
||
| 109 | 'bild_information', |
||
| 110 | 'picto_information', |
||
| 111 | 'tax_set', |
||
| 112 | ], |
||
| 113 | ], |
||
| 114 | ], |
||
| 115 | [ |
||
| 116 | 'AddMissingAttributes', |
||
| 117 | 'options' => [ |
||
| 118 | 'attributes' => [ |
||
| 119 | 'name' => '', |
||
| 120 | 'description' => '', |
||
| 121 | 'meta_title' => '', |
||
| 122 | 'meta_description' => '', |
||
| 123 | 'meta_keywords' => '', |
||
| 124 | 'is_searchable' => true, |
||
| 125 | ], |
||
| 126 | ], |
||
| 127 | ], |
||
| 128 | ], |
||
| 129 | 'values.attributes' => [ |
||
| 130 | [ |
||
| 131 | 'ExcludeKeysAssociativeFilter', |
||
| 132 | 'options' => [ |
||
| 133 | 'excludeKeys' => [ |
||
| 134 | 'price', |
||
| 135 | 'country_availability', |
||
| 136 | ], |
||
| 169 |
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