mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixed PHPCS issues
This commit is contained in:
parent
b2a92f9cd8
commit
f7320cd8cd
2 changed files with 11 additions and 9 deletions
|
@ -546,15 +546,15 @@ class CakeRoute {
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set state magic method to support var_export
|
* Set state magic method to support var_export
|
||||||
*
|
*
|
||||||
* This method helps for applications that want to implement
|
* This method helps for applications that want to implement
|
||||||
* router caching.
|
* router caching.
|
||||||
*
|
*
|
||||||
* @param array $fields
|
* @param array $fields Key/Value of object attributes
|
||||||
* @return CakeRoute
|
* @return CakeRoute A new instance of the route
|
||||||
*/
|
*/
|
||||||
public static function __set_state($fields) {
|
public static function __set_state($fields) {
|
||||||
$class = function_exists('get_called_class') ? get_called_class() : __CLASS__;
|
$class = function_exists('get_called_class') ? get_called_class() : __CLASS__;
|
||||||
$obj = new $class('');
|
$obj = new $class('');
|
||||||
|
|
|
@ -984,7 +984,9 @@ class CakeRouteTest extends CakeTestCase {
|
||||||
*/
|
*/
|
||||||
public function testSetState() {
|
public function testSetState() {
|
||||||
$route = new CakeRoute('/', array('controller' => 'pages', 'action' => 'display', 'home'));
|
$route = new CakeRoute('/', array('controller' => 'pages', 'action' => 'display', 'home'));
|
||||||
|
// @codingStandardsIgnoreStart
|
||||||
$retrievedRoute = eval('return ' . var_export($route, true) . ';');
|
$retrievedRoute = eval('return ' . var_export($route, true) . ';');
|
||||||
|
// @codingStandardsIgnoreEnd
|
||||||
$this->assertEquals($route, $retrievedRoute);
|
$this->assertEquals($route, $retrievedRoute);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue