1 | <?php |
||
15 | class Route |
||
16 | { |
||
17 | use HandlesParameters; |
||
18 | use HandlesRegularExpressions; |
||
19 | use RouteDependencyResolverTrait; |
||
20 | |||
21 | const FROM = 'from'; |
||
22 | const TO = 'to'; |
||
23 | const CC = 'cc'; |
||
24 | const BCC = 'bcc'; |
||
25 | const SUBJECT = 'subject'; |
||
26 | const FALLBACK = 'fallback'; |
||
27 | const CATCH_ALL = 'catch-all'; |
||
28 | |||
29 | protected $mailbox; |
||
30 | |||
31 | protected $subject; |
||
32 | |||
33 | protected $pattern; |
||
34 | |||
35 | protected $action; |
||
36 | |||
37 | protected $container; |
||
38 | |||
39 | protected $matches = []; |
||
40 | |||
41 | protected $wheres = []; |
||
42 | |||
43 | public function __construct(string $subject, string $pattern, $action) |
||
49 | |||
50 | public function setContainer(Container $container) |
||
56 | |||
57 | public function subject() |
||
61 | |||
62 | public function action() |
||
66 | |||
67 | public function pattern() |
||
71 | |||
72 | public function matches(InboundEmail $message): bool |
||
80 | |||
81 | protected function gatherMatchSubjectsFromMessage(InboundEmail $message) |
||
101 | |||
102 | /** |
||
103 | * @param $addresses AddressPart[] |
||
104 | * @return array |
||
105 | */ |
||
106 | protected function convertMessageAddresses($addresses): array |
||
113 | |||
114 | public function run(InboundEmail $email) |
||
124 | |||
125 | protected function isMailboxAction() |
||
129 | |||
130 | protected function runMailbox(InboundEmail $email) |
||
140 | |||
141 | protected function runCallable(InboundEmail $email) |
||
149 | |||
150 | public function getMailbox() |
||
160 | |||
161 | /** |
||
162 | * Get the controller method used for the route. |
||
163 | * |
||
164 | * @return string |
||
165 | */ |
||
166 | protected function getMailboxMethod() |
||
170 | |||
171 | /** |
||
172 | * Parse the controller. |
||
173 | * |
||
174 | * @return array |
||
175 | */ |
||
176 | protected function parseMailboxCallback() |
||
180 | } |
||
181 |
The break statement is not necessary if it is preceded for example by a return statement:
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.