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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('');
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue