phpmyadmin/libraries/classes/Di/ServiceItem.php
Maurício Meneghini Fauth b9c0463d96 Use short array syntax instead of long array syntax
Replaces array() with [].

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 01:42:21 -03:00

37 lines
637 B
PHP

<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Holds the PhpMyAdmin\Di\ServiceItem class
*
* @package PhpMyAdmin\Di
*/
declare(strict_types=1);
namespace PhpMyAdmin\Di;
/**
* Service manager
*
* @package PhpMyAdmin\Di
*/
class ServiceItem extends ReflectorItem
{
/** @var mixed */
protected $instance;
/**
* Get the instance of the service
*
* @param array $params Parameters
* @return mixed
*/
public function get(array $params = [])
{
if (!isset($this->instance)) {
$this->instance = $this->invoke();
}
return $this->instance;
}
}