Passed
Push — 2.4.1 ( fb7497...56370a )
by Hossein
02:37
created
src/SitemapGenerator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
         $this->sitemap = new Sitemap();
47 47
 
48
-        $this->hasCrawled = function (Url $url, ResponseInterface $response = null) {
48
+        $this->hasCrawled = function(Url $url, ResponseInterface $response = null) {
49 49
             return $url;
50 50
         };
51 51
     }
@@ -101,12 +101,12 @@  discard block
 block discarded – undo
101 101
 
102 102
     protected function getCrawlProfile(): Profile
103 103
     {
104
-        $shouldCrawl = function (CrawlerUrl $url) {
104
+        $shouldCrawl = function(CrawlerUrl $url) {
105 105
             if ($url->host !== CrawlerUrl::create($this->urlToBeCrawled)->host) {
106 106
                 return false;
107 107
             }
108 108
 
109
-            if (! is_callable($this->shouldCrawl)) {
109
+            if (!is_callable($this->shouldCrawl)) {
110 110
                 return true;
111 111
             }
112 112
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
     protected function getCrawlObserver(): Observer
120 120
     {
121
-        $performAfterUrlHasBeenCrawled = function (CrawlerUrl $crawlerUrl, ResponseInterface $response = null) {
121
+        $performAfterUrlHasBeenCrawled = function(CrawlerUrl $crawlerUrl, ResponseInterface $response = null) {
122 122
             $sitemapUrl = ($this->hasCrawled)(Url::create($crawlerUrl), $response);
123 123
 
124 124
             if ($sitemapUrl) {
Please login to merge, or discard this patch.
src/SitemapIndex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
      */
44 44
     public function getSitemap(string $url)
45 45
     {
46
-        return collect($this->tags)->first(function (Tag $tag) use ($url) {
46
+        return collect($this->tags)->first(function(Tag $tag) use ($url) {
47 47
             return $tag->getType() === 'sitemap' && $tag->url === $url;
48 48
         });
49 49
     }
Please login to merge, or discard this patch.
src/SitemapServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
         $this->app->when(SitemapGenerator::class)
26 26
             ->needs(Crawler::class)
27
-            ->give(function () {
27
+            ->give(function() {
28 28
                 return Crawler::create(config('sitemap.guzzle_options'));
29 29
             });
30 30
     }
Please login to merge, or discard this patch.
src/Sitemap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      */
42 42
     public function getUrl(string $url)
43 43
     {
44
-        return collect($this->tags)->first(function (Tag $tag) use ($url) {
44
+        return collect($this->tags)->first(function(Tag $tag) use ($url) {
45 45
             return $tag->getType() === 'url' && $tag->url === $url;
46 46
         });
47 47
     }
Please login to merge, or discard this patch.
src/Tags/Url.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,13 +137,13 @@
 block discarded – undo
137 137
     public function segments(int $index = null)
138 138
     {
139 139
         $segments = collect(explode('/', $this->path()))
140
-            ->filter(function ($value) {
140
+            ->filter(function($value) {
141 141
                 return $value !== '';
142 142
             })
143 143
             ->values()
144 144
             ->toArray();
145 145
 
146
-        if (! is_null($index)) {
146
+        if (!is_null($index)) {
147 147
             return $this->segment($index);
148 148
         }
149 149
 
Please login to merge, or discard this patch.