Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b7d1759

Browse files
author
Graham Campbell
committed
Additional cs fixes
Signed-off-by: Graham Campbell <[email protected]>
1 parent b060a63 commit b7d1759

48 files changed

Lines changed: 252 additions & 158 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AggregateServiceProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php namespace Illuminate\Support;
1+
<?php
2+
3+
namespace Illuminate\Support;
24

35
class AggregateServiceProvider extends ServiceProvider
46
{

Arr.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php namespace Illuminate\Support;
1+
<?php
2+
3+
namespace Illuminate\Support;
24

35
use Illuminate\Support\Traits\Macroable;
46

@@ -193,7 +195,7 @@ public static function flatten($array)
193195
*/
194196
public static function forget(&$array, $keys)
195197
{
196-
$original =& $array;
198+
$original = &$array;
197199

198200
foreach ((array) $keys as $key) {
199201
$parts = explode('.', $key);
@@ -202,14 +204,14 @@ public static function forget(&$array, $keys)
202204
$part = array_shift($parts);
203205

204206
if (isset($array[$part]) && is_array($array[$part])) {
205-
$array =& $array[$part];
207+
$array = &$array[$part];
206208
}
207209
}
208210

209211
unset($array[array_shift($parts)]);
210212

211213
// clean up after each pass
212-
$array =& $original;
214+
$array = &$original;
213215
}
214216
}
215217

@@ -232,7 +234,7 @@ public static function get($array, $key, $default = null)
232234
}
233235

234236
foreach (explode('.', $key) as $segment) {
235-
if (! is_array($array) || ! array_key_exists($segment, $array)) {
237+
if (!is_array($array) || !array_key_exists($segment, $array)) {
236238
return value($default);
237239
}
238240

@@ -260,7 +262,7 @@ public static function has($array, $key)
260262
}
261263

262264
foreach (explode('.', $key) as $segment) {
263-
if (! is_array($array) || ! array_key_exists($segment, $array)) {
265+
if (!is_array($array) || !array_key_exists($segment, $array)) {
264266
return false;
265267
}
266268

@@ -371,11 +373,11 @@ public static function set(&$array, $key, $value)
371373
// If the key doesn't exist at this depth, we will just create an empty array
372374
// to hold the next value, allowing us to create the arrays to hold final
373375
// values at the correct depth. Then we'll keep digging into the array.
374-
if (! isset($array[$key]) || ! is_array($array[$key])) {
376+
if (!isset($array[$key]) || !is_array($array[$key])) {
375377
$array[$key] = [];
376378
}
377379

378-
$array =& $array[$key];
380+
$array = &$array[$key];
379381
}
380382

381383
$array[array_shift($keys)] = $value;

ClassLoader.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php namespace Illuminate\Support;
1+
<?php
2+
3+
namespace Illuminate\Support;
24

35
class ClassLoader
46
{
@@ -7,7 +9,7 @@ class ClassLoader
79
*
810
* @var array
911
*/
10-
protected static $directories = array();
12+
protected static $directories = [];
1113

1214
/**
1315
* Indicates if a ClassLoader has been registered.
@@ -49,7 +51,7 @@ public static function normalizeClass($class)
4951
$class = substr($class, 1);
5052
}
5153

52-
return str_replace(array('\\', '_'), DIRECTORY_SEPARATOR, $class).'.php';
54+
return str_replace(['\\', '_'], DIRECTORY_SEPARATOR, $class).'.php';
5355
}
5456

5557
/**
@@ -59,8 +61,8 @@ public static function normalizeClass($class)
5961
*/
6062
public static function register()
6163
{
62-
if (! static::$registered) {
63-
static::$registered = spl_autoload_register(array('\Illuminate\Support\ClassLoader', 'load'));
64+
if (!static::$registered) {
65+
static::$registered = spl_autoload_register(['\Illuminate\Support\ClassLoader', 'load']);
6466
}
6567
}
6668

@@ -84,7 +86,7 @@ public static function addDirectories($directories)
8486
public static function removeDirectories($directories = null)
8587
{
8688
if (is_null($directories)) {
87-
static::$directories = array();
89+
static::$directories = [];
8890
} else {
8991
static::$directories = array_diff(static::$directories, (array) $directories);
9092
}

Collection.php

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php namespace Illuminate\Support;
1+
<?php
2+
3+
namespace Illuminate\Support;
24

35
use Countable;
46
use ArrayAccess;
@@ -17,7 +19,7 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate
1719
*
1820
* @var array
1921
*/
20-
protected $items = array();
22+
protected $items = [];
2123

2224
/**
2325
* Create a new collection.
@@ -77,7 +79,7 @@ public function contains($key, $value = null)
7779
}
7880

7981
if ($this->useAsCallable($key)) {
80-
return ! is_null($this->first($key));
82+
return !is_null($this->first($key));
8183
}
8284

8385
return in_array($key, $this->items);
@@ -244,7 +246,7 @@ public function groupBy($groupBy, $preserveKeys = false)
244246
foreach ($this->items as $key => $value) {
245247
$groupKey = $groupBy($value, $key);
246248

247-
if (! array_key_exists($groupKey, $results)) {
249+
if (!array_key_exists($groupKey, $results)) {
248250
$results[$groupKey] = new static;
249251
}
250252

@@ -305,7 +307,7 @@ public function implode($value, $glue = null)
305307
/**
306308
* Intersect the collection with the given items.
307309
*
308-
* @param mixed $items
310+
* @param mixed $items
309311
* @return static
310312
*/
311313
public function intersect($items)
@@ -331,7 +333,7 @@ public function isEmpty()
331333
*/
332334
protected function useAsCallable($value)
333335
{
334-
return ! is_string($value) && is_callable($value);
336+
return !is_string($value) && is_callable($value);
335337
}
336338

337339
/**
@@ -529,7 +531,7 @@ public function reject($callback)
529531
{
530532
if ($this->useAsCallable($callback)) {
531533
return $this->filter(function ($item) use ($callback) {
532-
return ! $callback($item);
534+
return !$callback($item);
533535
});
534536
}
535537

@@ -557,7 +559,7 @@ public function reverse()
557559
*/
558560
public function search($value, $strict = false)
559561
{
560-
if (! $this->useAsCallable($value)) {
562+
if (!$this->useAsCallable($value)) {
561563
return array_search($value, $this->items, $strict);
562564
}
563565

@@ -803,7 +805,7 @@ protected function valueRetriever($value)
803805
}
804806

805807
/**
806-
* Zip the collection together with one or more arrays
808+
* Zip the collection together with one or more arrays.
807809
*
808810
* e.g. new Collection([1, 2, 3])->zip([4, 5, 6]);
809811
* => [[1, 4], [2, 5], [3, 6]]
@@ -951,7 +953,7 @@ public function __toString()
951953
/**
952954
* Results array of items from Collection or Arrayable.
953955
*
954-
* @param mixed $items
956+
* @param mixed $items
955957
* @return array
956958
*/
957959
protected function getArrayableItems($items)

Debug/Dumper.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php namespace Illuminate\Support\Debug;
1+
<?php
2+
3+
namespace Illuminate\Support\Debug;
24

35
use Symfony\Component\VarDumper\Dumper\CliDumper;
46
use Symfony\Component\VarDumper\Cloner\VarCloner;

Debug/HtmlDumper.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php namespace Illuminate\Support\Debug;
1+
<?php
2+
3+
namespace Illuminate\Support\Debug;
24

35
use Symfony\Component\VarDumper\Dumper\HtmlDumper as SymfonyHtmlDumper;
46

@@ -9,7 +11,7 @@ class HtmlDumper extends SymfonyHtmlDumper
911
*
1012
* @var array
1113
*/
12-
protected $styles = array(
14+
protected $styles = [
1315
'default' => 'background-color:#fff; color:#222; line-height:1.2em; font-weight:normal; font:12px Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:100000',
1416
'num' => 'color:#a71d5d',
1517
'const' => 'color:#795da3',
@@ -23,5 +25,5 @@ class HtmlDumper extends SymfonyHtmlDumper
2325
'meta' => 'color:#b729d9',
2426
'key' => 'color:#df5000',
2527
'index' => 'color:#a71d5d',
26-
);
28+
];
2729
}

Facades/App.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php namespace Illuminate\Support\Facades;
1+
<?php
2+
3+
namespace Illuminate\Support\Facades;
24

35
/**
46
* @see \Illuminate\Foundation\Application

Facades/Artisan.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php namespace Illuminate\Support\Facades;
1+
<?php
2+
3+
namespace Illuminate\Support\Facades;
24

35
/**
46
* @see \Illuminate\Foundation\Artisan

Facades/Auth.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php namespace Illuminate\Support\Facades;
1+
<?php
2+
3+
namespace Illuminate\Support\Facades;
24

35
/**
46
* @see \Illuminate\Auth\AuthManager

Facades/Blade.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php namespace Illuminate\Support\Facades;
1+
<?php
2+
3+
namespace Illuminate\Support\Facades;
24

35
/**
46
* @see \Illuminate\View\Compilers\BladeCompiler

0 commit comments

Comments
 (0)