Skip to content

Commit a5f2d01

Browse files
mabarf3l1x
authored andcommitted
Update coding standard
1 parent 1967a4b commit a5f2d01

File tree

5 files changed

+8
-11
lines changed

5 files changed

+8
-11
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"latte/latte": "~2.5.1",
3131
"nette/application": "^3.0",
3232
"nette/caching": "~2.5.8 || ^3.0",
33-
"ninjify/qa": "^0.8.0",
33+
"ninjify/qa": "^0.10.0",
3434
"phpstan/extension-installer": "^1.0",
3535
"phpstan/phpstan-deprecation-rules": "^0.11",
3636
"phpstan/phpstan-nette": "^0.11",

src/Connector/NetteConnector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public function doRequest($request): Response
5555
if (!$httpRequest instanceof HttpRequest || !$httpResponse instanceof HttpResponse) {
5656
throw new Exception('Contributte\Codeception\DI\HttpExtension is not used or conflicts with another extension.');
5757
}
58+
5859
$httpRequest->reset();
5960
$httpResponse->reset();
6061

src/Http/Request.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,23 +82,15 @@ public function getMethod(): string
8282
*/
8383
public function getPost(?string $key = null)
8484
{
85-
if (func_num_args() === 0) {
86-
return $this->request->getPost();
87-
} else {
88-
return $this->request->getPost($key);
89-
}
85+
return func_num_args() === 0 ? $this->request->getPost() : $this->request->getPost($key);
9086
}
9187

9288
/**
9389
* @return mixed
9490
*/
9591
public function getQuery(?string $key = null)
9692
{
97-
if (func_num_args() === 0) {
98-
return $this->request->getQuery();
99-
} else {
100-
return $this->request->getQuery($key);
101-
}
93+
return func_num_args() === 0 ? $this->request->getQuery() : $this->request->getQuery($key);
10294
}
10395

10496
public function getRawBody(): ?string

src/Module/NetteApplicationModule.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public function seeRedirectTo(string $url): void
6868
if ($this->client->isFollowingRedirects()) {
6969
$this->fail('Method seeRedirectTo only works when followRedirects option is disabled');
7070
}
71+
7172
/** @var NetteDIModule $diModule */
7273
$diModule = $this->getModule(NetteDIModule::class);
7374
$request = $diModule->grabService(IRequest::class);

src/Module/NetteDIModule.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,11 @@ public function useConfigFiles(array $configFiles): void
8484
if ($this->config['newContainerForEachTest'] !== true) {
8585
$this->fail('The useConfigFiles can only be used if the newContainerForEachTest option is set to true.');
8686
}
87+
8788
if ($this->container !== null) {
8889
$this->fail('Can\'t set configFiles after the container is created.');
8990
}
91+
9092
$this->configFiles = $configFiles;
9193
}
9294

@@ -158,6 +160,7 @@ private function clearTempDir(): void
158160
if (is_dir($tempDir)) {
159161
FileSystem::delete(realpath($tempDir));
160162
}
163+
161164
FileSystem::createDir($tempDir);
162165
}
163166

0 commit comments

Comments
 (0)