Completed
Push — master ( af141c...20507a )
by Zeid
07:11 queued 04:48
created
src/NewsScrapper/Adapters/AbstractAdapter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         
160 160
         $ret = '';
161 161
         $html_crawler->filter('body')->each(
162
-            function (Crawler $node) use (&$ret) {
162
+            function(Crawler $node) use (&$ret) {
163 163
                 $ret = $node->html();
164 164
             }
165 165
         );
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
     protected function getSrcByImgSelector(Crawler $crawler, $selector)
178 178
     {
179 179
         $ret = null;
180
-        $imgExtractClosure = function (Crawler $node) use (&$ret) {
180
+        $imgExtractClosure = function(Crawler $node) use (&$ret) {
181 181
             $ret = $node->attr('src');
182 182
         };
183 183
         if (Selector::isXPath($selector)) {
Please login to merge, or discard this patch.
src/NewsScrapper/Adapters/OpenGraphAdapter.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $crawler->filterXPath("//head/meta[@property='og:image']")
63 63
             ->each(
64 64
                 function(Crawler $node) use (&$ret) {
65
-                    if($this->getCheckSmallImage($node->attr('content')) === false){ //not small image size
65
+                    if ($this->getCheckSmallImage($node->attr('content')) === false) { //not small image size
66 66
                         $ret = $node->attr('content');
67 67
                     }
68 68
                 }
@@ -177,16 +177,16 @@  discard block
 block discarded – undo
177 177
         return $ret;
178 178
     }
179 179
     
180
-    public function getCheckSmallImage($imageUrl){
180
+    public function getCheckSmallImage($imageUrl) {
181 181
 
182 182
         $url_ret = pathinfo($imageUrl);
183 183
         list($width_org, $height_org) = getimagesize(
184 184
             $url_ret['dirname'].'/'.urlencode($url_ret['basename'])
185 185
         );
186 186
 
187
-        if($width_org<200 || $height_org < 200){
187
+        if ($width_org < 200 || $height_org < 200) {
188 188
             return true;
189
-        }else{
189
+        } else {
190 190
             return false;
191 191
         }
192 192
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@
 block discarded – undo
186 186
 
187 187
         if($width_org<200 || $height_org < 200){
188 188
             return true;
189
-        }else{
189
+        } else{
190 190
             return false;
191 191
         }
192 192
     }
Please login to merge, or discard this patch.