@@ -433,7 +433,7 @@ |
||
433 | 433 | * @return bool |
434 | 434 | */ |
435 | 435 | public function saveImage($image, $exif, $final_path_with_name, |
436 | - &$final_file_sha1 = null, &$final_file_size = null) |
|
436 | + &$final_file_sha1 = null, &$final_file_size = null) |
|
437 | 437 | { |
438 | 438 | // set correct orientation |
439 | 439 | if (!empty($exif) && is_array($exif)) { |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | try { |
215 | 215 | $image = Image::make($source); |
216 | 216 | } catch (StoreImageException $e) { |
217 | - throw new StoreImageException('YeelightImageService: Unable to make image [' + (string) $e + ']'); |
|
217 | + throw new StoreImageException('YeelightImageService: Unable to make image [' +(string) $e + ']'); |
|
218 | 218 | } |
219 | 219 | |
220 | 220 | $is_allowed_animated_gif = $isAllowGIF && $isGIF; |
@@ -374,21 +374,21 @@ discard block |
||
374 | 374 | } |
375 | 375 | |
376 | 376 | // convert to image |
377 | - $img = Image::cache(function ($image) use ($file_path, $imageTemplate) { |
|
377 | + $img = Image::cache(function($image) use ($file_path, $imageTemplate) { |
|
378 | 378 | /* @var \Intervention\Image\Image $image */ |
379 | 379 | $image->make($file_path); |
380 | 380 | |
381 | 381 | // resize |
382 | 382 | if (!$imageTemplate->isOriginal()) { |
383 | 383 | if ($imageTemplate->isHeighten()) { |
384 | - $image->heighten($imageTemplate->getHeight(), function ($constraint) use ($imageTemplate) { |
|
384 | + $image->heighten($imageTemplate->getHeight(), function($constraint) use ($imageTemplate) { |
|
385 | 385 | if ($imageTemplate->isRatio()) { |
386 | 386 | $constraint->aspectRatio(); |
387 | 387 | } |
388 | 388 | $constraint->upsize(); |
389 | 389 | }); |
390 | 390 | } elseif ($imageTemplate->isWiden()) { |
391 | - $image->widen($imageTemplate->getWidth(), function ($constraint) use ($imageTemplate) { |
|
391 | + $image->widen($imageTemplate->getWidth(), function($constraint) use ($imageTemplate) { |
|
392 | 392 | if ($imageTemplate->isRatio()) { |
393 | 393 | $constraint->aspectRatio(); |
394 | 394 | } |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | $image->fit($imageTemplate->getWidth(), $imageTemplate->getHeight()); |
401 | 401 | } else { |
402 | 402 | $image->resize($imageTemplate->getWidth(), $imageTemplate->getHeight(), |
403 | - function ($constraint) use ($imageTemplate) { |
|
403 | + function($constraint) use ($imageTemplate) { |
|
404 | 404 | if ($imageTemplate->isRatio()) { |
405 | 405 | $constraint->aspectRatio(); |
406 | 406 | } |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | } |
488 | 488 | |
489 | 489 | // resize |
490 | - $image->resize($newWidth, $newHeight, function ($constraint) { |
|
490 | + $image->resize($newWidth, $newHeight, function($constraint) { |
|
491 | 491 | $constraint->aspectRatio(); |
492 | 492 | $constraint->upsize(); |
493 | 493 | }); |
@@ -562,7 +562,7 @@ discard block |
||
562 | 562 | |
563 | 563 | return $image_data; |
564 | 564 | } catch (StoreImageException $e) { |
565 | - \Log::error('YeelightImageService: Unable to convert to image [' + (string) $e + ']'); |
|
565 | + \Log::error('YeelightImageService: Unable to convert to image [' +(string) $e + ']'); |
|
566 | 566 | |
567 | 567 | return; |
568 | 568 | } |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | |
577 | 577 | return $is_gif; |
578 | 578 | } catch (StoreImageException $e) { |
579 | - \Log::error('YeelightImageService: Unable to convert to image [' + (string) $e + ']'); |
|
579 | + \Log::error('YeelightImageService: Unable to convert to image [' +(string) $e + ']'); |
|
580 | 580 | |
581 | 581 | return false; |
582 | 582 | } |
@@ -27,12 +27,12 @@ discard block |
||
27 | 27 | 'Content-Disposition' => "attachment; filename=\"$filename\"", |
28 | 28 | ]; |
29 | 29 | |
30 | - response()->stream(function () { |
|
30 | + response()->stream(function() { |
|
31 | 31 | $handle = fopen('php://output', 'w'); |
32 | 32 | |
33 | 33 | $titles = []; |
34 | 34 | |
35 | - $this->chunk(function ($records) use ($handle, &$titles) { |
|
35 | + $this->chunk(function($records) use ($handle, &$titles) { |
|
36 | 36 | if (empty($titles)) { |
37 | 37 | $titles = $this->getHeaderRowFromRecords($records); |
38 | 38 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | public function getHeaderRowFromRecords(Collection $records): array |
61 | 61 | { |
62 | 62 | $titles = collect(array_dot($records->first()->toArray()))->keys()->map( |
63 | - function ($key) { |
|
63 | + function($key) { |
|
64 | 64 | $key = str_replace('.', ' ', $key); |
65 | 65 | |
66 | 66 | return Str::ucfirst($key); |
@@ -21,16 +21,16 @@ discard block |
||
21 | 21 | */ |
22 | 22 | public function export() |
23 | 23 | { |
24 | - Excel::create($this->getTable().date('YmdHis'), function ($excel) { |
|
25 | - $excel->sheet($this->getTable(), function ($sheet) { |
|
24 | + Excel::create($this->getTable().date('YmdHis'), function($excel) { |
|
25 | + $excel->sheet($this->getTable(), function($sheet) { |
|
26 | 26 | $titles = []; |
27 | 27 | |
28 | - $this->chunk(function ($records) use ($sheet, &$titles) { |
|
28 | + $this->chunk(function($records) use ($sheet, &$titles) { |
|
29 | 29 | if (empty($titles)) { |
30 | 30 | $titles = $this->getHeaderRowFromRecords($records); |
31 | 31 | $sheet->prependRow($titles); |
32 | 32 | } |
33 | - $rows = collect($records->toArray())->map(function ($item) { |
|
33 | + $rows = collect($records->toArray())->map(function($item) { |
|
34 | 34 | $return = []; |
35 | 35 | foreach ($item as $in => $it) { |
36 | 36 | if (is_array($it)) { |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | public function getHeaderRowFromRecords(Collection $records): array |
57 | 57 | { |
58 | 58 | $titles = collect(array_dot($records->first()->toArray()))->keys()->map( |
59 | - function ($key) { |
|
59 | + function($key) { |
|
60 | 60 | $key = str_replace('.', ' ', $key); |
61 | 61 | |
62 | 62 | return Str::ucfirst($key); |
@@ -112,7 +112,7 @@ |
||
112 | 112 | protected function initBranchCallback() |
113 | 113 | { |
114 | 114 | if (is_null($this->branchCallback)) { |
115 | - $this->branchCallback = function ($branch) { |
|
115 | + $this->branchCallback = function($branch) { |
|
116 | 116 | $key = $branch[$this->model->getKeyName()]; |
117 | 117 | $title = $branch[$this->model->getTitleColumn()]; |
118 | 118 |
@@ -62,7 +62,7 @@ |
||
62 | 62 | */ |
63 | 63 | public function render() |
64 | 64 | { |
65 | - return $this->tools->map(function ($tool) { |
|
65 | + return $this->tools->map(function($tool) { |
|
66 | 66 | if ($tool instanceof Renderable) { |
67 | 67 | return $tool->render(); |
68 | 68 | } |
@@ -10,5 +10,5 @@ |
||
10 | 10 | protected $rules = [ |
11 | 11 | ValidatorInterface::RULE_CREATE => [], |
12 | 12 | ValidatorInterface::RULE_UPDATE => [], |
13 | - ]; |
|
13 | + ]; |
|
14 | 14 | } |
@@ -10,5 +10,5 @@ |
||
10 | 10 | protected $rules = [ |
11 | 11 | ValidatorInterface::RULE_CREATE => [], |
12 | 12 | ValidatorInterface::RULE_UPDATE => [], |
13 | - ]; |
|
13 | + ]; |
|
14 | 14 | } |
@@ -10,5 +10,5 @@ |
||
10 | 10 | protected $rules = [ |
11 | 11 | ValidatorInterface::RULE_CREATE => [], |
12 | 12 | ValidatorInterface::RULE_UPDATE => [], |
13 | - ]; |
|
13 | + ]; |
|
14 | 14 | } |
@@ -10,5 +10,5 @@ |
||
10 | 10 | protected $rules = [ |
11 | 11 | ValidatorInterface::RULE_CREATE => [], |
12 | 12 | ValidatorInterface::RULE_UPDATE => [], |
13 | - ]; |
|
13 | + ]; |
|
14 | 14 | } |