@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | * For the full copyright and license information, please view the LICENSE |
| 5 | 5 | * file that was distributed with this source code. |
| 6 | 6 | */ |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace App\Models\DocsPage; |
| 10 | 10 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | public function saving(DocsPage $page): void |
| 23 | 23 | { |
| 24 | - if (! $page->slug) { |
|
| 24 | + if (!$page->slug) { |
|
| 25 | 25 | $page->slug = Str::slug($page->title); |
| 26 | 26 | } |
| 27 | 27 | } |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | * For the full copyright and license information, please view the LICENSE |
| 6 | 6 | * file that was distributed with this source code. |
| 7 | 7 | */ |
| 8 | -declare(strict_types=1); |
|
| 8 | +declare(strict_types = 1); |
|
| 9 | 9 | |
| 10 | 10 | namespace App\Models\DocsPage; |
| 11 | 11 | |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | * For the full copyright and license information, please view the LICENSE |
| 5 | 5 | * file that was distributed with this source code. |
| 6 | 6 | */ |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace App\Models; |
| 10 | 10 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | public function getNav(...$level): Collection |
| 67 | 67 | { |
| 68 | 68 | return $this->nav->whereIn('level', $level) |
| 69 | - ->map(function (array $data) { |
|
| 69 | + ->map(function(array $data) { |
|
| 70 | 70 | return (object) $data; |
| 71 | 71 | }); |
| 72 | 72 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | public static function scopeWhereVersion(Builder $builder, string $version): Builder |
| 80 | 80 | { |
| 81 | - return $builder->whereHas('docs', function (Builder $query) use ($version) { |
|
| 81 | + return $builder->whereHas('docs', function(Builder $query) use ($version) { |
|
| 82 | 82 | return $query->where('version', $version); |
| 83 | 83 | }); |
| 84 | 84 | } |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | * For the full copyright and license information, please view the LICENSE |
| 7 | 7 | * file that was distributed with this source code. |
| 8 | 8 | */ |
| 9 | -declare(strict_types=1); |
|
| 9 | +declare(strict_types = 1); |
|
| 10 | 10 | |
| 11 | 11 | namespace App\Models\Article; |
| 12 | 12 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | */ |
| 24 | 24 | public function creating(Article $article) |
| 25 | 25 | { |
| 26 | - $article->slug = Str::slug($article->title) . '-' . ($this->getElementsLastId() + 1); |
|
| 26 | + $article->slug = Str::slug($article->title).'-'.($this->getElementsLastId() + 1); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | * For the full copyright and license information, please view the LICENSE |
| 7 | 7 | * file that was distributed with this source code. |
| 8 | 8 | */ |
| 9 | -declare(strict_types=1); |
|
| 9 | +declare(strict_types = 1); |
|
| 10 | 10 | |
| 11 | 11 | namespace App\Models\Article; |
| 12 | 12 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | */ |
| 40 | 40 | public function saving(Article $article): void |
| 41 | 41 | { |
| 42 | - if ($article->content_rendered && ! $article->content_source) { |
|
| 42 | + if ($article->content_rendered && !$article->content_source) { |
|
| 43 | 43 | return; |
| 44 | 44 | } |
| 45 | 45 | |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | * For the full copyright and license information, please view the LICENSE |
| 7 | 7 | * file that was distributed with this source code. |
| 8 | 8 | */ |
| 9 | -declare(strict_types=1); |
|
| 9 | +declare(strict_types = 1); |
|
| 10 | 10 | |
| 11 | 11 | namespace App\Models\Article; |
| 12 | 12 | |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | * For the full copyright and license information, please view the LICENSE |
| 7 | 7 | * file that was distributed with this source code. |
| 8 | 8 | */ |
| 9 | -declare(strict_types=1); |
|
| 9 | +declare(strict_types = 1); |
|
| 10 | 10 | |
| 11 | 11 | namespace App\Models\Article; |
| 12 | 12 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | */ |
| 24 | 24 | public function saving(Article $article) |
| 25 | 25 | { |
| 26 | - if (! $article->published_at) { |
|
| 26 | + if (!$article->published_at) { |
|
| 27 | 27 | $article->published_at = Carbon::now(); |
| 28 | 28 | } |
| 29 | 29 | } |
@@ -5,7 +5,7 @@ discard block |
||
| 5 | 5 | * For the full copyright and license information, please view the LICENSE |
| 6 | 6 | * file that was distributed with this source code. |
| 7 | 7 | */ |
| 8 | -declare(strict_types=1); |
|
| 8 | +declare(strict_types = 1); |
|
| 9 | 9 | |
| 10 | 10 | namespace App\Models\Article; |
| 11 | 11 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | public function saving(Article $article): void |
| 39 | 39 | { |
| 40 | 40 | if ($article->content_source) { |
| 41 | - if (! $article->preview_source) { |
|
| 41 | + if (!$article->preview_source) { |
|
| 42 | 42 | $article->preview_source = Str::words($article->content_source, 100, '…'); |
| 43 | 43 | } |
| 44 | 44 | |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | * For the full copyright and license information, please view the LICENSE |
| 7 | 7 | * file that was distributed with this source code. |
| 8 | 8 | */ |
| 9 | -declare(strict_types=1); |
|
| 9 | +declare(strict_types = 1); |
|
| 10 | 10 | |
| 11 | 11 | namespace App\Models; |
| 12 | 12 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | * @param Authenticatable|User|null $user |
| 102 | 102 | * @return bool |
| 103 | 103 | */ |
| 104 | - public function isAllowedForUser(?Authenticatable $user): bool |
|
| 104 | + public function isAllowedForUser(? Authenticatable $user) : bool |
|
| 105 | 105 | { |
| 106 | 106 | $isAuthor = $user === null ? false : ($this->user->id === $user->getAuthIdentifier()); |
| 107 | 107 | |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | return $this->image; |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | - return static::DEFAULT_IMAGE_PATH . $this->image; |
|
| 124 | + return static::DEFAULT_IMAGE_PATH.$this->image; |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | /** |