Completed
Push — 2.0 ( 00ad30...c9bf56 )
by Kirill
03:48 queued 49s
created
server/app/Console/Commands/SphinxDaemon.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 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
 
Please login to merge, or discard this patch.
server/app/GraphQL/Queries/SearchQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 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\GraphQL\Queries;
12 12
 
Please login to merge, or discard this patch.
server/app/GraphQL/Types/SearchResultType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 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\GraphQL\Types;
12 12
 
Please login to merge, or discard this patch.
server/app/Models/DocsPage/DocsPagesSearchRepository.php 1 patch
Spacing   +4 added lines, -4 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\DocsPage;
10 10
 
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
     {
37 37
         return DocsPage::query()
38 38
             ->with('docs')
39
-            ->where('content_source', 'LIKE', '%' . $query . '%')
39
+            ->where('content_source', 'LIKE', '%'.$query.'%')
40 40
             ->take($limit)
41 41
             ->get(['docs_id', 'slug', 'title', 'content_rendered'])
42
-            ->map(function (DocsPage $model) {
42
+            ->map(function(DocsPage $model) {
43 43
                 return $this->transform($model);
44 44
             });
45 45
     }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         $dto->slug = $page->slug;
58 58
         $dto->body = $page->content_rendered;
59 59
 
60
-        $dto->url   = route('docs.show', [
60
+        $dto->url = route('docs.show', [
61 61
             'version' => $page->docs->version,
62 62
             'slug'    => $page->slug,
63 63
         ]);
Please login to merge, or discard this patch.
server/app/Models/Article/ArticlesSearchRepository.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\Models\Article;
10 10
 
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
     public function getSearchResults(string $query, int $limit = 10): Collection
36 36
     {
37 37
         return Article::query()
38
-            ->where('content_source', 'LIKE', '%' . $query . '%')
38
+            ->where('content_source', 'LIKE', '%'.$query.'%')
39 39
             ->take($limit)
40 40
             ->get(['slug', 'title', 'content_rendered'])
41
-            ->map(function (Article $model) {
41
+            ->map(function(Article $model) {
42 42
                 return $this->transform($model);
43 43
             });
44 44
     }
Please login to merge, or discard this patch.
server/app/GraphQL/Serializers/AbstractSerializer.php 1 patch
Spacing   +4 added lines, -4 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\GraphQL\Serializers;
12 12
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      * @param  Collection|Model[]|null $collection
24 24
      * @return Collection
25 25
      */
26
-    public static function collection(?Collection $collection): Collection
26
+    public static function collection(? Collection $collection) : Collection
27 27
     {
28 28
         if ($collection === null) {
29 29
             return new Collection();
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public static function map(): \Closure
52 52
     {
53
-        return function ($model) {
53
+        return function($model) {
54 54
             return static::serialize($model);
55 55
         };
56 56
     }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @param  \DateTime|null $date
69 69
      * @return string
70 70
      */
71
-    protected function formatDateTime(?\DateTime $date): string
71
+    protected function formatDateTime(? \DateTime $date) : string
72 72
     {
73 73
         if ($date === null) {
74 74
             $date = Carbon::now();
Please login to merge, or discard this patch.
server/app/GraphQL/Serializers/SearchResultsSerializer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 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\GraphQL\Serializers;
12 12
 
Please login to merge, or discard this patch.
server/app/Http/Middleware/ApiAuthenticate.php 2 patches
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -10,15 +10,11 @@
 block discarded – undo
10 10
 
11 11
 use App\Models\User;
12 12
 use App\Services\TokenAuth;
13
-use Illuminate\Support\Arr;
14 13
 use Illuminate\Http\Request;
15 14
 use Illuminate\Http\Response;
16 15
 use Illuminate\Contracts\Auth\Guard;
17
-use Tymon\JWTAuth\Exceptions\JWTException;
18 16
 use Illuminate\Contracts\Container\Container;
19
-use Tymon\JWTAuth\Providers\JWT\JWTInterface;
20 17
 use Illuminate\Contracts\Auth\Authenticatable;
21
-use Tymon\JWTAuth\Exceptions\TokenExpiredException;
22 18
 use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
23 19
 use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException;
24 20
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 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\Http\Middleware;
12 12
 
Please login to merge, or discard this patch.
server/app/Services/TokenAuth.php 2 patches
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -9,17 +9,13 @@
 block discarded – undo
9 9
 namespace App\Services;
10 10
 
11 11
 use App\Models\User;
12
-use Carbon\Carbon;
13 12
 use Illuminate\Contracts\Auth\Authenticatable;
14 13
 use Illuminate\Contracts\Auth\Guard;
15
-use Illuminate\Contracts\Encryption\DecryptException;
16
-use Illuminate\Encryption\Encrypter;
17 14
 use Illuminate\Support\Arr;
18 15
 use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
19 16
 use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException;
20 17
 use Tymon\JWTAuth\Exceptions\JWTException;
21 18
 use Tymon\JWTAuth\Exceptions\TokenExpiredException;
22
-use Tymon\JWTAuth\Exceptions\TokenInvalidException;
23 19
 use Tymon\JWTAuth\Providers\JWT\JWTInterface;
24 20
 
25 21
 /**
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 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;
10 10
 
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
      * @param string $password
55 55
      * @return Authenticatable
56 56
      */
57
-    public function attemptFromEmailAndPassword(string $email, string $password): ?Authenticatable
57
+    public function attemptFromEmailAndPassword(string $email, string $password): ? Authenticatable
58 58
     {
59
-        if (! $this->guard->validate(['email' => $email, 'password' => $password])) {
59
+        if (!$this->guard->validate(['email' => $email, 'password' => $password])) {
60 60
             return null;
61 61
         }
62 62
 
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
      * @param string $password
69 69
      * @return Authenticatable
70 70
      */
71
-    public function resolveFromIdAndPassword(int $id, string $password): ?Authenticatable
71
+    public function resolveFromIdAndPassword(int $id, string $password): ? Authenticatable
72 72
     {
73
-        if (! $this->guard->validate(['id' => $id, 'password' => $password])) {
73
+        if (!$this->guard->validate(['id' => $id, 'password' => $password])) {
74 74
             return null;
75 75
         }
76 76
 
@@ -135,14 +135,14 @@  discard block
 block discarded – undo
135 135
         }
136 136
 
137 137
         [$id, $password] = [
138
-            (int)Arr::get($userInfo, 'user.id'),
138
+            (int) Arr::get($userInfo, 'user.id'),
139 139
             Arr::get($userInfo, 'user.password'),
140 140
         ];
141 141
 
142 142
         if ($id !== 0) {
143 143
             $user = User::where('id', $id)->where('password', $password)->first();
144 144
 
145
-            if (! $user) {
145
+            if (!$user) {
146 146
                 throw new UnprocessableEntityHttpException('Invalid user credentials.');
147 147
             }
148 148
 
Please login to merge, or discard this patch.