Skip to content

Commit

Permalink
Merge 0608145 into 0726a07
Browse files Browse the repository at this point in the history
  • Loading branch information
TypicalFence committed Nov 8, 2018
2 parents 0726a07 + 0608145 commit f4edb17
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Mapping/Driver/AnnotationDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ protected function getRouteMetadata(
->setMiddleware($annotation->getMiddleware())
->setMethods($annotation->getMethods())
->setXmlHttpRequest($annotation->isXmlHttpRequest())
->setInvokable([$class->name, $method->name])
->setInvokable($class->name . ':' . $method->name)
->setPriority($annotation->getPriority());

if ($annotation->getPattern() !== null) {
Expand Down
4 changes: 2 additions & 2 deletions src/Mapping/Driver/MappingTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ protected function getGroupMetadata(array $mapping, GroupMetadata $parentGroup =
*
* @return RouteMetadata
*/
protected function getRouteMetadata(array $mapping, GroupMetadata $group = null): RouteMetadata
protected function getRouteMetadata($mapping, GroupMetadata $group = null): RouteMetadata
{
$route = (new RouteMetadata())
->setMethods($this->getMethods($mapping))
Expand Down Expand Up @@ -347,7 +347,7 @@ protected function getMiddleware(array $mapping): array
*
* @return string|array|callable
*/
protected function getInvokable(array $mapping)
protected function getInvokable($mapping)
{
if (!\array_key_exists('invokable', $mapping)) {
throw new DriverException('Route invokable definition missing');
Expand Down
8 changes: 4 additions & 4 deletions tests/Routing/Mapping/Driver/AnnotationDriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function testRoutes()
self::assertEquals('four', $route->getName());
self::assertEquals(['GET'], $route->getMethods());
self::assertEquals(
['Jgut\Slim\Routing\Tests\Files\Annotation\Valid\DependentRoute', 'actionFour'],
'Jgut\Slim\Routing\Tests\Files\Annotation\Valid\DependentRoute:actionFour',
$route->getInvokable()
);
self::assertEquals(0, $route->getPriority());
Expand All @@ -147,7 +147,7 @@ public function testRoutes()
self::assertNull($route->getName());
self::assertEquals(['GET'], $route->getMethods());
self::assertEquals(
['Jgut\Slim\Routing\Tests\Files\Annotation\Valid\GroupedRoute', 'actionTwo'],
'Jgut\Slim\Routing\Tests\Files\Annotation\Valid\GroupedRoute:actionTwo',
$route->getInvokable()
);
self::assertEquals(0, $route->getPriority());
Expand All @@ -160,7 +160,7 @@ public function testRoutes()
self::assertNull($route->getName());
self::assertEquals(['GET'], $route->getMethods());
self::assertEquals(
['Jgut\Slim\Routing\Tests\Files\Annotation\Valid\GroupedRoute', 'actionThree'],
'Jgut\Slim\Routing\Tests\Files\Annotation\Valid\GroupedRoute:actionThree',
$route->getInvokable()
);
self::assertEquals(0, $route->getPriority());
Expand All @@ -173,7 +173,7 @@ public function testRoutes()
self::assertEquals('one', $route->getName());
self::assertEquals(['GET', 'POST'], $route->getMethods());
self::assertEquals(
['Jgut\Slim\Routing\Tests\Files\Annotation\Valid\SingleRoute', 'actionOne'],
'Jgut\Slim\Routing\Tests\Files\Annotation\Valid\SingleRoute:actionOne',
$route->getInvokable()
);
self::assertEquals(-10, $route->getPriority());
Expand Down

0 comments on commit f4edb17

Please sign in to comment.