Completed
Push — feature-laravel-5.4 ( ab4717...46e3ef )
by Kirill
06:46 queued 03:21
created
app/Services/ContentRenderer/LaravelDocsRenderer.php 1 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\ContentRenderer;
10 10
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     private function removeDocumentTitle(): \Closure
46 46
     {
47
-        return function (string $body) {
47
+        return function(string $body) {
48 48
             return preg_replace('/^[\s\n]*?#\s+?.*?\n/isu', '', $body);
49 49
         };
50 50
     }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     private function removeLeadingNavigation(): \Closure
57 57
     {
58
-        return function (string $body) {
58
+        return function(string $body) {
59 59
             /**
60 60
              * TODO This expression are vulnerable: ReDoS-based exploit. Probably we can improve and fix it?
61 61
              * @see https://en.wikipedia.org/wiki/ReDoS
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     {
74 74
         $replacement = '<a href="#" style="display: none;" name="$1"></a>';
75 75
 
76
-        return function (string $body) use ($replacement) {
76
+        return function(string $body) use ($replacement) {
77 77
             return preg_replace('/<a.+?name="(.*?)".*?>.*?<\/a>/isu', $replacement, $body);
78 78
         };
79 79
     }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     private function fixDocsNavigationLinks(): \Closure
87 87
     {
88
-        return function (string $body) {
88
+        return function(string $body) {
89 89
             return $body;
90 90
         };
91 91
     }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     {
99 99
         $pattern = '/<blockquote>\s*<p>\s*{([a-z]+)}\s*(.*?)<\/p>\s*<\/blockquote>/isu';
100 100
 
101
-        return function (string $body) use ($pattern) {
101
+        return function(string $body) use ($pattern) {
102 102
             return preg_replace(
103 103
                 $pattern,
104 104
                 '<blockquote class="quote-$1"><p>$2</p></blockquote>',
Please login to merge, or discard this patch.
app/Services/ContentRenderer/Support/HeadersNormalizer.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\Services\ContentRenderer\Support;
10 10
 
@@ -33,17 +33,17 @@  discard block
 block discarded – undo
33 33
      */
34 34
     protected function normalizeHeaders(): \Closure
35 35
     {
36
-        return function (string $body) {
36
+        return function(string $body) {
37 37
             $delta = $this->getMaxHeaderLevel($body) - $this->maxHeaderLevel;
38 38
 
39
-            return preg_replace_callback('/^(#+)\s+(.*?)\s*$/mius', function (array $matches) use ($delta) {
39
+            return preg_replace_callback('/^(#+)\s+(.*?)\s*$/mius', function(array $matches) use ($delta) {
40 40
                 [$body, $tag, $title] = $matches;
41 41
 
42 42
                 $level = $this->mdTagToLevel($tag);
43 43
                 $level += $delta;
44 44
                 $level = min($this->minHeaderLevel, max($this->maxHeaderLevel, $level));
45 45
 
46
-                return str_repeat('#', $level) . ' ' . $title;
46
+                return str_repeat('#', $level).' '.$title;
47 47
             }, $body);
48 48
         };
49 49
     }
Please login to merge, or discard this patch.
app/Models/DocsPage/SlugObserver.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\DocsPage;
10 10
 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/Models/DocsPage.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;
10 10
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
78 78
      */
79 79
     public static function scopeWhereVersion(Builder $builder, string $version): Builder
80 80
     {
81
-        return $builder->with(['docs' => function (BelongsTo $relation) use ($version) {
81
+        return $builder->with(['docs' => function(BelongsTo $relation) use ($version) {
82 82
             return $relation->where('version', $version);
83 83
         }]);
84 84
     }
Please login to merge, or discard this patch.
app/Services/ContentRenderer/RenderersRepository.php 2 patches
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\Services\ContentRenderer;
12 12
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         $class = $this->get(sprintf('renderers.%s', $name));
51 51
 
52 52
         if ($class === null) {
53
-            throw new \InvalidArgumentException("Renderer ${name} not found");
53
+            throw new \InvalidArgumentException("renderer ${name} not found");
54 54
         }
55 55
 
56 56
         return $class;
Please login to merge, or discard this patch.
app/Console/Commands/ArticlesImport.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
     }
107 107
 
108 108
     /**
109
-     * @return \Generator|Article[]
109
+     * @return \Generator
110 110
      */
111 111
     private function getLatestBotArticles(): \Generator
112 112
     {
Please login to merge, or discard this 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\Console\Commands;
11 11
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
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();
Please login to merge, or discard this patch.
app/Models/Docs.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
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function getTitleAttribute(string $title): string
47 47
     {
48
-        return Str::ucfirst($title) . ' (' . $this->version . ')';
48
+        return Str::ucfirst($title).' ('.$this->version.')';
49 49
     }
50 50
 
51 51
     /**
Please login to merge, or discard this patch.
app/Providers/ContentRendererServiceProvider.php 1 patch
Spacing   +4 added lines, -4 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\Providers;
11 11
 
@@ -33,21 +33,21 @@  discard block
 block discarded – undo
33 33
         $this->app->bind(Parser::class, GithubMarkdown::class);
34 34
 
35 35
         // Repository with all renderers
36
-        $this->app->singleton(RenderersRepository::class, function (Container $app) {
36
+        $this->app->singleton(RenderersRepository::class, function(Container $app) {
37 37
             $config = $app->make(Repository::class)->get('renderers');
38 38
 
39 39
             return new RenderersRepository($app, $config);
40 40
         });
41 41
 
42 42
         // Register default
43
-        $this->app->singleton(ContentRenderInterface::class, function (Container $app) {
43
+        $this->app->singleton(ContentRenderInterface::class, function(Container $app) {
44 44
             return $app->make(RenderersRepository::class)->getDefaultRenderer();
45 45
         });
46 46
 
47 47
         // Tips content renderer
48 48
         $this->app->when(RawTextRenderer::class)
49 49
             ->needs(ContentRenderInterface::class)
50
-            ->give(function () {
50
+            ->give(function() {
51 51
                 return $this->app->make(RenderersRepository::class)
52 52
                     ->getRenderer('raw');
53 53
             });
Please login to merge, or discard this patch.
app/Models/DocsPage/ContentObserver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 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\DocsPage;
11 11
 
Please login to merge, or discard this patch.