Skip to content

Commit

Permalink
return callable
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangut committed Aug 5, 2017
1 parent a2cf2dc commit 6c29693
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Loader/AnnotationLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ protected function getCompiledRoute(
'pattern' => $pattern,
'placeholders' => $placeholders,
'middleware' => $middleware,
'invokable' => $class->name . '::' . $method->name,
'invokable' => [$class->name, $method->name],
];
}

Expand Down
8 changes: 4 additions & 4 deletions tests/Routing/Loader/AnnotationLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function testEmptyMethods()
'section' => '[A-Za-z]+',
],
'middleware' => ['fourMiddleware', 'dependentMiddleware', 'groupedMiddleware'],
'invokable' => 'Jgut\\Slim\\Routing\\Tests\\Files\\Annotation\\Valid\\DependentRoute::actionFour',
'invokable' => ['Jgut\\Slim\\Routing\\Tests\\Files\\Annotation\\Valid\\DependentRoute', 'actionFour'],
],
[
'name' => '',
Expand All @@ -104,7 +104,7 @@ public function testEmptyMethods()
'section' => '[A-Za-z]+',
],
'middleware' => ['twoMiddleware', 'groupedMiddleware'],
'invokable' => 'Jgut\\Slim\\Routing\\Tests\\Files\\Annotation\\Valid\\GroupedRoute::actionTwo',
'invokable' => ['Jgut\\Slim\\Routing\\Tests\\Files\\Annotation\\Valid\\GroupedRoute', 'actionTwo'],
],
[
'name' => '',
Expand All @@ -116,7 +116,7 @@ public function testEmptyMethods()
'id' => '\\d+',
],
'middleware' => ['threeMiddleware', 'groupedMiddleware'],
'invokable' => 'Jgut\\Slim\\Routing\\Tests\\Files\\Annotation\\Valid\\GroupedRoute::actionThree',
'invokable' => ['Jgut\\Slim\\Routing\\Tests\\Files\\Annotation\\Valid\\GroupedRoute', 'actionThree'],
],
[
'name' => 'one',
Expand All @@ -127,7 +127,7 @@ public function testEmptyMethods()
'id' => '[0-9]+',
],
'middleware' => ['oneMiddleware'],
'invokable' => 'Jgut\\Slim\\Routing\\Tests\\Files\\Annotation\\Valid\\SingleRoute::actionOne',
'invokable' => ['Jgut\\Slim\\Routing\\Tests\\Files\\Annotation\\Valid\\SingleRoute', 'actionOne'],
],
];

Expand Down

0 comments on commit 6c29693

Please sign in to comment.