Test Setup Failed
Push — issue/226 ( 34d897...2e3c1c )
by Tomas Norre
05:49
created
cli/crawler_multiprocess.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,5 +9,5 @@
 block discarded – undo
9 9
 try {
10 10
     $processManager->multiProcess($timeout);
11 11
 } catch (Exception $e) {
12
-    echo PHP_EOL . $e->getMessage();
12
+    echo PHP_EOL.$e->getMessage();
13 13
 }
Please login to merge, or discard this patch.
Classes/Utility/HookUtility.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,17 +45,17 @@
 block discarded – undo
45 45
     public static function registerHooks($extKey)
46 46
     {
47 47
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['connectToDB']['tx_crawler'] =
48
-            TsfeHook::class . '->fe_init';
48
+            TsfeHook::class.'->fe_init';
49 49
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['initFEuser']['tx_crawler'] =
50
-            TsfeHook::class . '->fe_feuserInit';
50
+            TsfeHook::class.'->fe_feuserInit';
51 51
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['isOutputting']['tx_crawler'] =
52
-            TsfeHook::class . '->fe_isOutputting';
52
+            TsfeHook::class.'->fe_isOutputting';
53 53
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_eofe']['tx_crawler'] =
54
-            TsfeHook::class . '->fe_eofe';
54
+            TsfeHook::class.'->fe_eofe';
55 55
 
56 56
         // Activating NC Static File Cache hook
57 57
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['nc_staticfilecache/class.tx_ncstaticfilecache.php']['createFile_initializeVariables']['tx_crawler'] =
58
-            StaticFileCacheCreateUriHook::class . '->initialize';
58
+            StaticFileCacheCreateUriHook::class.'->initialize';
59 59
 
60 60
         // Activating Crawler cli_hooks
61 61
         $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$extKey]['cli_hooks'][] =
Please login to merge, or discard this patch.
Classes/Hooks/StaticFileCacheCreateUriHook.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,9 +67,9 @@
 block discarded – undo
67 67
             $speakingUri = $frontend->cObj->typoLink_URL(['parameter' => $matches[1], 'additionalParams' => $matches[2]]);
68 68
             $speakingUriParts = parse_url($speakingUri);
69 69
             if (false === $speakingUriParts) {
70
-                throw new \Exception('Could not parse URI: ' . $speakingUri, 1289915976);
70
+                throw new \Exception('Could not parse URI: '.$speakingUri, 1289915976);
71 71
             }
72
-            $speakingUrlPath = '/' . ltrim($speakingUriParts['path'], '/');
72
+            $speakingUrlPath = '/'.ltrim($speakingUriParts['path'], '/');
73 73
             // Don't change anything if speaking URL is part of old URI:
74 74
             // (it might be the case the using the speaking URL failed)
75 75
             if (strpos($uri, $speakingUrlPath) !== 0 || $speakingUrlPath === '/') {
Please login to merge, or discard this patch.
Classes/Hooks/ProcessCleanUpHook.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -70,14 +70,14 @@  discard block
 block discarded – undo
70 70
         $results = $this->getDatabaseConnection()->exec_SELECTgetRows(
71 71
             'process_id, system_process_id',
72 72
             'tx_crawler_process',
73
-            'ttl <= ' . intval(time() - $this->extensionSettings['processMaxRunTime'] - 3600) . ' AND active = 1'
73
+            'ttl <= '.intval(time() - $this->extensionSettings['processMaxRunTime'] - 3600).' AND active = 1'
74 74
         );
75 75
 
76 76
         if (!is_array($results)) {
77 77
             return;
78 78
         }
79 79
         foreach ($results as $result) {
80
-            $systemProcessId = (int)$result['system_process_id'];
80
+            $systemProcessId = (int) $result['system_process_id'];
81 81
             $processId = $result['process_id'];
82 82
             if ($systemProcessId > 1) {
83 83
                 if ($this->doProcessStillExists($systemProcessId)) {
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $results = $this->getDatabaseConnection()->exec_SELECTgetRows(
99 99
             'process_id, system_process_id',
100 100
             'tx_crawler_process',
101
-            'ttl <= ' . intval(time() - $this->extensionSettings['processMaxRunTime']) . ' AND active = 1'
101
+            'ttl <= '.intval(time() - $this->extensionSettings['processMaxRunTime']).' AND active = 1'
102 102
         );
103 103
 
104 104
         if (!is_array($results)) {
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         }
107 107
         foreach ($results as $result) {
108 108
             $processExists = false;
109
-            $systemProcessId = (int)$result['system_process_id'];
109
+            $systemProcessId = (int) $result['system_process_id'];
110 110
             $processId = $result['process_id'];
111 111
             if ($systemProcessId > 1) {
112 112
                 $dispatcherProcesses = $this->findDispatcherProcesses();
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                 }
117 117
                 foreach ($dispatcherProcesses as $process) {
118 118
                     $responseArray = $this->createResponseArray($process);
119
-                    if ($systemProcessId === (int)$responseArray[1]) {
119
+                    if ($systemProcessId === (int) $responseArray[1]) {
120 120
                         $processExists = true;
121 121
                     };
122 122
                 }
@@ -138,12 +138,12 @@  discard block
 block discarded – undo
138 138
     {
139 139
         $this->getDatabaseConnection()->exec_DELETEquery(
140 140
             'tx_crawler_process',
141
-            'process_id = ' . $this->getDatabaseConnection()->fullQuoteStr($processId, 'tx_crawler_process')
141
+            'process_id = '.$this->getDatabaseConnection()->fullQuoteStr($processId, 'tx_crawler_process')
142 142
         );
143 143
 
144 144
         $this->getDatabaseConnection()->exec_UPDATEquery(
145 145
             'tx_crawler_queue',
146
-            'process_id = ' . $this->getDatabaseConnection()->fullQuoteStr($processId, 'tx_crawler_queue'),
146
+            'process_id = '.$this->getDatabaseConnection()->fullQuoteStr($processId, 'tx_crawler_queue'),
147 147
             ['process_id' => '']
148 148
         );
149 149
     }
@@ -177,12 +177,12 @@  discard block
 block discarded – undo
177 177
         $doProcessStillExists = false;
178 178
         if (!$this->isOsWindows()) {
179 179
             // Not windows
180
-            if (file_exists('/proc/' . $pid)) {
180
+            if (file_exists('/proc/'.$pid)) {
181 181
                 $doProcessStillExists = true;
182 182
             }
183 183
         } else {
184 184
             // Windows
185
-            exec('tasklist | find "' . $pid . '"', $returnArray, $returnValue);
185
+            exec('tasklist | find "'.$pid.'"', $returnArray, $returnValue);
186 186
             if (count($returnArray) > 0 && preg_match('/php/i', $returnValue[0])) {
187 187
                 $doProcessStillExists = true;
188 188
             }
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             posix_kill($pid, 9);
205 205
         } else {
206 206
             // Windows
207
-            exec('taskkill /PID ' . $pid);
207
+            exec('taskkill /PID '.$pid);
208 208
         }
209 209
     }
210 210
 
Please login to merge, or discard this patch.
Classes/Task/FlushQueueTaskAdditionalFieldProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,10 +59,10 @@
 block discarded – undo
59 59
         }
60 60
 
61 61
         $fieldId = 'mode';
62
-        $fieldCode = '<select name="tx_scheduler[mode]" id="' . $fieldId . '" value="' . htmlentities($taskInfo['mode']) . '" class="form-control">'
63
-            . '<option value="all"' . ($taskInfo['mode'] == 'all' ? ' selected="selected"' : '') . '>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_flush.modeAll') . '</option>'
64
-            . '<option value="finished"' . ($taskInfo['mode'] == 'finished' ? ' selected="selected"' : '') . '>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_flush.modeFinished') . '</option>'
65
-            . '<option value="pending"' . ($taskInfo['mode'] == 'pending' ? ' selected="selected"' : '') . '>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_flush.modePending') . '</option>'
62
+        $fieldCode = '<select name="tx_scheduler[mode]" id="'.$fieldId.'" value="'.htmlentities($taskInfo['mode']).'" class="form-control">'
63
+            . '<option value="all"'.($taskInfo['mode'] == 'all' ? ' selected="selected"' : '').'>'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_flush.modeAll').'</option>'
64
+            . '<option value="finished"'.($taskInfo['mode'] == 'finished' ? ' selected="selected"' : '').'>'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_flush.modeFinished').'</option>'
65
+            . '<option value="pending"'.($taskInfo['mode'] == 'pending' ? ' selected="selected"' : '').'>'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_flush.modePending').'</option>'
66 66
             . '</select>';
67 67
 
68 68
         $additionalFields[$fieldId] = [
Please login to merge, or discard this patch.
Classes/Task/CrawlerTaskAdditionalFieldProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -81,21 +81,21 @@
 block discarded – undo
81 81
 
82 82
         // input for sleepTime
83 83
         $fieldId = 'task_sleepTime';
84
-        $fieldCode = '<input type="text" name="tx_scheduler[sleepTime]" id="' . $fieldId . '" value="' . htmlentities($taskInfo['sleepTime']) . '" class="form-control" />';
84
+        $fieldCode = '<input type="text" name="tx_scheduler[sleepTime]" id="'.$fieldId.'" value="'.htmlentities($taskInfo['sleepTime']).'" class="form-control" />';
85 85
         $additionalFields[$fieldId] = [
86 86
             'code' => $fieldCode,
87 87
             'label' => 'LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_im.sleepTime'
88 88
         ];
89 89
         // input for sleepAfterFinish
90 90
         $fieldId = 'task_sleepAfterFinish';
91
-        $fieldCode = '<input type="text" name="tx_scheduler[sleepAfterFinish]" id="' . $fieldId . '" value="' . htmlentities($taskInfo['sleepAfterFinish']) . '" class="form-control" />';
91
+        $fieldCode = '<input type="text" name="tx_scheduler[sleepAfterFinish]" id="'.$fieldId.'" value="'.htmlentities($taskInfo['sleepAfterFinish']).'" class="form-control" />';
92 92
         $additionalFields[$fieldId] = [
93 93
             'code' => $fieldCode,
94 94
             'label' => 'LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_im.sleepAfterFinish'
95 95
         ];
96 96
         // input for countInARun
97 97
         $fieldId = 'task_countInARun';
98
-        $fieldCode = '<input type="text" name="tx_scheduler[countInARun]" id="' . $fieldId . '" value="' . htmlentities($taskInfo['countInARun']) . '" class="form-control" />';
98
+        $fieldCode = '<input type="text" name="tx_scheduler[countInARun]" id="'.$fieldId.'" value="'.htmlentities($taskInfo['countInARun']).'" class="form-control" />';
99 99
         $additionalFields[$fieldId] = [
100 100
             'code' => $fieldCode,
101 101
             'label' => 'LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_im.countInARun'
Please login to merge, or discard this patch.
Classes/Task/CrawlMultiProcessTaskAdditionalFieldProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 
62 62
         // input for timeOut
63 63
         $fieldId = 'task_timeOut';
64
-        $fieldCode = '<input type="text" name="tx_scheduler[timeOut]" id="' . $fieldId . '" value="' . htmlentities($taskInfo['timeOut']) . '" class="form-control" />';
64
+        $fieldCode = '<input type="text" name="tx_scheduler[timeOut]" id="'.$fieldId.'" value="'.htmlentities($taskInfo['timeOut']).'" class="form-control" />';
65 65
         $additionalFields[$fieldId] = [
66 66
             'code' => $fieldCode,
67 67
             'label' => 'LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_im.timeOut'
Please login to merge, or discard this patch.
cli/bootstrap.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -12,12 +12,12 @@  discard block
 block discarded – undo
12 12
 if (!isAbsPath($tempPathThisScript)) {
13 13
     $workingDirectory = $_SERVER['PWD'] ? $_SERVER['PWD'] : getcwd();
14 14
     if ($workingDirectory) {
15
-        $tempPathThisScript = $workingDirectory . '/' . preg_replace('/\.\//', '', $tempPathThisScript);
15
+        $tempPathThisScript = $workingDirectory.'/'.preg_replace('/\.\//', '', $tempPathThisScript);
16 16
         if (!@is_file($tempPathThisScript)) {
17
-            die('Relative path found, but an error occured during resolving of the absolute path: ' . $tempPathThisScript . PHP_EOL);
17
+            die('Relative path found, but an error occured during resolving of the absolute path: '.$tempPathThisScript.PHP_EOL);
18 18
         }
19 19
     } else {
20
-        die('Relative path found, but resolving absolute path is not supported on this platform.' . PHP_EOL);
20
+        die('Relative path found, but resolving absolute path is not supported on this platform.'.PHP_EOL);
21 21
     }
22 22
 }
23 23
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             list($key, $value) = explode(':', $additionalHeader, 2);
34 34
             $key = str_replace('-', '_', strtoupper(trim($key)));
35 35
             if ($key != 'HOST') {
36
-                $_SERVER['HTTP_' . $key] = $value;
36
+                $_SERVER['HTTP_'.$key] = $value;
37 37
             }
38 38
         }
39 39
     }
@@ -54,18 +54,18 @@  discard block
 block discarded – undo
54 54
 $typo3SitePath = $_SERVER['argv'][1];
55 55
 
56 56
     // faking the environment
57
-$_SERVER['DOCUMENT_ROOT'] = preg_replace('#' . preg_quote($typo3SitePath, '#') . '$#', '', $typo3Root);
57
+$_SERVER['DOCUMENT_ROOT'] = preg_replace('#'.preg_quote($typo3SitePath, '#').'$#', '', $typo3Root);
58 58
 $_SERVER['HTTP_USER_AGENT'] = 'CLI Mode';
59 59
 $_SERVER['HTTP_HOST'] = $_SERVER['SERVER_NAME'] = $urlParts['host'];
60
-$_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'] = $typo3SitePath . 'index.php';
61
-$_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED'] = $typo3Root . 'index.php';
60
+$_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'] = $typo3SitePath.'index.php';
61
+$_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED'] = $typo3Root.'index.php';
62 62
 $_SERVER['QUERY_STRING'] = (isset($urlParts['query']) ? $urlParts['query'] : '');
63
-$_SERVER['REQUEST_URI'] = $urlParts['path'] . (isset($urlParts['query']) ? '?' . $urlParts['query'] : '');
63
+$_SERVER['REQUEST_URI'] = $urlParts['path'].(isset($urlParts['query']) ? '?'.$urlParts['query'] : '');
64 64
 $_SERVER['REQUEST_METHOD'] = 'GET';
65 65
 
66 66
     // Define a port if used in the URL:
67 67
 if (isset($urlParts['port'])) {
68
-    $_SERVER['HTTP_HOST'] .= ':' . $urlParts['port'];
68
+    $_SERVER['HTTP_HOST'] .= ':'.$urlParts['port'];
69 69
     $_SERVER['SERVER_PORT'] = $urlParts['port'];
70 70
 }
71 71
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 }
76 76
 
77 77
 chdir($typo3Root);
78
-include($typo3Root . '/index.php');
78
+include($typo3Root.'/index.php');
79 79
 
80 80
 /**
81 81
  * Checks if the $path is absolute or relative (detecting either '/' or 'x:/' as first part of string) and returns TRUE if so.
Please login to merge, or discard this patch.
Classes/Utility/SchedulerUtility.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -45,36 +45,36 @@
 block discarded – undo
45 45
     {
46 46
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['AOE\\Crawler\\Task\\CrawlerQueueTask'] = [
47 47
             'extension' => $extKey,
48
-            'title' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_im.name',
49
-            'description' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_im.description',
48
+            'title' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_im.name',
49
+            'description' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_im.description',
50 50
             'additionalFields' => CrawlerQueueTaskAdditionalFieldProvider::class
51 51
         ];
52 52
 
53 53
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['AOE\\Crawler\\Task\\CrawlerTask'] = [
54 54
             'extension' => $extKey,
55
-            'title' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_crawl.name',
56
-            'description' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_crawl.description',
55
+            'title' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_crawl.name',
56
+            'description' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_crawl.description',
57 57
             'additionalFields' => CrawlerTaskAdditionalFieldProvider::class
58 58
         ];
59 59
 
60 60
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['AOE\\Crawler\\Task\\CrawlMultiProcessTask'] = [
61 61
             'extension' => $extKey,
62
-            'title' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_crawlMultiProcess.name',
63
-            'description' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_crawl.description',
62
+            'title' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_crawlMultiProcess.name',
63
+            'description' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_crawl.description',
64 64
             'additionalFields' => CrawlMultiProcessTaskAdditionalFieldProvider::class
65 65
         ];
66 66
 
67 67
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['AOE\\Crawler\\Task\\FlushQueueTask'] = [
68 68
             'extension' => $extKey,
69
-            'title' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_flush.name',
70
-            'description' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_flush.description',
69
+            'title' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_flush.name',
70
+            'description' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_flush.description',
71 71
             'additionalFields' => FlushQueueTaskAdditionalFieldProvider::class
72 72
         ];
73 73
 
74 74
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['AOE\\Crawler\\Task\\ProcessCleanupTask'] = [
75 75
             'extension' => $extKey,
76
-            'title' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_processCleanup.name',
77
-            'description' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_processCleanup.description',
76
+            'title' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_processCleanup.name',
77
+            'description' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_processCleanup.description',
78 78
         ];
79 79
     }
80 80
 }
Please login to merge, or discard this patch.