Passed
Branch master (489407)
by Ricardo
02:43
created
hacked-emails/hacked_emails.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 ini_set("memory_limit", "10240M");
3
-require_once __DIR__ . '/../autoloader.php';
3
+require_once __DIR__.'/../autoloader.php';
4 4
 use phpspider\core\requests;
5 5
 use phpspider\core\selector;
6 6
 
Please login to merge, or discard this patch.
autoloader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,17 +48,17 @@
 block discarded – undo
48 48
 
49 49
         if (strpos($name, 'phpspider\\') === 0) 
50 50
         {
51
-            $class_file = __DIR__ . substr($class_path, strlen('phpspider')) . '.php';
51
+            $class_file = __DIR__.substr($class_path, strlen('phpspider')).'.php';
52 52
         }
53 53
         else 
54 54
         {
55 55
             if (self::$_autoload_root_path) 
56 56
             {
57
-                $class_file = self::$_autoload_root_path . DIRECTORY_SEPARATOR . $class_path . '.php';
57
+                $class_file = self::$_autoload_root_path.DIRECTORY_SEPARATOR.$class_path.'.php';
58 58
             }
59 59
             if (empty($class_file) || !is_file($class_file)) 
60 60
             {
61
-                $class_file = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . "$class_path.php";
61
+                $class_file = __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR."$class_path.php";
62 62
             }
63 63
         }
64 64
 
Please login to merge, or discard this patch.
worker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@
 block discarded – undo
7 7
 $gmworker->addFunction("reverse", "reverse_fn");
8 8
 
9 9
 print "Waiting for job...\n";
10
-while($gmworker->work())
10
+while ($gmworker->work())
11 11
 {
12 12
     if ($gmworker->returnCode() != GEARMAN_SUCCESS)
13 13
     {
14
-        echo "return_code: " . $gmworker->returnCode() . "\n";
14
+        echo "return_code: ".$gmworker->returnCode()."\n";
15 15
         break;
16 16
     }
17 17
     //break;
Please login to merge, or discard this patch.
demo/mafengwo.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__ . '/../autoloader.php';
2
+require_once __DIR__.'/../autoloader.php';
3 3
 use phpspider\core\phpspider;
4 4
 use phpspider\core\requests;
5 5
 
@@ -15,11 +15,11 @@  discard block
 block discarded – undo
15 15
         'www.mafengwo.cn'
16 16
     ),
17 17
     'scan_urls' => array(
18
-        "http://www.mafengwo.cn/travel-scenic-spot/mafengwo/10088.html",            // 随便定义一个入口,要不然会报没有入口url错误,但是这里其实没用
18
+        "http://www.mafengwo.cn/travel-scenic-spot/mafengwo/10088.html", // 随便定义一个入口,要不然会报没有入口url错误,但是这里其实没用
19 19
     ),
20 20
     'list_url_regexes' => array(
21
-        "http://www.mafengwo.cn/mdd/base/list/pagedata_citylist\?page=\d+",         // 城市列表页
22
-        "http://www.mafengwo.cn/gonglve/ajax.php\?act=get_travellist\&mddid=\d+",   // 文章列表页
21
+        "http://www.mafengwo.cn/mdd/base/list/pagedata_citylist\?page=\d+", // 城市列表页
22
+        "http://www.mafengwo.cn/gonglve/ajax.php\?act=get_travellist\&mddid=\d+", // 文章列表页
23 23
     ),
24 24
     'content_url_regexes' => array(
25 25
         "http://www.mafengwo.cn/i/\d+.html",
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
 $spider->on_start = function($phpspider) 
57 57
 {
58
-    requests::set_header('Referer','http://www.mafengwo.cn/mdd/citylist/21536.html');
58
+    requests::set_header('Referer', 'http://www.mafengwo.cn/mdd/citylist/21536.html');
59 59
 };
60 60
 
61 61
 $spider->on_scan_page = function($page, $content, $phpspider) 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 {
160 160
     if ($fieldname == 'date') 
161 161
     {
162
-        $data = trim(str_replace(array("出发时间","/"),"", strip_tags($data)));
162
+        $data = trim(str_replace(array("出发时间", "/"), "", strip_tags($data)));
163 163
     }
164 164
     return $data;
165 165
 };
Please login to merge, or discard this patch.
demo/52mnw.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__ . '/../autoloader.php';
2
+require_once __DIR__.'/../autoloader.php';
3 3
 use phpspider\core\phpspider;
4 4
 
5 5
 /* Do NOT delete this comment */
Please login to merge, or discard this patch.
demo/test_requests.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 ini_set("memory_limit", "10240M");
3
-require_once __DIR__ . '/../autoloader.php';
3
+require_once __DIR__.'/../autoloader.php';
4 4
 use phpspider\core\phpspider;
5 5
 use phpspider\core\requests;
6 6
 use phpspider\core\selector;
Please login to merge, or discard this patch.
demo/qiushibaike_task.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__ . '/../autoloader.php';
2
+require_once __DIR__.'/../autoloader.php';
3 3
 use phpspider\core\phpspider;
4 4
 use phpspider\core\util;
5 5
 
@@ -89,17 +89,17 @@  discard block
 block discarded – undo
89 89
         ),
90 90
         array(
91 91
             'name' => "url",
92
-            'selector' => "//div[contains(@class,'author')]//h2",   // 这里随便设置,on_extract_field回调里面会替换
92
+            'selector' => "//div[contains(@class,'author')]//h2", // 这里随便设置,on_extract_field回调里面会替换
93 93
             'required' => true,
94 94
         ),
95 95
         array(
96 96
             'name' => "depth",
97
-            'selector' => "//div[contains(@class,'author')]//h2",   // 这里随便设置,on_extract_field回调里面会替换
97
+            'selector' => "//div[contains(@class,'author')]//h2", // 这里随便设置,on_extract_field回调里面会替换
98 98
             'required' => true,
99 99
         ),
100 100
         array(
101 101
             'name' => "taskid",
102
-            'selector' => "//div[contains(@class,'author')]//h2",   // 这里随便设置,on_extract_field回调里面会替换
102
+            'selector' => "//div[contains(@class,'author')]//h2", // 这里随便设置,on_extract_field回调里面会替换
103 103
             'required' => true,
104 104
         ),
105 105
     ),
Please login to merge, or discard this patch.
demo/qiushibaike_css_selector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__ . '/../autoloader.php';
2
+require_once __DIR__.'/../autoloader.php';
3 3
 use phpspider\core\phpspider;
4 4
 
5 5
 /* Do NOT delete this comment */
Please login to merge, or discard this patch.
demo/qiushibaike.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 //require './vendor/autoload.php';
7 7
 
8 8
 // GitHub下载方式
9
-require_once __DIR__ . '/../autoloader.php';
9
+require_once __DIR__.'/../autoloader.php';
10 10
 use phpspider\core\phpspider;
11 11
 
12 12
 /* Do NOT delete this comment */
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         ),
91 91
         array(
92 92
             'name' => "url",
93
-            'selector' => "//div[contains(@class,'author')]//h2",   // 这里随便设置,on_extract_field回调里面会替换
93
+            'selector' => "//div[contains(@class,'author')]//h2", // 这里随便设置,on_extract_field回调里面会替换
94 94
             'required' => true,
95 95
         ),
96 96
     ),
Please login to merge, or discard this patch.