Skip to content

Commit 977fdb9

Browse files
committed
Changed array notation from array() to []
1 parent 130751f commit 977fdb9

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

config/alphaWidget.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,4 @@
2828
'testWidget' => 'TestWidget',
2929
]
3030

31-
3231
];

src/WidgetContainer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ class WidgetContainer
2323
*
2424
* @var array
2525
*/
26-
protected $aliases = array();
26+
protected $aliases = [];
2727

2828
/**
2929
* Widget Bindings. Key-Value of all Widget aliases, and class names.
3030
* Keys represent Aliases. Values represent class base names (Without the namespace).
3131
*
3232
* @var array
3333
*/
34-
protected $bindings = array();
34+
protected $bindings = [];
3535

3636
/**
3737
* Binds a Widget to the container.

src/WidgetFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ protected function registerBindings()
7777
* @throws IncorrectWidgetClassException
7878
* @return AlphaWidgetContract
7979
*/
80-
public function make($alias, $arguments = array())
80+
public function make($alias, $arguments = [])
8181
{
8282
$widgetClass = $this->getWidgetClass($alias);
8383
$reflector = new ReflectionClass($widgetClass);
@@ -99,7 +99,7 @@ public function make($alias, $arguments = array())
9999
* @param array $arguments
100100
* @return mixed
101101
*/
102-
public function render($alias, $arguments = array())
102+
public function render($alias, $arguments = [])
103103
{
104104
if( ! $this->bindingExists($alias) )
105105
throw new WidgetAliasNotFound("Widget alias [$alias] does not exist.");
@@ -118,7 +118,7 @@ public function render($alias, $arguments = array())
118118
* @param array $arguments
119119
* @return mixed
120120
*/
121-
public function __call($widgetAlias, $arguments = array())
121+
public function __call($widgetAlias, $arguments = [])
122122
{
123123
return $this->render($widgetAlias, $arguments);
124124
}

src/helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @param array $arguments
1010
* @return mixed
1111
*/
12-
function alphaWidget($alias = null, $arguments = array())
12+
function alphaWidget($alias = null, $arguments = [])
1313
{
1414
if( !is_null($alias) )
1515
return alphaWidget()->render($alias, $arguments);

0 commit comments

Comments
 (0)