Test Failed
Push — feature-laravel-5.4 ( 475d96...446986 )
by Kirill
07:30
created
app/Models/Article.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@
 block discarded – undo
16 16
 use Illuminate\Database\Eloquent\Model;
17 17
 use Illuminate\Database\Eloquent\Builder;
18 18
 use Illuminate\Contracts\Auth\Authenticatable;
19
-use Illuminate\Database\Eloquent\Relations\BelongsTo;
20 19
 use Illuminate\Database\Eloquent\Relations\BelongsToMany;
21 20
 
22 21
 /**
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
app/Services/DataProviders/LaravelNewsDataProvider.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 
58 58
 
59 59
     /**
60
-     * @return \Generator|ExternalArticle[]
60
+     * @return \Generator
61 61
      * @throws \RuntimeException
62 62
      */
63 63
     private function getArticles(): \Generator
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
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
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
         $body = $response->getBody();
68 68
 
69
-        yield from $this->parseBody((string)$body);
69
+        yield from $this->parseBody((string) $body);
70 70
     }
71 71
 
72 72
     /**
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
             ['images' => $images, 'body' => $content] = $parsed;
90 90
 
91 91
             $article = new ExternalArticle(
92
-                (string)$this->getContentOf($node, 'title'),
92
+                (string) $this->getContentOf($node, 'title'),
93 93
                 trim($content),
94
-                (string)$this->getContentOf($node, 'link')
94
+                (string) $this->getContentOf($node, 'link')
95 95
             );
96 96
 
97 97
             foreach ($images as $image) {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             }
100 100
 
101 101
             $article->setCreatedAt(Carbon::parse(
102
-                (string)$this->getContentOf($node, 'pubDate')
102
+                (string) $this->getContentOf($node, 'pubDate')
103 103
             ));
104 104
 
105 105
             yield $article;
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      * @param string      $tagName
131 131
      * @return null|string
132 132
      */
133
-    private function getContentOf(\DOMElement $root, string $tagName): ?string
133
+    private function getContentOf(\DOMElement $root, string $tagName): ? string
134 134
     {
135 135
         $node = $root->getElementsByTagName($tagName);
136 136
 
Please login to merge, or discard this patch.
app/Services/DataProviders/Manager.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     }
68 68
 
69 69
     /**
70
-     * @return \Generator|DataProviderInterface[]
70
+     * @return \Generator
71 71
      */
72 72
     public function getIterator(): \Generator
73 73
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
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
 
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
      */
60 60
     public function get(string $alias): DataProviderInterface
61 61
     {
62
-        if (! array_key_exists($alias, $this->providers)) {
63
-            throw new \InvalidArgumentException($alias . ' data provider does not exists.');
62
+        if (!array_key_exists($alias, $this->providers)) {
63
+            throw new \InvalidArgumentException($alias.' data provider does not exists.');
64 64
         }
65 65
 
66 66
         return $this->providers[$alias];
Please login to merge, or discard this patch.
app/Models/Article/ContentPreviewObserver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
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
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             return;
45 45
         }
46 46
 
47
-        if (! $article->preview_source) {
47
+        if (!$article->preview_source) {
48 48
             $article->preview_source = Str::words($article->content_source, 100, '…');
49 49
         }
50 50
 
Please login to merge, or discard this patch.
app/Models/Bot.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
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
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function getAvatarAttribute(string $avatar): string
36 36
     {
37
-        return self::DEFAULT_AVATAR_PATH . $avatar;
37
+        return self::DEFAULT_AVATAR_PATH.$avatar;
38 38
     }
39 39
 
40 40
     /**
Please login to merge, or discard this patch.
app/Services/DataProviders/DataProviderInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Services/DataProviders/ExternalArticle.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Console/Commands/DataProvidersImport.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
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\Console\Commands;
12 12
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             ->latest('published_at')
54 54
             ->first();
55 55
 
56
-        $articles = (array)($a ?? []);
56
+        $articles = (array) ($a ?? []);
57 57
 
58 58
         /** @var Article $article */
59 59
         foreach ($articles as $article) {
Please login to merge, or discard this patch.
app/Providers/DataProviderServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
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\Providers;
10 10
 
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
 {
21 21
     public function register(): void
22 22
     {
23
-        $this->app->singleton(Manager::class, function (Application $app) {
23
+        $this->app->singleton(Manager::class, function(Application $app) {
24 24
             $config = $app->make(Repository::class);
25
-            $providers = (array)$config->get('data-providers.providers', []);
25
+            $providers = (array) $config->get('data-providers.providers', []);
26 26
 
27 27
             return new Manager($providers, $app);
28 28
         });
Please login to merge, or discard this patch.