Completed
Push — master ( 505018...16cf89 )
by D.
13s
created
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.
src/Collect/ImageCollector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,13 +55,13 @@
 block discarded – undo
55 55
      */
56 56
     public function collect()
57 57
     {
58
-        if(! isset($this->data[$this->url->getWebUrl()])) {
58
+        if (!isset($this->data[$this->url->getWebUrl()])) {
59 59
             $this->data[$this->url->getWebUrl()] = [];
60 60
         }
61 61
 
62 62
         preg_match_all(self::REGEX, $this->content, $media);
63 63
         $data = preg_replace(self::REGEX2, "$3", $media[0]);
64
-        foreach($data as $url) {
64
+        foreach ($data as $url) {
65 65
             $this->data[$this->url->getWebUrl()][] =
66 66
                 UrlUtil::getAbsoluteLink($this->url, $url);
67 67
         }
Please login to merge, or discard this patch.