@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Thinktomorrow\Chief\Fields\Types; |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Thinktomorrow\Chief\Fields\Types; |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Thinktomorrow\Chief\Fields\Types; |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Thinktomorrow\Chief\Fields\Types; |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Thinktomorrow\Chief\Fields\Types; |
4 | 4 |
@@ -20,7 +20,7 @@ |
||
20 | 20 | $this->model = $model; |
21 | 21 | $this->blacklist = $blacklist; |
22 | 22 | |
23 | - $this->slugResolver = function ($slug) { |
|
23 | + $this->slugResolver = function($slug) { |
|
24 | 24 | return Str::slug($slug); |
25 | 25 | }; |
26 | 26 | } |
@@ -39,11 +39,11 @@ |
||
39 | 39 | |
40 | 40 | public static function notAllowedVerb($verb, Manager $manager) |
41 | 41 | { |
42 | - throw new self('Not allowed to '.$verb.' a model. '.ucfirst($verb).' route is not allowed by the ' . $manager->details()->key.' manager.'); |
|
42 | + throw new self('Not allowed to '.$verb.' a model. '.ucfirst($verb).' route is not allowed by the '.$manager->details()->key.' manager.'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | public static function notAllowedPermission($permission, Manager $manager) |
46 | 46 | { |
47 | - throw new self('Not allowed permission for '.$permission.' on a model as managed by the ' . $manager->details()->key.' manager.'); |
|
47 | + throw new self('Not allowed permission for '.$permission.' on a model as managed by the '.$manager->details()->key.' manager.'); |
|
48 | 48 | } |
49 | 49 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | try { |
17 | 17 | DB::beginTransaction(); |
18 | 18 | |
19 | - $invitation = Invitation::make((string) $invitee->id, (string) $inviter->id); |
|
19 | + $invitation = Invitation::make((string)$invitee->id, (string)$inviter->id); |
|
20 | 20 | |
21 | 21 | (new InvitationState($invitation, InvitationState::KEY))->apply('invite'); |
22 | 22 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $files = collect(); |
25 | 25 | |
26 | 26 | foreach ($paths as $path) { |
27 | - if (! $fullpath = self::constructFullPath($path)) { |
|
27 | + if (!$fullpath = self::constructFullPath($path)) { |
|
28 | 28 | continue; |
29 | 29 | } |
30 | 30 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | } |
37 | 37 | } |
38 | 38 | |
39 | - return static::$loadedSnippets = new self($files->map(function (SplFileInfo $file) { |
|
39 | + return static::$loadedSnippets = new self($files->map(function(SplFileInfo $file) { |
|
40 | 40 | $path = $file->getRealPath(); |
41 | 41 | |
42 | 42 | if (0 === strpos($path, resource_path('views')) && false !== strpos($file->getBasename(), '.blade.php')) { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | $key = substr($file->getBasename(), 0, strpos($file->getBasename(), '.')); |
47 | - $label = ucfirst(str_replace(['-','_'], ' ', $key)); |
|
47 | + $label = ucfirst(str_replace(['-', '_'], ' ', $key)); |
|
48 | 48 | |
49 | 49 | return new Snippet($key, $label, $path); |
50 | 50 | })->all()); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | { |
55 | 55 | $loadedSnippets = static::load(); |
56 | 56 | |
57 | - return $loadedSnippets->first(function (Snippet $snippet) use ($key) { |
|
57 | + return $loadedSnippets->first(function(Snippet $snippet) use ($key) { |
|
58 | 58 | return $snippet->key() == $key; |
59 | 59 | }); |
60 | 60 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | public function toClips(): array |
87 | 87 | { |
88 | - return $this->map(function ($snippet) { |
|
88 | + return $this->map(function($snippet) { |
|
89 | 89 | return [$snippet->label(), $snippet->placeholder()]; |
90 | 90 | })->toArray(); |
91 | 91 | } |