Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/Illuminate/Bus/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ protected function marshal($command, ArrayAccess $source, array $extras = [])
* @return mixed
*/
protected function getParameterValueForCommand($command, ArrayAccess $source,
ReflectionParameter $parameter, array $extras = array())
ReflectionParameter $parameter, array $extras = [])
{
if (array_key_exists($parameter->name, $extras))
{
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Cache/ArrayStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ArrayStore extends TaggableStore implements Store {
*
* @var array
*/
protected $storage = array();
protected $storage = [];

/**
* Retrieve an item from the cache by key.
Expand Down Expand Up @@ -96,7 +96,7 @@ public function forget($key)
*/
public function flush()
{
$this->storage = array();
$this->storage = [];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Cache/CacheManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ public function extend($driver, Closure $callback)
*/
public function __call($method, $parameters)
{
return call_user_func_array(array($this->store(), $method), $parameters);
return call_user_func_array([$this->store(), $method], $parameters);
}

}
4 changes: 2 additions & 2 deletions src/Illuminate/Cache/FileStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected function getPayload($key)
}
catch (Exception $e)
{
return array('data' => null, 'time' => null);
return ['data' => null, 'time' => null];
}

// If the current time is greater than expiration timestamps we will delete
Expand All @@ -73,7 +73,7 @@ protected function getPayload($key)
{
$this->forget($key);

return array('data' => null, 'time' => null);
return ['data' => null, 'time' => null];
}

$data = unserialize(substr($contents, 10));
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Cache/NullStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class NullStore extends TaggableStore implements Store {
*
* @var array
*/
protected $storage = array();
protected $storage = [];

/**
* Retrieve an item from the cache by key.
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Cache/RedisTaggedCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected function deleteForeverValues($foreverKey)

if (count($forever) > 0)
{
call_user_func_array(array($this->store->connection(), 'del'), $forever);
call_user_func_array([$this->store->connection(), 'del'], $forever);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Cache/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ public function __call($method, $parameters)
return $this->macroCall($method, $parameters);
}

return call_user_func_array(array($this->store, $method), $parameters);
return call_user_func_array([$this->store, $method], $parameters);
}

}
8 changes: 4 additions & 4 deletions src/Illuminate/Cache/TagSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TagSet {
*
* @var array
*/
protected $names = array();
protected $names = [];

/**
* Create a new TagSet instance.
Expand All @@ -25,7 +25,7 @@ class TagSet {
* @param array $names
* @return void
*/
public function __construct(Store $store, array $names = array())
public function __construct(Store $store, array $names = [])
{
$this->store = $store;
$this->names = $names;
Expand All @@ -38,7 +38,7 @@ public function __construct(Store $store, array $names = array())
*/
public function reset()
{
array_walk($this->names, array($this, 'resetTag'));
array_walk($this->names, [$this, 'resetTag']);
}

/**
Expand All @@ -59,7 +59,7 @@ public function tagId($name)
*/
protected function tagIds()
{
return array_map(array($this, 'tagId'), $this->names);
return array_map([$this, 'tagId'], $this->names);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Config/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Repository implements ArrayAccess, ConfigContract {
* @param array $items
* @return void
*/
public function __construct(array $items = array())
public function __construct(array $items = [])
{
$this->items = $items;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function __construct(LaravelApplication $laravel, Dispatcher $events)
* @param array $parameters
* @return int
*/
public function call($command, array $parameters = array())
public function call($command, array $parameters = [])
{
$parameters['command'] = $command;

Expand Down
12 changes: 6 additions & 6 deletions src/Illuminate/Console/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ protected function specifyParameters()
// passed into these commands as "parameters" to control the execution.
foreach ($this->getArguments() as $arguments)
{
call_user_func_array(array($this, 'addArgument'), $arguments);
call_user_func_array([$this, 'addArgument'], $arguments);
}

foreach ($this->getOptions() as $options)
{
call_user_func_array(array($this, 'addOption'), $options);
call_user_func_array([$this, 'addOption'], $options);
}
}

Expand Down Expand Up @@ -122,7 +122,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
* @param array $arguments
* @return int
*/
public function call($command, array $arguments = array())
public function call($command, array $arguments = [])
{
$instance = $this->getApplication()->find($command);

Expand All @@ -138,7 +138,7 @@ public function call($command, array $arguments = array())
* @param array $arguments
* @return int
*/
public function callSilent($command, array $arguments = array())
public function callSilent($command, array $arguments = [])
{
$instance = $this->getApplication()->find($command);

Expand Down Expand Up @@ -340,7 +340,7 @@ public function error($string)
*/
protected function getArguments()
{
return array();
return [];
}

/**
Expand All @@ -350,7 +350,7 @@ protected function getArguments()
*/
protected function getOptions()
{
return array();
return [];
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Console/GeneratorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ protected function getNameInput()
*/
protected function getArguments()
{
return array(
array('name', InputArgument::REQUIRED, 'The name of the class'),
);
return [
['name', InputArgument::REQUIRED, 'The name of the class'],
];
}

}
2 changes: 1 addition & 1 deletion src/Illuminate/Console/Scheduling/CallbackEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CallbackEvent extends Event {
* @param array $parameters
* @return void
*/
public function __construct($callback, array $parameters = array())
public function __construct($callback, array $parameters = [])
{
$this->callback = $callback;
$this->parameters = $parameters;
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Console/Scheduling/Schedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Schedule {
* @param array $parameters
* @return \Illuminate\Console\Scheduling\Event
*/
public function call($callback, array $parameters = array())
public function call($callback, array $parameters = [])
{
$this->events[] = $event = new CallbackEvent($callback, $parameters);

Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Contracts/Auth/Guard.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function user();
* @param array $credentials
* @return bool
*/
public function once(array $credentials = array());
public function once(array $credentials = []);

/**
* Attempt to authenticate a user using the given credentials.
Expand All @@ -39,7 +39,7 @@ public function once(array $credentials = array());
* @param bool $login
* @return bool
*/
public function attempt(array $credentials = array(), $remember = false, $login = true);
public function attempt(array $credentials = [], $remember = false, $login = true);

/**
* Attempt to authenticate using HTTP Basic Auth.
Expand All @@ -63,7 +63,7 @@ public function onceBasic($field = 'email');
* @param array $credentials
* @return bool
*/
public function validate(array $credentials = array());
public function validate(array $credentials = []);

/**
* Log a user into the application.
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Contracts/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface Application {
* @param array $parameters
* @return int
*/
public function call($command, array $parameters = array());
public function call($command, array $parameters = []);

/**
* Get the output from the last command.
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Contracts/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function handle($input, $output = null);
* @param array $parameters
* @return int
*/
public function call($command, array $parameters = array());
public function call($command, array $parameters = []);

/**
* Queue an Artisan console command by name.
Expand All @@ -27,7 +27,7 @@ public function call($command, array $parameters = array());
* @param array $parameters
* @return int
*/
public function queue($command, array $parameters = array());
public function queue($command, array $parameters = []);

/**
* Get all of the commands registered with the console.
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Contracts/Events/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function hasListeners($eventName);
* @param array $payload
* @return mixed
*/
public function until($event, $payload = array());
public function until($event, $payload = []);

/**
* Fire an event and call the listeners.
Expand All @@ -37,7 +37,7 @@ public function until($event, $payload = array());
* @param bool $halt
* @return array|null
*/
public function fire($event, $payload = array(), $halt = false);
public function fire($event, $payload = [], $halt = false);

/**
* Get the event that is currently firing.
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Contracts/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface Application extends Container {
* @return string
*/
public function version();

/**
* Get the base path of the Laravel installation.
*
Expand Down Expand Up @@ -48,7 +48,7 @@ public function registerConfiguredProviders();
* @param bool $force
* @return \Illuminate\Support\ServiceProvider
*/
public function register($provider, $options = array(), $force = false);
public function register($provider, $options = [], $force = false);

/**
* Register a deferred provider and service.
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Contracts/Hashing/Hasher.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface Hasher {
* @param array $options
* @return string
*/
public function make($value, array $options = array());
public function make($value, array $options = []);

/**
* Check the given plain value against a hash.
Expand All @@ -19,7 +19,7 @@ public function make($value, array $options = array());
* @param array $options
* @return bool
*/
public function check($value, $hashedValue, array $options = array());
public function check($value, $hashedValue, array $options = []);

/**
* Check if the given hash has been hashed using the given options.
Expand All @@ -28,6 +28,6 @@ public function check($value, $hashedValue, array $options = array());
* @param array $options
* @return bool
*/
public function needsRehash($hashedValue, array $options = array());
public function needsRehash($hashedValue, array $options = []);

}
Loading