@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Suilven\PHPTravisEnhancer; |
| 4 | 4 | |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Suilven\PHPTravisEnhancer\Abstraction; |
| 4 | 4 | |
@@ -30,26 +30,26 @@ discard block |
||
| 30 | 30 | $foundExisting = $helper->checkForExistingInEnv($yamlAsArray, $this->getFlag()); |
| 31 | 31 | if (!$foundExisting) { |
| 32 | 32 | // add a matrix entry |
| 33 | - $yamlAsArray['matrix']['include'][] = [ |
|
| 33 | + $yamlAsArray[ 'matrix' ][ 'include' ][ ] = [ |
|
| 34 | 34 | 'php' => 7.4, |
| 35 | 35 | 'env' => $this->getFlag() . '=1', |
| 36 | 36 | ]; |
| 37 | 37 | |
| 38 | 38 | /** @var string $prefix the bash prefix to check for the flag being set */ |
| 39 | - $prefix = 'if [[ $' . $this->getFlag() .' ]]; then '; |
|
| 39 | + $prefix = 'if [[ $' . $this->getFlag() . ' ]]; then '; |
|
| 40 | 40 | |
| 41 | 41 | $beforeScript = $this->getBeforeScript(); |
| 42 | 42 | if (isset($beforeScript)) { |
| 43 | 43 | // install jdscpd, node tool, for duplication detection |
| 44 | 44 | $helper->ensurePathExistsInYaml($yamlAsArray, 'before_script'); |
| 45 | - $yamlAsArray['before_script'][] = $prefix . $beforeScript . ' ;fi'; |
|
| 45 | + $yamlAsArray[ 'before_script' ][ ] = $prefix . $beforeScript . ' ;fi'; |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | $script = $this->getScript(); |
| 49 | 49 | if (isset($script)) { |
| 50 | 50 | // run jscpd on src and tests dir |
| 51 | 51 | $helper->ensurePathExistsInYaml($yamlAsArray, 'script'); |
| 52 | - $yamlAsArray['script'][] = $prefix . $script . ' ; fi'; |
|
| 52 | + $yamlAsArray[ 'script' ][ ] = $prefix . $script . ' ; fi'; |
|
| 53 | 53 | } |
| 54 | 54 | } |
| 55 | 55 | |