1 | <?php |
||
2 | |||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
3 | namespace BristolSU\Module\StaticPage\Http\Controllers; |
||
4 | |||
5 | use BristolSU\Module\StaticPage\Events\PageViewed; |
||
6 | use BristolSU\Module\StaticPage\Models\PageView; |
||
7 | use BristolSU\Support\Authentication\Contracts\Authentication; |
||
8 | |||
9 | class ParticipantPageController extends Controller |
||
0 ignored issues
–
show
|
|||
10 | { |
||
11 | |||
12 | 6 | public function index(Authentication $authentication) |
|
0 ignored issues
–
show
|
|||
13 | { |
||
14 | 6 | $this->authorize('view-page'); |
|
15 | |||
16 | 3 | $pageView = PageView::create([ |
|
0 ignored issues
–
show
|
|||
17 | 3 | 'viewed_by' => $authentication->getUser()->id() |
|
18 | ]); |
||
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
![]() |
|||
19 | |||
20 | 3 | event(new PageViewed($pageView)); |
|
21 | |||
22 | 3 | return view('static-page::participant'); |
|
23 | } |
||
24 | |||
25 | } |