| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 33 | public function create(Ministry $user) |
||
| 34 | { |
||
| 35 | if ($user->account->level !== 'Free') { |
||
| 36 | return true; |
||
| 37 | } else { |
||
| 38 | $messagesCount = Message::where('ministry_id', $user->id)->whereBetween('created_at', [Carbon::now()->firstOfMonth(), Carbon::now()->lastOfMonth()])->count(); |
||
| 39 | if ($messagesCount >= Helper::$freeMessagesCount) { |
||
| 40 | return false; |
||
| 41 | } else { |
||
| 42 | return true; |
||
| 43 | } |
||
| 71 |