Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions src/Illuminate/Container/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,28 @@ class Container implements ArrayAccess, ContainerContract {
*
* @var array
*/
protected $resolved = array();
protected $resolved = [];

/**
* The container's bindings.
*
* @var array
*/
protected $bindings = array();
protected $bindings = [];

/**
* The container's shared instances.
*
* @var array
*/
protected $instances = array();
protected $instances = [];

/**
* The registered type aliases.
*
* @var array
*/
protected $aliases = array();
protected $aliases = [];

/**
* The extension closures for services.
Expand Down Expand Up @@ -79,42 +79,42 @@ class Container implements ArrayAccess, ContainerContract {
*
* @var array
*/
protected $reboundCallbacks = array();
protected $reboundCallbacks = [];

/**
* All of the registered resolving callbacks.
*
* @var array
*/
protected $resolvingCallbacks = array();
protected $resolvingCallbacks = [];

/**
* All of the global resolving callbacks.
*
* @var array
*/
protected $globalResolvingCallbacks = array();
protected $globalResolvingCallbacks = [];

/**
* All of the global after resolving callbacks.
*
* @var array
*/
protected $globalAfterResolvingCallbacks = array();
protected $globalAfterResolvingCallbacks = [];

/**
* All of the after resolving callbacks by class type.
*
* @var array
*/
protected $resolvingCallbacksByType = array();
protected $resolvingCallbacksByType = [];

/**
* All of the after resolving callbacks by class type.
*
* @var array
*/
protected $afterResolvingCallbacksByType = array();
protected $afterResolvingCallbacksByType = [];

/**
* Define a contextual binding.
Expand Down Expand Up @@ -229,7 +229,7 @@ public function bind($abstract, $concrete = null, $shared = false)
*/
protected function getClosure($abstract, $concrete)
{
return function($c, $parameters = array()) use ($abstract, $concrete)
return function($c, $parameters = []) use ($abstract, $concrete)
{
$method = ($abstract == $concrete) ? 'build' : 'make';

Expand Down Expand Up @@ -430,7 +430,7 @@ public function alias($abstract, $alias)
*/
protected function extractAlias(array $definition)
{
return array(key($definition), current($definition));
return [key($definition), current($definition)];
}

/**
Expand Down Expand Up @@ -492,7 +492,7 @@ protected function getReboundCallbacks($abstract)
return $this->reboundCallbacks[$abstract];
}

return array();
return [];
}

/**
Expand All @@ -502,7 +502,7 @@ protected function getReboundCallbacks($abstract)
* @param array $parameters
* @return \Closure
*/
public function wrap(Closure $callback, array $parameters = array())
public function wrap(Closure $callback, array $parameters = [])
{
return function() use ($callback, $parameters)
{
Expand All @@ -518,7 +518,7 @@ public function wrap(Closure $callback, array $parameters = array())
* @param string|null $defaultMethod
* @return mixed
*/
public function call($callback, array $parameters = array(), $defaultMethod = null)
public function call($callback, array $parameters = [], $defaultMethod = null)
{
if ($this->isCallableWithAtSign($callback) || $defaultMethod)
{
Expand Down Expand Up @@ -617,7 +617,7 @@ protected function addDependencyForCallParameter(ReflectionParameter $parameter,
* @param string|null $defaultMethod
* @return mixed
*/
protected function callClass($target, array $parameters = array(), $defaultMethod = null)
protected function callClass($target, array $parameters = [], $defaultMethod = null)
{
$segments = explode('@', $target);

Expand All @@ -641,7 +641,7 @@ protected function callClass($target, array $parameters = array(), $defaultMetho
* @param array $parameters
* @return mixed
*/
public function make($abstract, $parameters = array())
public function make($abstract, $parameters = [])
{
$abstract = $this->getAlias($abstract);

Expand Down Expand Up @@ -770,7 +770,7 @@ protected function getExtenders($abstract)
*
* @throws BindingResolutionException
*/
public function build($concrete, $parameters = array())
public function build($concrete, $parameters = [])
{
// If the concrete type is actually a Closure, we will just execute it and
// hand back the results of the functions, which allows functions to be
Expand Down Expand Up @@ -831,9 +831,9 @@ public function build($concrete, $parameters = array())
* @param array $primitives
* @return array
*/
protected function getDependencies($parameters, array $primitives = array())
protected function getDependencies($parameters, array $primitives = [])
{
$dependencies = array();
$dependencies = [];

foreach ($parameters as $parameter)
{
Expand Down Expand Up @@ -1132,7 +1132,7 @@ public function forgetInstance($abstract)
*/
public function forgetInstances()
{
$this->instances = array();
$this->instances = [];
}

/**
Expand Down