| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 12 | 
| Code Lines | 7 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 39 | public function getShippingCategoryByName($shippingCategoryName) | ||
| 40 |     { | ||
| 41 | $shippingCategories = $this->shippingCategoryRepository->findBy(['name' => $shippingCategoryName]); | ||
| 42 | |||
| 43 | Assert::eq( | ||
| 44 | 1, | ||
| 45 | count($shippingCategories), | ||
| 46 |             sprintf('%d shipping category has been found with name "%s".', count($shippingCategories), $shippingCategoryName) | ||
| 47 | ); | ||
| 48 | |||
| 49 | return $shippingCategories[0]; | ||
| 50 | } | ||
| 51 | } | ||
| 52 | 
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.