Skip to content

Commit 7daf8e8

Browse files
author
Brian Faust
authored
Add missing colon for index method for web controllers (#638)
1 parent 1722216 commit 7daf8e8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Lexers/ControllerLexer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ private function resourceTokens()
118118
return [
119119
'index' => [
120120
'query' => 'all:[plural]',
121-
'render' => '[singular].index with [plural]',
121+
'render' => '[singular].index with:[plural]',
122122
],
123123
'create' => [
124124
'render' => '[singular].create',

tests/Feature/Lexers/ControllerLexerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function it_returns_controllers(): void
4646
'PostController' => [
4747
'index' => [
4848
'query' => 'all:posts',
49-
'render' => 'post.index with posts',
49+
'render' => 'post.index with:posts',
5050
],
5151
'show' => [
5252
'find' => 'id',
@@ -63,7 +63,7 @@ public function it_returns_controllers(): void
6363
$this->statementLexer->shouldReceive('analyze')
6464
->with([
6565
'query' => 'all:posts',
66-
'render' => 'post.index with posts',
66+
'render' => 'post.index with:posts',
6767
])
6868
->andReturn(['index-statement-1', 'index-statement-2']);
6969

@@ -120,7 +120,7 @@ public function it_returns_a_web_resource_controller(): void
120120
$this->statementLexer->shouldReceive('analyze')
121121
->with([
122122
'query' => 'all:comments',
123-
'render' => 'comment.index with comments',
123+
'render' => 'comment.index with:comments',
124124
])
125125
->andReturn(['index-statements']);
126126

@@ -265,7 +265,7 @@ public function it_returns_a_specific_resource_controller(): void
265265
$this->statementLexer->expects('analyze')
266266
->with([
267267
'query' => 'all:users',
268-
'render' => 'user.index with users',
268+
'render' => 'user.index with:users',
269269
])
270270
->andReturn(['index-statements']);
271271

0 commit comments

Comments
 (0)