@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function pipe($options = []) |
14 | 14 | { |
15 | - return function ($inputData) use ($options) { |
|
15 | + return function($inputData) use ($options) { |
|
16 | 16 | return Arr::get($inputData, Arr::get($options, 'key')); |
17 | 17 | }; |
18 | 18 | } |
@@ -33,8 +33,8 @@ |
||
33 | 33 | $header = array_shift($data); |
34 | 34 | |
35 | 35 | if ($this->config['useHeaderAsIndex']) { |
36 | - $data = collect($data)->map(function ($row) use ($header) { |
|
37 | - return collect($row)->mapWithKeys(function ($column, $index) use ($header) { |
|
36 | + $data = collect($data)->map(function($row) use ($header) { |
|
37 | + return collect($row)->mapWithKeys(function($column, $index) use ($header) { |
|
38 | 38 | return [$header[$index] => $column]; |
39 | 39 | }); |
40 | 40 | })->toArray(); |
@@ -59,9 +59,9 @@ |
||
59 | 59 | private function parseMoney($value) |
60 | 60 | { |
61 | 61 | $isNegative = str_contains($value, '-'); |
62 | - $valueToParse = str_replace([' ','+','-'], '', $value); |
|
62 | + $valueToParse = str_replace([' ', '+', '-'], '', $value); |
|
63 | 63 | |
64 | - try{ |
|
64 | + try { |
|
65 | 65 | /** @var \Money\Money $money */ |
66 | 66 | $money = $this->moneyParser->parse($valueToParse); |
67 | 67 | $value = [ |
@@ -38,7 +38,7 @@ |
||
38 | 38 | */ |
39 | 39 | private function parseDate($value) |
40 | 40 | { |
41 | - try{ |
|
41 | + try { |
|
42 | 42 | $value = (new Carbon($value, $this->config['timezone']))->toIso8601String(); |
43 | 43 | } catch (\Exception $e) { |
44 | 44 | } |
@@ -37,15 +37,15 @@ |
||
37 | 37 | */ |
38 | 38 | public function toArray() |
39 | 39 | { |
40 | - $crawler = new Crawler((string)$this->getData()); |
|
40 | + $crawler = new Crawler((string) $this->getData()); |
|
41 | 41 | |
42 | - return $crawler->filter($this->getConfig()['selector'])->each(function ($table) { |
|
42 | + return $crawler->filter($this->getConfig()['selector'])->each(function($table) { |
|
43 | 43 | $rows = []; |
44 | 44 | try { |
45 | 45 | /** @var Crawler $table */ |
46 | - $rows = $table->filter('tr')->each(function ($row) { |
|
46 | + $rows = $table->filter('tr')->each(function($row) { |
|
47 | 47 | /** @var Crawler $row */ |
48 | - return $row->filter('th,td')->each(function ($column) { |
|
48 | + return $row->filter('th,td')->each(function($column) { |
|
49 | 49 | /** @var Crawler $column */ |
50 | 50 | return trim($column->text()); |
51 | 51 | }); |
@@ -31,9 +31,9 @@ |
||
31 | 31 | */ |
32 | 32 | public function toArray() |
33 | 33 | { |
34 | - $crawler = new Crawler((string)$this->getData()); |
|
34 | + $crawler = new Crawler((string) $this->getData()); |
|
35 | 35 | |
36 | - return $crawler->filter($this->getConfig()['selector'])->each(function ($element) { |
|
36 | + return $crawler->filter($this->getConfig()['selector'])->each(function($element) { |
|
37 | 37 | /** @var Crawler $element */ |
38 | 38 | return $this->domNodeToArray($element->getNode(0)); |
39 | 39 | }); |