Skip to content
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/AclFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
12 changes: 6 additions & 6 deletions lib/internal/Magento/Framework/Controller/ResultFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
];

/**
Expand Down
8 changes: 4 additions & 4 deletions lib/internal/Magento/Framework/CurrencyFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class CurrencyFactory
{
/**
* @var \Magento\Framework\ObjectManagerInterface
* @var ObjectManagerInterface
*/
protected $_objectManager = null;

Expand All @@ -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;
Expand All @@ -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 = [])
{
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/EventFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/FlagFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions lib/internal/Magento/Framework/UrlFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class UrlFactory
{
/**
* @var \Magento\Framework\ObjectManagerInterface
* @var ObjectManagerInterface
*/
protected $_objectManager = null;

Expand All @@ -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;
Expand All @@ -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 = [])
{
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/ValidatorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
class ValidatorFactory
{
const DEFAULT_INSTANCE_NAME = 'Magento\Framework\Validator';
const DEFAULT_INSTANCE_NAME = Validator::class;

/**
* Object Manager instance
Expand Down