@@ -62,8 +62,8 @@ discard block |
||
62 | 62 | return; |
63 | 63 | } |
64 | 64 | $filename = preg_replace('~\W~', '.', Descriptor::getTestSignatureUnique($test)); |
65 | - $filename = mb_strcut($filename, 0, 244, 'utf-8') . '.fail.html'; |
|
66 | - $this->_savePageSource($report = codecept_output_dir() . $filename); |
|
65 | + $filename = mb_strcut($filename, 0, 244, 'utf-8').'.fail.html'; |
|
66 | + $this->_savePageSource($report = codecept_output_dir().$filename); |
|
67 | 67 | $test->getMetadata()->addReport('html', $report); |
68 | 68 | } |
69 | 69 | |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | if (preg_match('#^(//|https?://(?!localhost))#', $uri)) { |
174 | 174 | $hostname = parse_url($uri, PHP_URL_HOST); |
175 | 175 | if (!$this->isInternalDomain($hostname)) { |
176 | - throw new ExternalUrlException(get_class($this) . " can't open external URL: " . $uri); |
|
176 | + throw new ExternalUrlException(get_class($this)." can't open external URL: ".$uri); |
|
177 | 177 | } |
178 | 178 | } |
179 | 179 | |
@@ -501,12 +501,12 @@ discard block |
||
501 | 501 | { |
502 | 502 | $crawler = $this->getCrawler()->selectLink($text); |
503 | 503 | if ($crawler->count() === 0) { |
504 | - $this->fail("No links containing text '$text' were found in page " . $this->_getCurrentUri()); |
|
504 | + $this->fail("No links containing text '$text' were found in page ".$this->_getCurrentUri()); |
|
505 | 505 | } |
506 | 506 | if ($url) { |
507 | 507 | $crawler = $crawler->filterXPath(sprintf('.//a[contains(@href, %s)]', Crawler::xpathLiteral($url))); |
508 | 508 | if ($crawler->count() === 0) { |
509 | - $this->fail("No links containing text '$text' and URL '$url' were found in page " . $this->_getCurrentUri()); |
|
509 | + $this->fail("No links containing text '$text' and URL '$url' were found in page ".$this->_getCurrentUri()); |
|
510 | 510 | } |
511 | 511 | } |
512 | 512 | $this->assertTrue(true); |
@@ -517,12 +517,12 @@ discard block |
||
517 | 517 | $crawler = $this->getCrawler()->selectLink($text); |
518 | 518 | if (!$url) { |
519 | 519 | if ($crawler->count() > 0) { |
520 | - $this->fail("Link containing text '$text' was found in page " . $this->_getCurrentUri()); |
|
520 | + $this->fail("Link containing text '$text' was found in page ".$this->_getCurrentUri()); |
|
521 | 521 | } |
522 | 522 | } |
523 | 523 | $crawler = $crawler->filterXPath(sprintf('.//a[contains(@href, %s)]', Crawler::xpathLiteral($url))); |
524 | 524 | if ($crawler->count() > 0) { |
525 | - $this->fail("Link containing text '$text' and URL '$url' was found in page " . $this->_getCurrentUri()); |
|
525 | + $this->fail("Link containing text '$text' and URL '$url' was found in page ".$this->_getCurrentUri()); |
|
526 | 526 | } |
527 | 527 | } |
528 | 528 | |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | $matches = []; |
574 | 574 | $res = preg_match($uri, $this->_getCurrentUri(), $matches); |
575 | 575 | if (!$res) { |
576 | - $this->fail("Couldn't match $uri in " . $this->_getCurrentUri()); |
|
576 | + $this->fail("Couldn't match $uri in ".$this->_getCurrentUri()); |
|
577 | 577 | } |
578 | 578 | if (!isset($matches[1])) { |
579 | 579 | $this->fail("Nothing to grab. A regex parameter required. Ex: '/user/(\\d+)'"); |
@@ -839,7 +839,7 @@ discard block |
||
839 | 839 | |
840 | 840 | $url = $this->getFormUrl($frmCrawl); |
841 | 841 | if (strcasecmp($form->getMethod(), 'GET') === 0) { |
842 | - $url = Uri::mergeUrls($url, '?' . http_build_query($requestParams)); |
|
842 | + $url = Uri::mergeUrls($url, '?'.http_build_query($requestParams)); |
|
843 | 843 | } |
844 | 844 | |
845 | 845 | $url = preg_replace('/#.*/', '', $url); |
@@ -848,7 +848,7 @@ discard block |
||
848 | 848 | $this->debugSection('Method', $form->getMethod()); |
849 | 849 | $this->debugSection('Parameters', $requestParams); |
850 | 850 | |
851 | - $requestParams= $this->getFormPhpValues($requestParams); |
|
851 | + $requestParams = $this->getFormPhpValues($requestParams); |
|
852 | 852 | |
853 | 853 | $this->crawler = $this->clientRequest( |
854 | 854 | $form->getMethod(), |
@@ -1154,7 +1154,7 @@ discard block |
||
1154 | 1154 | public function attachFile($field, $filename) |
1155 | 1155 | { |
1156 | 1156 | $form = $this->getFormFor($field = $this->getFieldByLabelOrCss($field)); |
1157 | - $filePath = codecept_data_dir() . $filename; |
|
1157 | + $filePath = codecept_data_dir().$filename; |
|
1158 | 1158 | if (!file_exists($filePath)) { |
1159 | 1159 | throw new \InvalidArgumentException("File does not exist: $filePath"); |
1160 | 1160 | } |
@@ -1310,7 +1310,7 @@ discard block |
||
1310 | 1310 | { |
1311 | 1311 | foreach ($attributes as $attr => $val) { |
1312 | 1312 | $nodes = $nodes->reduce( |
1313 | - function (Crawler $node) use ($attr, $val) { |
|
1313 | + function(Crawler $node) use ($attr, $val) { |
|
1314 | 1314 | return $node->attr($attr) == $val; |
1315 | 1315 | } |
1316 | 1316 | ); |
@@ -1401,11 +1401,11 @@ discard block |
||
1401 | 1401 | |
1402 | 1402 | $expires = isset($params['expiry']) ? $params['expiry'] : null; // WebDriver compatibility |
1403 | 1403 | $expires = isset($params['expires']) && !$expires ? $params['expires'] : null; |
1404 | - $path = isset($params['path']) ? $params['path'] : null; |
|
1405 | - $domain = isset($params['domain']) ? $params['domain'] : ''; |
|
1406 | - $secure = isset($params['secure']) ? $params['secure'] : false; |
|
1407 | - $httpOnly = isset($params['httpOnly']) ? $params['httpOnly'] : true; |
|
1408 | - $encodedValue = isset($params['encodedValue']) ? $params['encodedValue'] : false; |
|
1404 | + $path = isset($params['path']) ? $params['path'] : null; |
|
1405 | + $domain = isset($params['domain']) ? $params['domain'] : ''; |
|
1406 | + $secure = isset($params['secure']) ? $params['secure'] : false; |
|
1407 | + $httpOnly = isset($params['httpOnly']) ? $params['httpOnly'] : true; |
|
1408 | + $encodedValue = isset($params['encodedValue']) ? $params['encodedValue'] : false; |
|
1409 | 1409 | |
1410 | 1410 | |
1411 | 1411 | |
@@ -1471,7 +1471,7 @@ discard block |
||
1471 | 1471 | $selector = $this->stringifySelector($selector); |
1472 | 1472 | if (!empty($attributes)) { |
1473 | 1473 | $nodes = $this->filterByAttributes($nodes, $attributes); |
1474 | - $selector .= "' with attribute(s) '" . trim(json_encode($attributes), '{}'); |
|
1474 | + $selector .= "' with attribute(s) '".trim(json_encode($attributes), '{}'); |
|
1475 | 1475 | } |
1476 | 1476 | $this->assertDomContains($nodes, $selector); |
1477 | 1477 | } |
@@ -1482,7 +1482,7 @@ discard block |
||
1482 | 1482 | $selector = $this->stringifySelector($selector); |
1483 | 1483 | if (!empty($attributes)) { |
1484 | 1484 | $nodes = $this->filterByAttributes($nodes, $attributes); |
1485 | - $selector .= "' with attribute(s) '" . trim(json_encode($attributes), '{}'); |
|
1485 | + $selector .= "' with attribute(s) '".trim(json_encode($attributes), '{}'); |
|
1486 | 1486 | } |
1487 | 1487 | $this->assertDomNotContains($nodes, $selector); |
1488 | 1488 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $this->config['password'] |
99 | 99 | ); |
100 | 100 | } catch (\MongoConnectionException $e) { |
101 | - throw new ModuleException(__CLASS__, $e->getMessage() . ' while creating Mongo connection'); |
|
101 | + throw new ModuleException(__CLASS__, $e->getMessage().' while creating Mongo connection'); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | // starting with loading dump |
@@ -112,14 +112,14 @@ discard block |
||
112 | 112 | private function validateDump() |
113 | 113 | { |
114 | 114 | if ($this->config['dump'] && ($this->config['cleanup'] or ($this->config['populate']))) { |
115 | - if (!file_exists(Configuration::projectDir() . $this->config['dump'])) { |
|
115 | + if (!file_exists(Configuration::projectDir().$this->config['dump'])) { |
|
116 | 116 | throw new ModuleConfigException( |
117 | 117 | __CLASS__, |
118 | 118 | "File with dump doesn't exist.\n |
119 | 119 | Please, check path for dump file: " . $this->config['dump'] |
120 | 120 | ); |
121 | 121 | } |
122 | - $this->dumpFile = Configuration::projectDir() . $this->config['dump']; |
|
122 | + $this->dumpFile = Configuration::projectDir().$this->config['dump']; |
|
123 | 123 | $this->isDumpFileEmpty = false; |
124 | 124 | |
125 | 125 | if ($this->config['dump_type'] === self::DUMP_TYPE_JS) { |
@@ -171,9 +171,9 @@ discard block |
||
171 | 171 | throw new ModuleConfigException( |
172 | 172 | __CLASS__, |
173 | 173 | '\"dump_type\" must be one of ["' |
174 | - . self::DUMP_TYPE_JS . '", "' |
|
175 | - . self::DUMP_TYPE_MONGODUMP . '", "' |
|
176 | - . self::DUMP_TYPE_MONGODUMP_TAR_GZ . '"].' |
|
174 | + . self::DUMP_TYPE_JS.'", "' |
|
175 | + . self::DUMP_TYPE_MONGODUMP.'", "' |
|
176 | + . self::DUMP_TYPE_MONGODUMP_TAR_GZ.'"].' |
|
177 | 177 | ); |
178 | 178 | } |
179 | 179 | } |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | } |
269 | 269 | |
270 | 270 | $response = $collection->insertOne($data); |
271 | - return (string) $response->getInsertedId(); |
|
271 | + return (string)$response->getInsertedId(); |
|
272 | 272 | } |
273 | 273 | |
274 | 274 | /** |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | 'run_database_seeder' => false, |
129 | 129 | 'database_seeder_class' => '', |
130 | 130 | 'environment_file' => '.env', |
131 | - 'bootstrap' => 'bootstrap' . DIRECTORY_SEPARATOR . 'app.php', |
|
131 | + 'bootstrap' => 'bootstrap'.DIRECTORY_SEPARATOR.'app.php', |
|
132 | 132 | 'root' => '', |
133 | 133 | 'packages' => 'workbench', |
134 | 134 | 'vendor_dir' => 'vendor', |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $projectDir .= $this->config['root']; |
145 | 145 | |
146 | 146 | $this->config['project_dir'] = $projectDir; |
147 | - $this->config['bootstrap_file'] = $projectDir . $this->config['bootstrap']; |
|
147 | + $this->config['bootstrap_file'] = $projectDir.$this->config['bootstrap']; |
|
148 | 148 | |
149 | 149 | parent::__construct($container); |
150 | 150 | } |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | */ |
227 | 227 | private function applicationUsesDatabase() |
228 | 228 | { |
229 | - return ! empty($this->app['config']['database.default']); |
|
229 | + return !empty($this->app['config']['database.default']); |
|
230 | 230 | } |
231 | 231 | |
232 | 232 | /** |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | */ |
253 | 253 | protected function registerAutoloaders() |
254 | 254 | { |
255 | - require $this->config['project_dir'] . $this->config['vendor_dir'] . DIRECTORY_SEPARATOR . 'autoload.php'; |
|
255 | + require $this->config['project_dir'].$this->config['vendor_dir'].DIRECTORY_SEPARATOR.'autoload.php'; |
|
256 | 256 | } |
257 | 257 | |
258 | 258 | /** |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | $rootNamespace = $this->getRootControllerNamespace(); |
562 | 562 | |
563 | 563 | if ($rootNamespace && !(strpos($action, '\\') === 0)) { |
564 | - return $rootNamespace . '\\' . $action; |
|
564 | + return $rootNamespace.'\\'.$action; |
|
565 | 565 | } |
566 | 566 | |
567 | 567 | return trim($action, '\\'); |
@@ -604,11 +604,11 @@ discard block |
||
604 | 604 | return; |
605 | 605 | } |
606 | 606 | |
607 | - if (! $this->app['session']->has($key)) { |
|
607 | + if (!$this->app['session']->has($key)) { |
|
608 | 608 | $this->fail("No session variable with key '$key'"); |
609 | 609 | } |
610 | 610 | |
611 | - if (! is_null($value)) { |
|
611 | + if (!is_null($value)) { |
|
612 | 612 | $this->assertEquals($value, $this->app['session']->get($key)); |
613 | 613 | } |
614 | 614 | } |
@@ -671,7 +671,7 @@ discard block |
||
671 | 671 | { |
672 | 672 | $viewErrorBag = $this->app->make('view')->shared('errors'); |
673 | 673 | if (count($viewErrorBag) > 0) { |
674 | - $this->fail("Found the following form errors: \n\n" . $viewErrorBag->toJson(JSON_PRETTY_PRINT)); |
|
674 | + $this->fail("Found the following form errors: \n\n".$viewErrorBag->toJson(JSON_PRETTY_PRINT)); |
|
675 | 675 | } |
676 | 676 | } |
677 | 677 | |
@@ -723,7 +723,7 @@ discard block |
||
723 | 723 | $this->fail("No form error message for key '$key'\n"); |
724 | 724 | } |
725 | 725 | |
726 | - if (! is_null($expectedErrorMessage)) { |
|
726 | + if (!is_null($expectedErrorMessage)) { |
|
727 | 727 | $this->assertContains($expectedErrorMessage, $viewErrorBag->first($key)); |
728 | 728 | } |
729 | 729 | } |
@@ -765,8 +765,8 @@ discard block |
||
765 | 765 | return; |
766 | 766 | } |
767 | 767 | |
768 | - if (! $guard->attempt($user)) { |
|
769 | - $this->fail("Failed to login with credentials " . json_encode($user)); |
|
768 | + if (!$guard->attempt($user)) { |
|
769 | + $this->fail("Failed to login with credentials ".json_encode($user)); |
|
770 | 770 | } |
771 | 771 | } |
772 | 772 | |
@@ -791,7 +791,7 @@ discard block |
||
791 | 791 | $auth = $auth->guard($guard); |
792 | 792 | } |
793 | 793 | |
794 | - if (! $auth->check()) { |
|
794 | + if (!$auth->check()) { |
|
795 | 795 | $this->fail("There is no authenticated user"); |
796 | 796 | } |
797 | 797 | } |
@@ -864,7 +864,7 @@ discard block |
||
864 | 864 | if (class_exists($table)) { |
865 | 865 | $model = new $table; |
866 | 866 | |
867 | - if (! $model instanceof EloquentModel) { |
|
867 | + if (!$model instanceof EloquentModel) { |
|
868 | 868 | throw new \RuntimeException("Class $table is not an Eloquent model"); |
869 | 869 | } |
870 | 870 | |
@@ -876,7 +876,7 @@ discard block |
||
876 | 876 | try { |
877 | 877 | return $this->app['db']->table($table)->insertGetId($attributes); |
878 | 878 | } catch (\Exception $e) { |
879 | - $this->fail("Could not insert record into table '$table':\n\n" . $e->getMessage()); |
|
879 | + $this->fail("Could not insert record into table '$table':\n\n".$e->getMessage()); |
|
880 | 880 | } |
881 | 881 | } |
882 | 882 | |
@@ -898,10 +898,10 @@ discard block |
||
898 | 898 | public function seeRecord($table, $attributes = []) |
899 | 899 | { |
900 | 900 | if (class_exists($table)) { |
901 | - if (! $this->findModel($table, $attributes)) { |
|
902 | - $this->fail("Could not find $table with " . json_encode($attributes)); |
|
901 | + if (!$this->findModel($table, $attributes)) { |
|
902 | + $this->fail("Could not find $table with ".json_encode($attributes)); |
|
903 | 903 | } |
904 | - } elseif (! $this->findRecord($table, $attributes)) { |
|
904 | + } elseif (!$this->findRecord($table, $attributes)) { |
|
905 | 905 | $this->fail("Could not find matching record in table '$table'"); |
906 | 906 | } |
907 | 907 | } |
@@ -925,7 +925,7 @@ discard block |
||
925 | 925 | { |
926 | 926 | if (class_exists($table)) { |
927 | 927 | if ($this->findModel($table, $attributes)) { |
928 | - $this->fail("Unexpectedly found matching $table with " . json_encode($attributes)); |
|
928 | + $this->fail("Unexpectedly found matching $table with ".json_encode($attributes)); |
|
929 | 929 | } |
930 | 930 | } elseif ($this->findRecord($table, $attributes)) { |
931 | 931 | $this->fail("Unexpectedly found matching record in table '$table'"); |
@@ -952,14 +952,14 @@ discard block |
||
952 | 952 | public function grabRecord($table, $attributes = []) |
953 | 953 | { |
954 | 954 | if (class_exists($table)) { |
955 | - if (! $model = $this->findModel($table, $attributes)) { |
|
956 | - $this->fail("Could not find $table with " . json_encode($attributes)); |
|
955 | + if (!$model = $this->findModel($table, $attributes)) { |
|
956 | + $this->fail("Could not find $table with ".json_encode($attributes)); |
|
957 | 957 | } |
958 | 958 | |
959 | 959 | return $model; |
960 | 960 | } |
961 | 961 | |
962 | - if (! $record = $this->findRecord($table, $attributes)) { |
|
962 | + if (!$record = $this->findRecord($table, $attributes)) { |
|
963 | 963 | $this->fail("Could not find matching record in table '$table'"); |
964 | 964 | } |
965 | 965 | |
@@ -987,12 +987,12 @@ discard block |
||
987 | 987 | if (class_exists($table)) { |
988 | 988 | $currentNum = $this->countModels($table, $attributes); |
989 | 989 | if ($currentNum != $expectedNum) { |
990 | - $this->fail("The number of found $table ($currentNum) does not match expected number $expectedNum with " . json_encode($attributes)); |
|
990 | + $this->fail("The number of found $table ($currentNum) does not match expected number $expectedNum with ".json_encode($attributes)); |
|
991 | 991 | } |
992 | 992 | } else { |
993 | 993 | $currentNum = $this->countRecords($table, $attributes); |
994 | 994 | if ($currentNum != $expectedNum) { |
995 | - $this->fail("The number of found records ($currentNum) does not match expected number $expectedNum in table $table with " . json_encode($attributes)); |
|
995 | + $this->fail("The number of found records ($currentNum) does not match expected number $expectedNum in table $table with ".json_encode($attributes)); |
|
996 | 996 | } |
997 | 997 | } |
998 | 998 | } |
@@ -1015,7 +1015,7 @@ discard block |
||
1015 | 1015 | */ |
1016 | 1016 | public function grabNumRecords($table, $attributes = []) |
1017 | 1017 | { |
1018 | - return class_exists($table)? $this->countModels($table, $attributes) : $this->countRecords($table, $attributes); |
|
1018 | + return class_exists($table) ? $this->countModels($table, $attributes) : $this->countRecords($table, $attributes); |
|
1019 | 1019 | } |
1020 | 1020 | |
1021 | 1021 | /** |
@@ -1046,7 +1046,7 @@ discard block |
||
1046 | 1046 | $query->where($key, $value); |
1047 | 1047 | } |
1048 | 1048 | |
1049 | - return (array) $query->first(); |
|
1049 | + return (array)$query->first(); |
|
1050 | 1050 | } |
1051 | 1051 | |
1052 | 1052 | /** |
@@ -1136,7 +1136,7 @@ discard block |
||
1136 | 1136 | |
1137 | 1137 | return $result; |
1138 | 1138 | } catch (\Exception $e) { |
1139 | - $this->fail("Could not create model: \n\n" . get_class($e) . "\n\n" . $e->getMessage()); |
|
1139 | + $this->fail("Could not create model: \n\n".get_class($e)."\n\n".$e->getMessage()); |
|
1140 | 1140 | } |
1141 | 1141 | } |
1142 | 1142 | |
@@ -1165,7 +1165,7 @@ discard block |
||
1165 | 1165 | try { |
1166 | 1166 | return $this->modelFactory($model, $name, $times)->create($attributes); |
1167 | 1167 | } catch (\Exception $e) { |
1168 | - $this->fail("Could not create model: \n\n" . get_class($e) . "\n\n" . $e->getMessage()); |
|
1168 | + $this->fail("Could not create model: \n\n".get_class($e)."\n\n".$e->getMessage()); |
|
1169 | 1169 | } |
1170 | 1170 | } |
1171 | 1171 | |
@@ -1178,8 +1178,8 @@ discard block |
||
1178 | 1178 | */ |
1179 | 1179 | protected function modelFactory($model, $name, $times = 1) |
1180 | 1180 | { |
1181 | - if (! function_exists('factory')) { |
|
1182 | - throw new ModuleException($this, 'The factory() method does not exist. ' . |
|
1181 | + if (!function_exists('factory')) { |
|
1182 | + throw new ModuleException($this, 'The factory() method does not exist. '. |
|
1183 | 1183 | 'This functionality relies on Laravel model factories, which were introduced in Laravel 5.1.'); |
1184 | 1184 | } |
1185 | 1185 | |
@@ -1213,7 +1213,7 @@ discard block |
||
1213 | 1213 | $server = ReflectionHelper::readPrivateProperty($this->client, 'server'); |
1214 | 1214 | $domain = $server['HTTP_HOST']; |
1215 | 1215 | |
1216 | - return '/^' . str_replace('.', '\.', $domain) . '$/'; |
|
1216 | + return '/^'.str_replace('.', '\.', $domain).'$/'; |
|
1217 | 1217 | } |
1218 | 1218 | |
1219 | 1219 | /** |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | return $this->loadDotEnvFile(); |
45 | 45 | } |
46 | 46 | } catch (\Exception $e) { |
47 | - throw new ConfigurationException("Failed loading params from $paramStorage\n" . $e->getMessage()); |
|
47 | + throw new ConfigurationException("Failed loading params from $paramStorage\n".$e->getMessage()); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | throw new ConfigurationException("Params can't be loaded from `$paramStorage`."); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | throw new ConfigurationException( |
90 | - "`vlucas/phpdotenv` library is required to parse .env files.\n" . |
|
90 | + "`vlucas/phpdotenv` library is required to parse .env files.\n". |
|
91 | 91 | "Please install it via composer: composer require vlucas/phpdotenv" |
92 | 92 | ); |
93 | 93 | } |
@@ -172,16 +172,16 @@ discard block |
||
172 | 172 | */ |
173 | 173 | private function initializeSymfonyCache() |
174 | 174 | { |
175 | - $cache = Configuration::projectDir() . $this->config['var_path'] . DIRECTORY_SEPARATOR . 'bootstrap.php.cache'; |
|
175 | + $cache = Configuration::projectDir().$this->config['var_path'].DIRECTORY_SEPARATOR.'bootstrap.php.cache'; |
|
176 | 176 | if (PHP_VERSION_ID < 70000 && !file_exists($cache)) { |
177 | 177 | throw new ModuleRequireException( |
178 | 178 | __CLASS__, |
179 | - "Symfony bootstrap file not found in $cache\n \n" . |
|
180 | - "Please specify path to bootstrap file using `var_path` config option\n \n" . |
|
181 | - "If you are trying to load bootstrap from a Bundle provide path like:\n \n" . |
|
182 | - "modules:\n enabled:\n" . |
|
183 | - " - Symfony:\n" . |
|
184 | - " var_path: '../../app'\n" . |
|
179 | + "Symfony bootstrap file not found in $cache\n \n". |
|
180 | + "Please specify path to bootstrap file using `var_path` config option\n \n". |
|
181 | + "If you are trying to load bootstrap from a Bundle provide path like:\n \n". |
|
182 | + "modules:\n enabled:\n". |
|
183 | + " - Symfony:\n". |
|
184 | + " var_path: '../../app'\n". |
|
185 | 185 | " app_path: '../../app'" |
186 | 186 | ); |
187 | 187 | } |
@@ -256,8 +256,8 @@ discard block |
||
256 | 256 | */ |
257 | 257 | protected function getKernelClass() |
258 | 258 | { |
259 | - $path = codecept_root_dir() . $this->config['app_path']; |
|
260 | - if (!file_exists(codecept_root_dir() . $this->config['app_path'])) { |
|
259 | + $path = codecept_root_dir().$this->config['app_path']; |
|
260 | + if (!file_exists(codecept_root_dir().$this->config['app_path'])) { |
|
261 | 261 | throw new ModuleRequireException( |
262 | 262 | __CLASS__, |
263 | 263 | "Can't load Kernel from $path.\n" |
@@ -277,9 +277,9 @@ discard block |
||
277 | 277 | } |
278 | 278 | $file = current($results); |
279 | 279 | |
280 | - if (file_exists(codecept_root_dir() . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php')) { |
|
280 | + if (file_exists(codecept_root_dir().'vendor'.DIRECTORY_SEPARATOR.'autoload.php')) { |
|
281 | 281 | // ensure autoloader from this dir is loaded |
282 | - require_once codecept_root_dir() . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; |
|
282 | + require_once codecept_root_dir().'vendor'.DIRECTORY_SEPARATOR.'autoload.php'; |
|
283 | 283 | } |
284 | 284 | |
285 | 285 | require_once $file; |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | $this->debugSection( |
532 | 532 | 'User', |
533 | 533 | $profile->getCollector('security')->getUser() |
534 | - . ' [' . implode(',', $roles) . ']' |
|
534 | + . ' ['.implode(',', $roles).']' |
|
535 | 535 | ); |
536 | 536 | } else { |
537 | 537 | $this->debugSection('User', 'Anonymous'); |
@@ -540,7 +540,7 @@ discard block |
||
540 | 540 | if ($profile->hasCollector('swiftmailer')) { |
541 | 541 | $messages = $profile->getCollector('swiftmailer')->getMessageCount(); |
542 | 542 | if ($messages) { |
543 | - $this->debugSection('Emails', $messages . ' sent'); |
|
543 | + $this->debugSection('Emails', $messages.' sent'); |
|
544 | 544 | } |
545 | 545 | } |
546 | 546 | if ($profile->hasCollector('timer')) { |
@@ -54,10 +54,10 @@ |
||
54 | 54 | { |
55 | 55 | $actor = $this->settings['actor']; |
56 | 56 | if ($this->settings['namespace']) { |
57 | - $actor = $this->settings['namespace'] . '\\' . $actor; |
|
57 | + $actor = $this->settings['namespace'].'\\'.$actor; |
|
58 | 58 | } |
59 | 59 | |
60 | - $ns = $this->getNamespaceHeader($this->settings['namespace'] . '\\' . $this->name); |
|
60 | + $ns = $this->getNamespaceHeader($this->settings['namespace'].'\\'.$this->name); |
|
61 | 61 | |
62 | 62 | $tester = ''; |
63 | 63 | if ($this->settings['actor']) { |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | */ |
303 | 303 | public function amBearerAuthenticated($accessToken) |
304 | 304 | { |
305 | - $this->haveHttpHeader('Authorization', 'Bearer ' . $accessToken); |
|
305 | + $this->haveHttpHeader('Authorization', 'Bearer '.$accessToken); |
|
306 | 306 | } |
307 | 307 | |
308 | 308 | /** |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | $linkEntry, |
525 | 525 | 'linkEntry should contain property "link-param"' |
526 | 526 | ); |
527 | - $values[] = $linkEntry['uri'] . '; ' . $linkEntry['link-param']; |
|
527 | + $values[] = $linkEntry['uri'].'; '.$linkEntry['link-param']; |
|
528 | 528 | } |
529 | 529 | |
530 | 530 | $this->haveHttpHeader('Link', implode(', ', $values)); |
@@ -568,9 +568,9 @@ discard block |
||
568 | 568 | { |
569 | 569 | // allow full url to be requested |
570 | 570 | if (strpos($url, '://') === false) { |
571 | - $url = $this->config['url'] . $url; |
|
571 | + $url = $this->config['url'].$url; |
|
572 | 572 | if ($this->config['url'] && strpos($url, '://') === false && $this->config['url'][0] !== '/') { |
573 | - $url = '/' . $url; |
|
573 | + $url = '/'.$url; |
|
574 | 574 | } |
575 | 575 | } |
576 | 576 | |
@@ -591,7 +591,7 @@ discard block |
||
591 | 591 | $this->debugSection("Request", "$method $url"); |
592 | 592 | $files = []; |
593 | 593 | } else { |
594 | - $this->debugSection("Request", "$method $url " . json_encode($parameters)); |
|
594 | + $this->debugSection("Request", "$method $url ".json_encode($parameters)); |
|
595 | 595 | $files = $this->formatFilesArray($files); |
596 | 596 | } |
597 | 597 | $this->response = (string)$this->connectionModule->_request($method, $url, $parameters, $files); |
@@ -600,7 +600,7 @@ discard block |
||
600 | 600 | if ($this->isBinaryData($requestData)) { |
601 | 601 | $requestData = $this->binaryToDebugString($requestData); |
602 | 602 | } |
603 | - $this->debugSection("Request", "$method $url " . $requestData); |
|
603 | + $this->debugSection("Request", "$method $url ".$requestData); |
|
604 | 604 | $this->response = (string)$this->connectionModule->_request($method, $url, [], $files, [], $parameters); |
605 | 605 | } |
606 | 606 | $printedResponse = $this->response; |
@@ -629,7 +629,7 @@ discard block |
||
629 | 629 | */ |
630 | 630 | protected function binaryToDebugString($data) |
631 | 631 | { |
632 | - return '[binary-data length:' . strlen($data) . ' md5:' . md5($data) . ']'; |
|
632 | + return '[binary-data length:'.strlen($data).' md5:'.md5($data).']'; |
|
633 | 633 | } |
634 | 634 | |
635 | 635 | protected function encodeApplicationJson($method, $parameters) |
@@ -894,7 +894,7 @@ discard block |
||
894 | 894 | $this->assertGreaterThan( |
895 | 895 | 0, |
896 | 896 | (new JsonArray($response))->filterByXPath($xpath)->length, |
897 | - "Received JSON did not match the XPath `$xpath`.\nJson Response: \n" . $response |
|
897 | + "Received JSON did not match the XPath `$xpath`.\nJson Response: \n".$response |
|
898 | 898 | ); |
899 | 899 | } |
900 | 900 | |
@@ -910,7 +910,7 @@ discard block |
||
910 | 910 | $this->assertEquals( |
911 | 911 | 0, |
912 | 912 | (new JsonArray($response))->filterByXPath($xpath)->length, |
913 | - "Received JSON matched the XPath `$xpath`.\nJson Response: \n" . $response |
|
913 | + "Received JSON matched the XPath `$xpath`.\nJson Response: \n".$response |
|
914 | 914 | ); |
915 | 915 | } |
916 | 916 | |
@@ -964,7 +964,7 @@ discard block |
||
964 | 964 | $response = $this->connectionModule->_getResponseContent(); |
965 | 965 | $this->assertNotEmpty( |
966 | 966 | (new JsonArray($response))->filterByJsonPath($jsonPath), |
967 | - "Received JSON did not match the JsonPath `$jsonPath`.\nJson Response: \n" . $response |
|
967 | + "Received JSON did not match the JsonPath `$jsonPath`.\nJson Response: \n".$response |
|
968 | 968 | ); |
969 | 969 | } |
970 | 970 | |
@@ -979,7 +979,7 @@ discard block |
||
979 | 979 | $response = $this->connectionModule->_getResponseContent(); |
980 | 980 | $this->assertEmpty( |
981 | 981 | (new JsonArray($response))->filterByJsonPath($jsonPath), |
982 | - "Received JSON matched the JsonPath `$jsonPath`.\nJson Response: \n" . $response |
|
982 | + "Received JSON matched the JsonPath `$jsonPath`.\nJson Response: \n".$response |
|
983 | 983 | ); |
984 | 984 | } |
985 | 985 | |
@@ -995,8 +995,8 @@ discard block |
||
995 | 995 | $this->assertFalse( |
996 | 996 | $jsonResponseArray->containsArray($json), |
997 | 997 | "Response JSON contains provided JSON\n" |
998 | - . "- <info>" . var_export($json, true) . "</info>\n" |
|
999 | - . "+ " . var_export($jsonResponseArray->toArray(), true) |
|
998 | + . "- <info>".var_export($json, true)."</info>\n" |
|
999 | + . "+ ".var_export($jsonResponseArray->toArray(), true) |
|
1000 | 1000 | ); |
1001 | 1001 | } |
1002 | 1002 |
@@ -11,18 +11,18 @@ discard block |
||
11 | 11 | //require package/bin instead of codecept to avoid printing hashbang line |
12 | 12 | require './vendor/codeception/codeception/package/bin'; |
13 | 13 | die; |
14 | -} elseif (file_exists(__DIR__ . '/vendor/autoload.php')) { |
|
14 | +} elseif (file_exists(__DIR__.'/vendor/autoload.php')) { |
|
15 | 15 | // for phar |
16 | - require_once(__DIR__ . '/vendor/autoload.php'); |
|
17 | -} elseif (file_exists(__DIR__ . '/../../autoload.php')) { |
|
16 | + require_once(__DIR__.'/vendor/autoload.php'); |
|
17 | +} elseif (file_exists(__DIR__.'/../../autoload.php')) { |
|
18 | 18 | //for composer |
19 | - require_once __DIR__ . '/../../autoload.php'; |
|
19 | + require_once __DIR__.'/../../autoload.php'; |
|
20 | 20 | } |
21 | 21 | unset($autoloadFile); |
22 | 22 | |
23 | 23 | // @codingStandardsIgnoreStart |
24 | 24 | |
25 | -include_once __DIR__ . DIRECTORY_SEPARATOR . 'shim.php'; |
|
25 | +include_once __DIR__.DIRECTORY_SEPARATOR.'shim.php'; |
|
26 | 26 | // compat |
27 | 27 | if (PHP_MAJOR_VERSION < 7) { |
28 | 28 | if (false === interface_exists('Throwable', false)) { |
@@ -66,28 +66,28 @@ discard block |
||
66 | 66 | if (!function_exists('codecept_root_dir')) { |
67 | 67 | function codecept_root_dir($appendPath = '') |
68 | 68 | { |
69 | - return \Codeception\Configuration::projectDir() . $appendPath; |
|
69 | + return \Codeception\Configuration::projectDir().$appendPath; |
|
70 | 70 | } |
71 | 71 | } |
72 | 72 | |
73 | 73 | if (!function_exists('codecept_output_dir')) { |
74 | 74 | function codecept_output_dir($appendPath = '') |
75 | 75 | { |
76 | - return \Codeception\Configuration::outputDir() . $appendPath; |
|
76 | + return \Codeception\Configuration::outputDir().$appendPath; |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 | |
80 | 80 | if (!function_exists('codecept_log_dir')) { |
81 | 81 | function codecept_log_dir($appendPath = '') |
82 | 82 | { |
83 | - return \Codeception\Configuration::outputDir() . $appendPath; |
|
83 | + return \Codeception\Configuration::outputDir().$appendPath; |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | |
87 | 87 | if (!function_exists('codecept_data_dir')) { |
88 | 88 | function codecept_data_dir($appendPath = '') |
89 | 89 | { |
90 | - return \Codeception\Configuration::dataDir() . $appendPath; |
|
90 | + return \Codeception\Configuration::dataDir().$appendPath; |
|
91 | 91 | } |
92 | 92 | } |
93 | 93 |
@@ -16,7 +16,7 @@ |
||
16 | 16 | $not = ''; |
17 | 17 | } |
18 | 18 | |
19 | - call_user_func_array(['\PHPUnit\Framework\Assert', 'assert' . $not . $method], $arguments); |
|
19 | + call_user_func_array(['\PHPUnit\Framework\Assert', 'assert'.$not.$method], $arguments); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | protected function assertNot($arguments) |