@@ -118,9 +118,9 @@ |
||
118 | 118 | { |
119 | 119 | static $map = []; |
120 | 120 | if (!isset($map[$key])) { |
121 | - $tagName = 'invalidTag' . (count($map) + 1); |
|
121 | + $tagName = 'invalidTag'.(count($map) + 1); |
|
122 | 122 | $map[$key] = $tagName; |
123 | - codecept_debug($tagName . ' is "' . $key . '"'); |
|
123 | + codecept_debug($tagName.' is "'.$key.'"'); |
|
124 | 124 | } |
125 | 125 | return $map[$key]; |
126 | 126 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | $_SERVER = $request->getServer(); |
86 | 86 | $_SERVER['REQUEST_METHOD'] = strtoupper($request->getMethod()); |
87 | - $_SERVER['REQUEST_URI'] = null === $queryString ? $pathString : $pathString . '?' . $queryString; |
|
87 | + $_SERVER['REQUEST_URI'] = null === $queryString ? $pathString : $pathString.'?'.$queryString; |
|
88 | 88 | |
89 | 89 | $_COOKIE = $request->getCookies(); |
90 | 90 | $_FILES = $this->remapFiles($request->getFiles()); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | } |
118 | 118 | |
119 | 119 | $headers = $response->getHeaders(); |
120 | - $status = (int) $headers->get('Status'); |
|
120 | + $status = (int)$headers->get('Status'); |
|
121 | 121 | |
122 | 122 | $headersProperty = new ReflectionProperty($headers, '_headers'); |
123 | 123 | $headersProperty->setAccessible(true); |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | if ($removeData) { |
189 | 189 | if (!empty($this->sessionId)) { |
190 | 190 | foreach ($this->memory as $key => $value) { |
191 | - if (0 === strpos($key, $this->sessionId . '#')) { |
|
191 | + if (0 === strpos($key, $this->sessionId.'#')) { |
|
192 | 192 | unset($this->memory[$key]); |
193 | 193 | } |
194 | 194 | } |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | */ |
243 | 243 | public function toArray() |
244 | 244 | { |
245 | - return (array) $this->memory; |
|
245 | + return (array)$this->memory; |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | /** |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | private function prepareIndex($index) |
292 | 292 | { |
293 | 293 | if ($this->sessionId) { |
294 | - $key = $this->sessionId . '#' . $index; |
|
294 | + $key = $this->sessionId.'#'.$index; |
|
295 | 295 | } else { |
296 | 296 | $key = $index; |
297 | 297 | } |
@@ -115,19 +115,19 @@ discard block |
||
115 | 115 | */ |
116 | 116 | public function _initialize() |
117 | 117 | { |
118 | - $this->bootstrapFile = Configuration::projectDir() . $this->config['bootstrap']; |
|
118 | + $this->bootstrapFile = Configuration::projectDir().$this->config['bootstrap']; |
|
119 | 119 | |
120 | 120 | if (!file_exists($this->bootstrapFile)) { |
121 | 121 | throw new ModuleConfigException( |
122 | 122 | __CLASS__, |
123 | - "Bootstrap file does not exist in " . $this->config['bootstrap'] . "\n" |
|
123 | + "Bootstrap file does not exist in ".$this->config['bootstrap']."\n" |
|
124 | 124 | . "Please create the bootstrap file that returns Application object\n" |
125 | 125 | . "And specify path to it with 'bootstrap' config\n\n" |
126 | 126 | . "Sample bootstrap: \n\n<?php\n" |
127 | - . '$config = include __DIR__ . "/config.php";' . "\n" |
|
128 | - . 'include __DIR__ . "/loader.php";' . "\n" |
|
129 | - . '$di = new \Phalcon\DI\FactoryDefault();' . "\n" |
|
130 | - . 'include __DIR__ . "/services.php";' . "\n" |
|
127 | + . '$config = include __DIR__ . "/config.php";'."\n" |
|
128 | + . 'include __DIR__ . "/loader.php";'."\n" |
|
129 | + . '$di = new \Phalcon\DI\FactoryDefault();'."\n" |
|
130 | + . 'include __DIR__ . "/services.php";'."\n" |
|
131 | 131 | . 'return new \Phalcon\Mvc\Application($di);' |
132 | 132 | ); |
133 | 133 | } |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | |
173 | 173 | // localize |
174 | 174 | $bootstrap = $this->bootstrapFile; |
175 | - $this->client->setApplication(function () use ($bootstrap) { |
|
175 | + $this->client->setApplication(function() use ($bootstrap) { |
|
176 | 176 | $currentDi = Di::getDefault(); |
177 | 177 | /** @noinspection PhpIncludeInspection */ |
178 | 178 | $application = require $bootstrap; |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | { |
322 | 322 | $record = $this->getModelRecord($model); |
323 | 323 | $res = $record->save($attributes); |
324 | - $field = function ($field) { |
|
324 | + $field = function($field) { |
|
325 | 325 | if (is_array($field)) { |
326 | 326 | return implode(', ', $field); |
327 | 327 | } |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | { |
370 | 370 | $record = $this->findRecord($model, $attributes); |
371 | 371 | if (!$record) { |
372 | - $this->fail("Couldn't find $model with " . json_encode($attributes)); |
|
372 | + $this->fail("Couldn't find $model with ".json_encode($attributes)); |
|
373 | 373 | } |
374 | 374 | $this->debugSection($model, json_encode($record)); |
375 | 375 | } |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | $record = $this->findRecord($model, $attributes); |
393 | 393 | $this->debugSection($model, json_encode($record)); |
394 | 394 | if ($record) { |
395 | - $this->fail("Unexpectedly managed to find $model with " . json_encode($attributes)); |
|
395 | + $this->fail("Unexpectedly managed to find $model with ".json_encode($attributes)); |
|
396 | 396 | } |
397 | 397 | } |
398 | 398 | |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | if ($route instanceof RouteInterface) { |
637 | 637 | $hostName = $route->getHostname(); |
638 | 638 | if (!empty($hostName)) { |
639 | - $internalDomains[] = '/^' . str_replace('.', '\.', $route->getHostname()) . '$/'; |
|
639 | + $internalDomains[] = '/^'.str_replace('.', '\.', $route->getHostname()).'$/'; |
|
640 | 640 | } |
641 | 641 | } |
642 | 642 | } |
@@ -653,6 +653,6 @@ discard block |
||
653 | 653 | $server = ReflectionHelper::readPrivateProperty($this->client, 'server'); |
654 | 654 | $domain = $server['HTTP_HOST']; |
655 | 655 | |
656 | - return '/^' . str_replace('.', '\.', $domain) . '$/'; |
|
656 | + return '/^'.str_replace('.', '\.', $domain).'$/'; |
|
657 | 657 | } |
658 | 658 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | foreach ($this->jsonArray as $array) { |
103 | 103 | $res = $this->typeComparison($array, $jsonType); |
104 | 104 | if ($res !== true) { |
105 | - $msg .= "\n" . $res; |
|
105 | + $msg .= "\n".$res; |
|
106 | 106 | } |
107 | 107 | } |
108 | 108 | if ($msg) { |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | { |
118 | 118 | foreach ($jsonType as $key => $type) { |
119 | 119 | if (!array_key_exists($key, $data)) { |
120 | - return "Key `$key` doesn't exist in " . json_encode($data); |
|
120 | + return "Key `$key` doesn't exist in ".json_encode($data); |
|
121 | 121 | } |
122 | 122 | if (is_array($jsonType[$key])) { |
123 | 123 | $message = $this->typeComparison($data[$key], $jsonType[$key]); |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | { |
203 | 203 | $soap_schema_url = $this->config['schema_url']; |
204 | 204 | $xml = $this->xmlRequest; |
205 | - $call = $xml->createElement('ns:' . $action); |
|
205 | + $call = $xml->createElement('ns:'.$action); |
|
206 | 206 | if ($body) { |
207 | 207 | $bodyXml = SoapUtils::toXml($body); |
208 | 208 | if ($bodyXml->hasChildNodes()) { |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | $response = $this->processExternalRequest($action, $req); |
230 | 230 | } |
231 | 231 | |
232 | - $this->debugSection("Response", (string) $response); |
|
232 | + $this->debugSection("Response", (string)$response); |
|
233 | 233 | $this->xmlResponse = SoapUtils::toXml($response); |
234 | 234 | $this->xmlStructure = null; |
235 | 235 | } |
@@ -76,12 +76,12 @@ |
||
76 | 76 | $output->writeln($this->formatOutput($config)); |
77 | 77 | |
78 | 78 | $output->writeln('<info>Directories</info>:'); |
79 | - $output->writeln("<comment>codecept_root_dir()</comment> " . codecept_root_dir()); |
|
80 | - $output->writeln("<comment>codecept_output_dir()</comment> " . codecept_output_dir()); |
|
81 | - $output->writeln("<comment>codecept_data_dir()</comment> " . codecept_data_dir()); |
|
79 | + $output->writeln("<comment>codecept_root_dir()</comment> ".codecept_root_dir()); |
|
80 | + $output->writeln("<comment>codecept_output_dir()</comment> ".codecept_output_dir()); |
|
81 | + $output->writeln("<comment>codecept_data_dir()</comment> ".codecept_data_dir()); |
|
82 | 82 | $output->writeln(''); |
83 | 83 | |
84 | - $output->writeln("<info>Available suites</info>: " . implode(', ', $suites)); |
|
84 | + $output->writeln("<info>Available suites</info>: ".implode(', ', $suites)); |
|
85 | 85 | |
86 | 86 | foreach ($suites as $suite) { |
87 | 87 | $output->write("Validating suite <bold>$suite</bold>... "); |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | { |
9 | 9 | public function __toString() |
10 | 10 | { |
11 | - return (string) $this->getAction(); |
|
11 | + return (string)$this->getAction(); |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | public function toString($maxLength) |
@@ -18,12 +18,12 @@ discard block |
||
18 | 18 | |
19 | 19 | public function getHtml($highlightColor = '#732E81') |
20 | 20 | { |
21 | - return '<strong>' . $this->getAction() . '</strong>'; |
|
21 | + return '<strong>'.$this->getAction().'</strong>'; |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | public function getPhpCode($maxLength) |
25 | 25 | { |
26 | - return '// ' . $this->getAction(); |
|
26 | + return '// '.$this->getAction(); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function run(ModuleContainer $container = null) |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function amInPath($path) |
41 | 41 | { |
42 | - chdir($this->path = $this->absolutizePath($path) . DIRECTORY_SEPARATOR); |
|
43 | - $this->debug('Moved to ' . getcwd()); |
|
42 | + chdir($this->path = $this->absolutizePath($path).DIRECTORY_SEPARATOR); |
|
43 | + $this->debug('Moved to '.getcwd()); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | return $path; |
59 | 59 | } |
60 | 60 | |
61 | - return $this->path . $path; |
|
61 | + return $this->path.$path; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $lines = preg_split('/\n|\r/', $this->file); |
173 | 173 | |
174 | 174 | $this->assertTrue( |
175 | - (int) $number === count($lines), |
|
175 | + (int)$number === count($lines), |
|
176 | 176 | "The number of new lines does not match with $number" |
177 | 177 | ); |
178 | 178 | } |