| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | protected function failedAuthorization() |
||
| 35 | { |
||
| 36 | if (strcmp(auth()->user()->account->level, 'Free') === 0) { |
||
| 37 | $message = 'You need to upgrade to able to create more than one album this month'; |
||
| 38 | } else { |
||
| 39 | $message = 'You need to upgrade further to be able to create more than 5 albums this month'; |
||
| 40 | } |
||
| 41 | throw new AuthorizationException($message, 403); |
||
| 42 | } |
||
| 44 |