@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | /** @var array $testConfig */ |
4 | -$testConfig = include __DIR__ . '/TestConfig.php'; |
|
4 | +$testConfig = include __DIR__.'/TestConfig.php'; |
|
5 | 5 | |
6 | -require_once __DIR__ . '/../../../test/Bootstrap.php'; |
|
6 | +require_once __DIR__.'/../../../test/Bootstrap.php'; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | * @param array $loadModules |
96 | 96 | * @return array |
97 | 97 | */ |
98 | - public static function generateModuleConfiguration($loadModules=[]) |
|
98 | + public static function generateModuleConfiguration($loadModules = []) |
|
99 | 99 | { |
100 | 100 | $modules = ArrayUtils::merge( |
101 | 101 | static::getRequiredModules(), |
@@ -186,15 +186,15 @@ discard block |
||
186 | 186 | public static function setupCliServerEnv() |
187 | 187 | { |
188 | 188 | $parseUrl = parse_url(substr($_SERVER["REQUEST_URI"], 1)); |
189 | - $route = isset($parseUrl['path']) ? $parseUrl['path']:null; |
|
190 | - if (is_file(__DIR__ . '/' . $route)) { |
|
189 | + $route = isset($parseUrl['path']) ? $parseUrl['path'] : null; |
|
190 | + if (is_file(__DIR__.'/'.$route)) { |
|
191 | 191 | if (substr($route, -4) == ".php") { |
192 | - require __DIR__ . '/' . $route; // Include requested script files |
|
192 | + require __DIR__.'/'.$route; // Include requested script files |
|
193 | 193 | exit; |
194 | 194 | } |
195 | - return false; // Serve file as is |
|
195 | + return false; // Serve file as is |
|
196 | 196 | } else { // Fallback to index.php |
197 | - $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here. |
|
197 | + $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here. |
|
198 | 198 | } |
199 | 199 | return true; |
200 | 200 | } |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | } |
313 | 313 | |
314 | 314 | // setup docker environment |
315 | - if (getenv('DOCKER_ENV')=='yes') { |
|
315 | + if (getenv('DOCKER_ENV') == 'yes') { |
|
316 | 316 | $configuration = ArrayUtils::merge($configuration, static::getDockerEnv($configuration)); |
317 | 317 | } |
318 | 318 | return $configuration; |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | public function __invoke(Job $jobEntity, $options = []) |
79 | 79 | { |
80 | - $options= array_merge($this->options, $options); |
|
80 | + $options = array_merge($this->options, $options); |
|
81 | 81 | |
82 | 82 | $ats = $jobEntity->getAtsMode(); |
83 | 83 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $urlHelper = $this->urlHelper; |
91 | 91 | |
92 | 92 | if ($ats->isIntern() || $ats->isEmail()) { |
93 | - $query = [ 'subscriberUri' => $serverUrlHelper(array()) . '/subscriber/' . 1 ]; |
|
93 | + $query = ['subscriberUri' => $serverUrlHelper(array()).'/subscriber/'.1]; |
|
94 | 94 | $route = 'lang/apply'; |
95 | 95 | $params = [ |
96 | 96 | 'applyId' => $jobEntity->getApplyId(), |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | } |
107 | 107 | |
108 | 108 | if ($options['linkOnly']) { |
109 | - $result=$url; |
|
109 | + $result = $url; |
|
110 | 110 | if ($options['absolute'] && !preg_match('~^https?://~', $url)) { |
111 | 111 | $result = $serverUrlHelper($url); |
112 | 112 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | { |
126 | 126 | foreach ($options as $key=>$val) { |
127 | 127 | if (array_key_exists($this->options, $key)) { |
128 | - $this->options[$key]=$val; |
|
128 | + $this->options[$key] = $val; |
|
129 | 129 | } |
130 | 130 | } |
131 | 131 | } |
@@ -46,8 +46,8 @@ |
||
46 | 46 | { |
47 | 47 | $events = $this->prophesize(EventManagerInterface::class); |
48 | 48 | $events->attach(AbstractWorkerEvent::EVENT_PROCESS_IDLE, [$this->target, 'onIdle'], 1) |
49 | - ->willReturn('handle') |
|
50 | - ->shouldBeCalled(); |
|
49 | + ->willReturn('handle') |
|
50 | + ->shouldBeCalled(); |
|
51 | 51 | |
52 | 52 | $this->target->attach($events->reveal()); |
53 | 53 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | private $target = IdleSleepStrategy::class; |
34 | 34 | |
35 | - private $inheritance = [ AbstractStrategy::class ]; |
|
35 | + private $inheritance = [AbstractStrategy::class]; |
|
36 | 36 | |
37 | 37 | |
38 | 38 | public function testSetDuration() |
@@ -27,5 +27,5 @@ |
||
27 | 27 | |
28 | 28 | private $target = FatalJobException::class; |
29 | 29 | |
30 | - private $inheritance = [ AbstractJobException::class ]; |
|
30 | + private $inheritance = [AbstractJobException::class]; |
|
31 | 31 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | '@testConstruction' => false, |
32 | 32 | ]; |
33 | 33 | |
34 | - private $inheritance = [ JobExceptionInterface::class, \RuntimeException::class ]; |
|
34 | + private $inheritance = [JobExceptionInterface::class, \RuntimeException::class]; |
|
35 | 35 | |
36 | 36 | public function provideConstructionTestData() |
37 | 37 | { |
@@ -41,12 +41,12 @@ |
||
41 | 41 | private $target = [ |
42 | 42 | MongoWorker::class, |
43 | 43 | 'setupConstructorArgs', |
44 | - '@testInheritance' => [ 'as_reflection' => true ] |
|
44 | + '@testInheritance' => ['as_reflection' => true] |
|
45 | 45 | ]; |
46 | 46 | |
47 | 47 | private $eventsMock; |
48 | 48 | |
49 | - private $inheritance = [ AbstractWorker::class ]; |
|
49 | + private $inheritance = [AbstractWorker::class]; |
|
50 | 50 | |
51 | 51 | private function setupConstructorArgs() |
52 | 52 | { |
@@ -30,5 +30,5 @@ |
||
30 | 30 | 'as_reflection' => true, |
31 | 31 | ]; |
32 | 32 | |
33 | - private $inheritance = [ AbstractWorkerController::class ]; |
|
33 | + private $inheritance = [AbstractWorkerController::class]; |
|
34 | 34 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | private $target = MongoQueueControllerFactory::class; |
34 | 34 | |
35 | - private $inheritance = [ FactoryInterface::class ]; |
|
35 | + private $inheritance = [FactoryInterface::class]; |
|
36 | 36 | |
37 | 37 | public function testCreateService() |
38 | 38 | { |