diff --git a/lib/internal/Magento/Framework/AclFactory.php b/lib/internal/Magento/Framework/AclFactory.php index 3e9839830049d..a48000fbdd33c 100644 --- a/lib/internal/Magento/Framework/AclFactory.php +++ b/lib/internal/Magento/Framework/AclFactory.php @@ -31,6 +31,6 @@ public function __construct(\Magento\Framework\ObjectManagerInterface $objectMan */ public function create() { - return $this->_objectManager->create('Magento\Framework\Acl'); + return $this->_objectManager->create(Acl::class); } } diff --git a/lib/internal/Magento/Framework/Controller/ResultFactory.php b/lib/internal/Magento/Framework/Controller/ResultFactory.php index db78cf29c6301..1543368a9dd82 100644 --- a/lib/internal/Magento/Framework/Controller/ResultFactory.php +++ b/lib/internal/Magento/Framework/Controller/ResultFactory.php @@ -30,12 +30,12 @@ class ResultFactory * @var array */ protected $typeMap = [ - self::TYPE_JSON => 'Magento\Framework\Controller\Result\Json', - self::TYPE_RAW => 'Magento\Framework\Controller\Result\Raw', - self::TYPE_REDIRECT => 'Magento\Framework\Controller\Result\Redirect', - self::TYPE_FORWARD => 'Magento\Framework\Controller\Result\Forward', - self::TYPE_LAYOUT => 'Magento\Framework\View\Result\Layout', - self::TYPE_PAGE => 'Magento\Framework\View\Result\Page', + self::TYPE_JSON => Result\Json::class, + self::TYPE_RAW => Result\Raw::class, + self::TYPE_REDIRECT => Result\Redirect::class, + self::TYPE_FORWARD => Result\Forward::class, + self::TYPE_LAYOUT => \Magento\Framework\View\Result\Layout::class, + self::TYPE_PAGE => \Magento\Framework\View\Result\Page::class, ]; /** diff --git a/lib/internal/Magento/Framework/CurrencyFactory.php b/lib/internal/Magento/Framework/CurrencyFactory.php index a1a126aecd1f9..1f87858182d0e 100644 --- a/lib/internal/Magento/Framework/CurrencyFactory.php +++ b/lib/internal/Magento/Framework/CurrencyFactory.php @@ -11,7 +11,7 @@ class CurrencyFactory { /** - * @var \Magento\Framework\ObjectManagerInterface + * @var ObjectManagerInterface */ protected $_objectManager = null; @@ -21,10 +21,10 @@ class CurrencyFactory protected $_instanceName = null; /** - * @param \Magento\Framework\ObjectManagerInterface $objectManager + * @param ObjectManagerInterface $objectManager * @param string $instanceName */ - public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager, $instanceName = 'Magento\Framework\CurrencyInterface') + public function __construct(ObjectManagerInterface $objectManager, $instanceName = CurrencyInterface::class) { $this->_objectManager = $objectManager; $this->_instanceName = $instanceName; @@ -34,7 +34,7 @@ public function __construct(\Magento\Framework\ObjectManagerInterface $objectMan * Create class instance with specified parameters * * @param array $data - * @return \Magento\Framework\CurrencyInterface + * @return CurrencyInterface */ public function create(array $data = []) { diff --git a/lib/internal/Magento/Framework/EventFactory.php b/lib/internal/Magento/Framework/EventFactory.php index 47433049bac1b..e73cb8b96a094 100644 --- a/lib/internal/Magento/Framework/EventFactory.php +++ b/lib/internal/Magento/Framework/EventFactory.php @@ -26,6 +26,6 @@ public function __construct(\Magento\Framework\ObjectManagerInterface $objectMan */ public function create($arguments = []) { - return $this->_objectManager->create('Magento\Framework\Event', $arguments); + return $this->_objectManager->create(Event::class, $arguments); } } diff --git a/lib/internal/Magento/Framework/FlagFactory.php b/lib/internal/Magento/Framework/FlagFactory.php index 99aa8d0047d19..fcd066591a061 100644 --- a/lib/internal/Magento/Framework/FlagFactory.php +++ b/lib/internal/Magento/Framework/FlagFactory.php @@ -32,7 +32,7 @@ class FlagFactory */ public function __construct( \Magento\Framework\ObjectManagerInterface $objectManager, - $instanceName = 'Magento\Framework\Flag' + $instanceName = Flag::class ) { $this->_objectManager = $objectManager; $this->_instanceName = $instanceName; diff --git a/lib/internal/Magento/Framework/UrlFactory.php b/lib/internal/Magento/Framework/UrlFactory.php index f3e65d808ca58..65c7d55f1aac5 100644 --- a/lib/internal/Magento/Framework/UrlFactory.php +++ b/lib/internal/Magento/Framework/UrlFactory.php @@ -11,7 +11,7 @@ class UrlFactory { /** - * @var \Magento\Framework\ObjectManagerInterface + * @var ObjectManagerInterface */ protected $_objectManager = null; @@ -21,10 +21,10 @@ class UrlFactory protected $_instanceName = null; /** - * @param \Magento\Framework\ObjectManagerInterface $objectManager + * @param ObjectManagerInterface $objectManager * @param string $instanceName */ - public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager, $instanceName = 'Magento\Framework\UrlInterface') + public function __construct(ObjectManagerInterface $objectManager, $instanceName = UrlInterface::class) { $this->_objectManager = $objectManager; $this->_instanceName = $instanceName; @@ -34,7 +34,7 @@ public function __construct(\Magento\Framework\ObjectManagerInterface $objectMan * Create Url instance with specified parameters * * @param array $data - * @return \Magento\Framework\UrlInterface + * @return UrlInterface */ public function create(array $data = []) { diff --git a/lib/internal/Magento/Framework/ValidatorFactory.php b/lib/internal/Magento/Framework/ValidatorFactory.php index 6ec20b8487358..6202a8b52cf3c 100644 --- a/lib/internal/Magento/Framework/ValidatorFactory.php +++ b/lib/internal/Magento/Framework/ValidatorFactory.php @@ -10,7 +10,7 @@ */ class ValidatorFactory { - const DEFAULT_INSTANCE_NAME = 'Magento\Framework\Validator'; + const DEFAULT_INSTANCE_NAME = Validator::class; /** * Object Manager instance