Completed
Pull Request — master (#1)
by D.
02:53
created
src/Http/UrlUtil.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public static function getAbsoluteLink(Url $baseUrl, $link)
38 38
     {
39
-        if (! $link) {
39
+        if (!$link) {
40 40
             return $baseUrl->getWebUrl();
41 41
         }
42 42
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      * @return bool
87 87
      */
88 88
     public static function isSingleSlashed($link) {
89
-        return (! self::isDoubleSlashed($link)) && $link[0] === '/';
89
+        return (!self::isDoubleSlashed($link)) && $link[0] === '/';
90 90
     }
91 91
 
92 92
     /**
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      */
105 105
     public static function buildUrl(Url $baseUrl, $partial)
106 106
     {
107
-        return rtrim($baseUrl->getWebUrl(), '/') .'/'. ltrim($partial, '/');
107
+        return rtrim($baseUrl->getWebUrl(), '/').'/'.ltrim($partial, '/');
108 108
     }
109 109
 
110 110
     /**
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public static function addSchema(Url $baseUrl, $partial)
116 116
     {
117
-        return $baseUrl->getSchema() .':'. $partial;
117
+        return $baseUrl->getSchema().':'.$partial;
118 118
     }
119 119
 
120 120
     /**
@@ -124,6 +124,6 @@  discard block
 block discarded – undo
124 124
      */
125 125
     public static function addSchemaAndHost(Url $baseUrl, $partial)
126 126
     {
127
-        return $baseUrl->getSchema() .'://'. $baseUrl->getHost() .'/'. ltrim($partial, '/');
127
+        return $baseUrl->getSchema().'://'.$baseUrl->getHost().'/'.ltrim($partial, '/');
128 128
     }
129 129
 }
130 130
\ No newline at end of file
Please login to merge, or discard this patch.
src/Http/WebResource.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
      */
56 56
     public function getContent()
57 57
     {
58
-        if (! $this->content) {
58
+        if (!$this->content) {
59 59
             $this->content = (string) $this->fetchContent();
60 60
         }
61 61
 
Please login to merge, or discard this patch.
src/Policy/ValidExtensionPolicy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     public function shouldVisit(Url $url)
26 26
     {
27 27
         if (preg_match_all(
28
-                "/" . self::FILTER . "/siU",
28
+                "/".self::FILTER."/siU",
29 29
                 $url->getWebUrl(),
30 30
                 $matches,
31 31
                 PREG_SET_ORDER
Please login to merge, or discard this patch.
src/SiteMapGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
      */
92 92
     public function addUrl($url, $frequency = SiteMapUrl::DAILY, $priority = 0.3)
93 93
     {
94
-        if (! $url instanceof Url) {
94
+        if (!$url instanceof Url) {
95 95
             $url = new Url((string) $url);
96 96
         }
97 97
 
Please login to merge, or discard this patch.
src/Schema/SiteMapUrlCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
      */
96 96
     public function next()
97 97
     {
98
-        $this->index ++;
98
+        $this->index++;
99 99
         //return next($this->elements);
100 100
     }
101 101
 
Please login to merge, or discard this patch.
src/Output/File/FileWriter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      */
27 27
     public function __construct($fileName)
28 28
     {
29
-        $this->fileName = (string)$fileName;
29
+        $this->fileName = (string) $fileName;
30 30
     }
31 31
 
32 32
     /**
Please login to merge, or discard this patch.
src/Output/StdOutputWriter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      */
20 20
     public function write($content)
21 21
     {
22
-        echo $content . "\n";
22
+        echo $content."\n";
23 23
         return true;
24 24
     }
25 25
 }
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
src/Parse/RegexBasedLinkParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
      */
61 61
     private function findAllLinks() {
62 62
         if (empty($this->pages) && preg_match_all(
63
-            "/" . self::REGEX . "/siU",
63
+            "/".self::REGEX."/siU",
64 64
             $this->webPageContent,
65 65
             $matches,
66 66
             PREG_SET_ORDER
Please login to merge, or discard this patch.
src/Crawler.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function setPolicy($key, Policy $policy)
71 71
     {
72
-        $this->policies[(string)$key] = $policy;
72
+        $this->policies[(string) $key] = $policy;
73 73
     }
74 74
 
75 75
     /**
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      */
98 98
     public function setCollector($key, Collector $collector)
99 99
     {
100
-        $this->collectors[(string)$key] = $collector;
100
+        $this->collectors[(string) $key] = $collector;
101 101
     }
102 102
 
103 103
     /**
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function getCollector($key)
110 110
     {
111
-        return isset($this->collectors[(string)$key])
112
-            ? $this->collectors[(string)$key]
111
+        return isset($this->collectors[(string) $key])
112
+            ? $this->collectors[(string) $key]
113 113
             : null;
114 114
     }
115 115
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     {
141 141
         /** @var Policy $policy */
142 142
         foreach ($this->policies as $key => $policy) {
143
-            if (! $policy->shouldVisit($url)) {
143
+            if (!$policy->shouldVisit($url)) {
144 144
                 return false;
145 145
             }
146 146
         }
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
     public function crawl($maxDeep = 1)
196 196
     {
197 197
         $deepness = 0;
198
-        $maxDeep = abs((int)$maxDeep);
198
+        $maxDeep = abs((int) $maxDeep);
199 199
         $linksCollection = array_fill(0, $maxDeep+1, []);
200 200
 
201 201
         $linksCollection[0] = array($this->baseUrl->getWebUrl());
Please login to merge, or discard this patch.