1 | <?php |
||
10 | class AdminAttributesFormRequest extends FormRequest |
||
11 | { |
||
12 | use Escaper; |
||
13 | |||
14 | /** |
||
15 | * Determine if the user is authorized to make this request. |
||
16 | * |
||
17 | * @return bool |
||
18 | */ |
||
19 | public function authorize(): bool |
||
23 | |||
24 | /** |
||
25 | * Get the validation rules that apply to the request. |
||
26 | * |
||
27 | * @return array |
||
28 | */ |
||
29 | public function rules(): array |
||
56 | } |
||
57 |
As per the PSR-2 coding standard, case statements should not be wrapped in curly braces. There is no need for braces, since each case is terminated by the next
break
.There is also the option to use a semicolon instead of a colon, this is discouraged because many programmers do not even know it works and the colon is universal between programming languages.
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.