Fixed PHPCS issues

This commit is contained in:
Juan Basso 2014-10-21 23:34:53 -04:00
parent b2a92f9cd8
commit f7320cd8cd
2 changed files with 11 additions and 9 deletions

View file

@ -546,15 +546,15 @@ class CakeRoute {
return $out;
}
/**
* Set state magic method to support var_export
*
* This method helps for applications that want to implement
* router caching.
*
* @param array $fields
* @return CakeRoute
*/
/**
* Set state magic method to support var_export
*
* This method helps for applications that want to implement
* router caching.
*
* @param array $fields Key/Value of object attributes
* @return CakeRoute A new instance of the route
*/
public static function __set_state($fields) {
$class = function_exists('get_called_class') ? get_called_class() : __CLASS__;
$obj = new $class('');

View file

@ -984,7 +984,9 @@ class CakeRouteTest extends CakeTestCase {
*/
public function testSetState() {
$route = new CakeRoute('/', array('controller' => 'pages', 'action' => 'display', 'home'));
// @codingStandardsIgnoreStart
$retrievedRoute = eval('return ' . var_export($route, true) . ';');
// @codingStandardsIgnoreEnd
$this->assertEquals($route, $retrievedRoute);
}