@@ -54,7 +54,7 @@ |
||
54 | 54 | public function isEmpty(): bool |
55 | 55 | { |
56 | 56 | foreach ($this->pipelines as $pipeline) { |
57 | - if (! $pipeline->isFree()) { |
|
57 | + if ( ! $pipeline->isFree()) { |
|
58 | 58 | return false; |
59 | 59 | } |
60 | 60 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Paraunit\Runner; |
5 | 5 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $this->pushToPipeline(); |
79 | 79 | usleep(100); |
80 | 80 | $this->pipelineCollection->triggerProcessTermination(); |
81 | - } while (! $this->pipelineCollection->isEmpty() || ! $this->queuedProcesses->isEmpty()); |
|
81 | + } while ( ! $this->pipelineCollection->isEmpty() || ! $this->queuedProcesses->isEmpty()); |
|
82 | 82 | |
83 | 83 | $this->eventDispatcher->dispatch(EngineEvent::END); |
84 | 84 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | |
115 | 115 | public function pushToPipeline() |
116 | 116 | { |
117 | - while (! $this->queuedProcesses->isEmpty() && $this->pipelineCollection->hasEmptySlots()) { |
|
117 | + while ( ! $this->queuedProcesses->isEmpty() && $this->pipelineCollection->hasEmptySlots()) { |
|
118 | 118 | $this->pipelineCollection->push($this->queuedProcesses->dequeue()); |
119 | 119 | } |
120 | 120 | } |
@@ -297,6 +297,9 @@ |
||
297 | 297 | return $logDirectory; |
298 | 298 | } |
299 | 299 | |
300 | + /** |
|
301 | + * @param string $string |
|
302 | + */ |
|
300 | 303 | private function convertToUtf8($string): string |
301 | 304 | { |
302 | 305 | if (! \mb_detect_encoding($string, 'UTF-8', true)) { |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Paraunit\Parser\JSON; |
5 | 5 | |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | */ |
241 | 241 | private function writeArray($buffer) |
242 | 242 | { |
243 | - array_walk_recursive($buffer, function (&$input) { |
|
243 | + array_walk_recursive($buffer, function(&$input) { |
|
244 | 244 | if (is_string($input)) { |
245 | 245 | $input = $this->convertToUtf8($input); |
246 | 246 | } |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | private function getLogFilename(): string |
267 | 267 | { |
268 | 268 | $logDir = $this->getLogDirectory(); |
269 | - if (! @mkdir($logDir, 0777, true) && ! is_dir($logDir)) { |
|
269 | + if ( ! @mkdir($logDir, 0777, true) && ! is_dir($logDir)) { |
|
270 | 270 | throw new \RuntimeException('Cannot create folder for JSON logs'); |
271 | 271 | } |
272 | 272 | |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | |
300 | 300 | private function convertToUtf8($string): string |
301 | 301 | { |
302 | - if (! \mb_detect_encoding($string, 'UTF-8', true)) { |
|
302 | + if ( ! \mb_detect_encoding($string, 'UTF-8', true)) { |
|
303 | 303 | return \mb_convert_encoding($string, 'UTF-8'); |
304 | 304 | } |
305 | 305 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Paraunit\Printer; |
5 | 5 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Paraunit\Command; |
5 | 5 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | protected function execute(InputInterface $input, OutputInterface $output) |
60 | 60 | { |
61 | - if (! $this->hasChosenCoverageMethod($input)) { |
|
61 | + if ( ! $this->hasChosenCoverageMethod($input)) { |
|
62 | 62 | $coverageMethods = implode(self::COVERAGE_METHODS, ', '); |
63 | 63 | |
64 | 64 | throw new \InvalidArgumentException('You should choose at least one method of coverage output between ' . $coverageMethods); |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Paraunit\Printer; |
5 | 5 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | public function onEngineEnd() |
68 | 68 | { |
69 | - while (! $this->isRowFull()) { |
|
69 | + while ( ! $this->isRowFull()) { |
|
70 | 70 | $this->output->write(' '); |
71 | 71 | ++$this->singleRowCounter; |
72 | 72 | } |