| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 85 | public function getByName(string $name): EmailTemplates |
||
| 86 | { |
||
| 87 | $emailTemplate = self::findFirst([ |
||
| 88 | 'conditions' => 'users_id = ?0 and company_id = ?1 and app_id = ?2 and name = ?3 and is_deleted = 0', |
||
| 89 | 'bind' => [$this->di->getUserData()->getId(), $this->di->getUserData()->defaulCompany->getId(), $this->di->getApp()->getId(), $name] |
||
| 90 | ]); |
||
| 91 | |||
| 92 | if (!$emailTemplate) { |
||
| 93 | throw new UnprocessableEntityHttpException((string) current($emailTemplate->getMessages())); |
||
| 94 | } |
||
| 95 | |||
| 96 | return $emailTemplate; |
||
|
1 ignored issue
–
show
|
|||
| 97 | } |
||
| 99 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.