Navigation Menu

Skip to content

Commit

Permalink
phpcs fix and using the newly added getTypeName()
Browse files Browse the repository at this point in the history
  • Loading branch information
burzum committed Nov 2, 2017
1 parent 6d10b17 commit 74a2df8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Routing/Route/EntityRoute.php
Expand Up @@ -65,7 +65,7 @@ protected function _checkEntity($entity)
throw new RuntimeException(sprintf(
'Route `%s` expects the URL option `_entity` to be an array or object implementing \ArrayAccess, but `%s` passed.',
$this->template,
is_object($entity) ? get_class($entity) : gettype($entity)
getTypeName($entity)
));
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Routing/Route/EntityRouteTest.php
Expand Up @@ -73,7 +73,7 @@ public function testMatchingArray()
$result = $route->match([
'_entity' => $entity,
'_name' => 'articlesView'
]);
]);

$this->assertEquals('/articles/2/article-slug', $result);
}
Expand Down

0 comments on commit 74a2df8

Please sign in to comment.