Skip to content

Commit e12a391

Browse files
author
Joan He
committed
MAGETWO-34216: Elimination of functional logic in constructors - Part 1
- fixed static test failures
1 parent bee4cf9 commit e12a391

File tree

1 file changed

+16
-5
lines changed
  • lib/internal/Magento/Framework/UrlInterface

1 file changed

+16
-5
lines changed

lib/internal/Magento/Framework/UrlInterface/Proxy.php

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
26
namespace Magento\Framework\UrlInterface;
37

48
/**
@@ -41,8 +45,11 @@ class Proxy implements \Magento\Framework\UrlInterface
4145
* @param string $instanceName
4246
* @param bool $shared
4347
*/
44-
public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager, $instanceName = '\\Magento\\Framework\\UrlInterface', $shared = true)
45-
{
48+
public function __construct(
49+
\Magento\Framework\ObjectManagerInterface $objectManager,
50+
$instanceName = '\\Magento\\Framework\\UrlInterface',
51+
$shared = true
52+
) {
4653
$this->_objectManager = $objectManager;
4754
$this->_instanceName = $instanceName;
4855
$this->_isShared = $shared;
@@ -53,11 +60,13 @@ public function __construct(\Magento\Framework\ObjectManagerInterface $objectMan
5360
*/
5461
public function __sleep()
5562
{
56-
return array('_subject', '_isShared');
63+
return ['_subject', '_isShared'];
5764
}
5865

5966
/**
6067
* Retrieve ObjectManager from global scope
68+
*
69+
* @return void
6170
*/
6271
public function __wakeup()
6372
{
@@ -66,6 +75,8 @@ public function __wakeup()
6675

6776
/**
6877
* Clone proxied instance
78+
*
79+
* @return void
6980
*/
7081
public function __clone()
7182
{
@@ -98,7 +109,7 @@ public function getUseSession()
98109
/**
99110
* {@inheritdoc}
100111
*/
101-
public function getBaseUrl($params = array())
112+
public function getBaseUrl($params = [])
102113
{
103114
return $this->_getSubject()->getBaseUrl($params);
104115
}
@@ -162,7 +173,7 @@ public function escape($value)
162173
/**
163174
* {@inheritdoc}
164175
*/
165-
public function getDirectUrl($url, $params = array())
176+
public function getDirectUrl($url, $params = [])
166177
{
167178
return $this->_getSubject()->getDirectUrl($url, $params);
168179
}

0 commit comments

Comments
 (0)