Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
40 | public function getTaxCategoryByName($taxCategoryName) |
||
41 | { |
||
42 | $taxCategory = $this->taxCategoryRepository->findOneBy(['name' => $taxCategoryName]); |
||
43 | if (null === $taxCategory) { |
||
44 | throw new \InvalidArgumentException('Tax category with name "'.$taxCategoryName.'" does not exist'); |
||
45 | } |
||
46 | |||
47 | return $taxCategory; |
||
48 | } |
||
49 | } |
||
50 |