@@ -20,7 +20,7 @@ |
||
| 20 | 20 | public static function toArrayWithPlural($pluralValue = false, $pluralKey = false) |
| 21 | 21 | { |
| 22 | 22 | return new static( |
| 23 | - function ($value) use ($pluralValue, $pluralKey) { |
|
| 23 | + function($value) use ($pluralValue, $pluralKey) { |
|
| 24 | 24 | return array_filter([ |
| 25 | 25 | key($value), |
| 26 | 26 | reset($value), |
@@ -22,8 +22,8 @@ |
||
| 22 | 22 | { |
| 23 | 23 | parent::__construct($value); |
| 24 | 24 | |
| 25 | - if (! preg_match('/[A-za-z]/', $this->getValue())) { |
|
| 26 | - throw new InvalidTypeException($value, ['word']); |
|
| 25 | + if (!preg_match('/[A-za-z]/', $this->getValue())) { |
|
| 26 | + throw new InvalidTypeException($value, [ 'word' ]); |
|
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | 29 | |
@@ -62,8 +62,8 @@ |
||
| 62 | 62 | */ |
| 63 | 63 | public function count() |
| 64 | 64 | { |
| 65 | - if (! method_exists($this->getValue(), 'count')) { |
|
| 66 | - throw new \Exception('[' . $this->getShortName() . '] does not have a count method.'); |
|
| 65 | + if (!method_exists($this->getValue(), 'count')) { |
|
| 66 | + throw new \Exception('['.$this->getShortName().'] does not have a count method.'); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | return $this->getValue()->count(); |
@@ -224,7 +224,7 @@ |
||
| 224 | 224 | $value, |
| 225 | 225 | array_merge($this->globalAttributes, array_keys($this->allowedAttributes)) |
| 226 | 226 | )) { |
| 227 | - throw new \InvalidArgumentException('[' . $value . '] is not a valid HTML Attribute'); |
|
| 227 | + throw new \InvalidArgumentException('['.$value.'] is not a valid HTML Attribute'); |
|
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | parent::__construct($value); |
@@ -41,10 +41,10 @@ |
||
| 41 | 41 | public function getDepth() |
| 42 | 42 | { |
| 43 | 43 | $max = 0; |
| 44 | - $depth = function (&$max) { |
|
| 45 | - return function ($line) use (&$max) { |
|
| 44 | + $depth = function(&$max) { |
|
| 45 | + return function($line) use (&$max) { |
|
| 46 | 46 | // every line-indent equals 4 spaces |
| 47 | - $max = max([$max, (strlen($line) - strlen(ltrim($line))) / 4]); |
|
| 47 | + $max = max([ $max, (strlen($line) - strlen(ltrim($line))) / 4 ]); |
|
| 48 | 48 | }; |
| 49 | 49 | }; |
| 50 | 50 | |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | */ |
| 70 | 70 | private function iterateCallback($delimiter, $enclosure, $escape) |
| 71 | 71 | { |
| 72 | - return function ($row) use ($delimiter, $enclosure, $escape) { |
|
| 72 | + return function($row) use ($delimiter, $enclosure, $escape) { |
|
| 73 | 73 | return Csv::fromString($row)->toArray($delimiter, $enclosure, $escape); |
| 74 | 74 | }; |
| 75 | 75 | } |