Skip to content

Commit 39dbdc3

Browse files
committed
return early from fullroutepath rule if no path given (is index)
1 parent 625a3c8 commit 39dbdc3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Generators/FullRoutePath.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ class FullRoutePath extends GeneratorAbstract
2525
{
2626
public function generateClassName()
2727
{
28+
$path = $this->getRoute()->getPath();
29+
30+
if ('/' === $path) {
31+
return null;
32+
}
33+
2834
// Remove route parameters. product_id is removed here: `controller/product/{product_id}`
2935
$className = preg_replace("/\{([^}]+)\}/", '', $this->getRoute()->getPath());
3036

0 commit comments

Comments
 (0)