@@ -106,7 +106,7 @@ |
||
106 | 106 | } |
107 | 107 | |
108 | 108 | /** |
109 | - * @return \Generator|Article[] |
|
109 | + * @return \Generator |
|
110 | 110 | */ |
111 | 111 | private function getLatestBotArticles(): \Generator |
112 | 112 | { |
@@ -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\Console\Commands; |
11 | 11 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | private function getLatestBotArticles(): \Generator |
112 | 112 | { |
113 | 113 | $bots = Bot::query() |
114 | - ->with(['articles' => function (MorphMany $relation) { |
|
114 | + ->with(['articles' => function(MorphMany $relation) { |
|
115 | 115 | return $relation->latest('published_at')->take(1); |
116 | 116 | }]) |
117 | 117 | ->get(); |
@@ -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\Services\DataProviders; |
10 | 10 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | $body = $response->getBody(); |
67 | 67 | |
68 | - yield from $this->parseBody((string)$body); |
|
68 | + yield from $this->parseBody((string) $body); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -88,13 +88,13 @@ discard block |
||
88 | 88 | ); |
89 | 89 | |
90 | 90 | ['images' => $imagesPreview, 'body' => $preview] = $this->parseContent( |
91 | - (string)$this->getContentOf($node, 'description') |
|
91 | + (string) $this->getContentOf($node, 'description') |
|
92 | 92 | ); |
93 | 93 | |
94 | 94 | |
95 | - $title = (string)$this->getContentOf($node, 'title'); |
|
96 | - $link = (string)$this->getContentOf($node, 'link'); |
|
97 | - $published = (string)$this->getContentOf($node, 'pubDate'); |
|
95 | + $title = (string) $this->getContentOf($node, 'title'); |
|
96 | + $link = (string) $this->getContentOf($node, 'link'); |
|
97 | + $published = (string) $this->getContentOf($node, 'pubDate'); |
|
98 | 98 | |
99 | 99 | $article = new ExternalArticle($title, trim($content), $link); |
100 | 100 | |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | * @param string $tagName |
134 | 134 | * @return null|string |
135 | 135 | */ |
136 | - private function getContentOf(\DOMElement $root, string $tagName): ?string |
|
136 | + private function getContentOf(\DOMElement $root, string $tagName): ? string |
|
137 | 137 | { |
138 | 138 | $node = $root->getElementsByTagName($tagName); |
139 | 139 |
@@ -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 |