Skip to content

Commit 702afa4

Browse files
authored
Merge pull request #42 from psalm/dependabot/composer/codeception/module-cli-tw-1.0.0or-tw-2.0.0
2 parents 861a686 + 3f07966 commit 702afa4

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"ext-json": "*",
2121
"codeception/codeception": "^4.1.31 || ^5.0",
2222
"composer/semver": "^1.4 || ^2.0 || ^3.0",
23-
"codeception/module-cli": "^1.0.0",
23+
"codeception/module-cli": "^1.0.0 || ^2.0.0",
2424
"codeception/module-filesystem": "^1.0.2 || ^2.0 || ^3.0"
2525
},
2626
"require-dev": {

src/Module.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,13 @@ class Module extends BaseModule
6767

6868
public function __construct(ModuleContainer $moduleContainer, ?array $config = null)
6969
{
70+
/** @psalm-suppress RedundantCondition required for older codeception versions */
7071
assert(is_array($this->config));
7172
$this->config = array_merge(self::DEFAULT_MODULE_CONFIGURATION, $this->config);
7273
parent::__construct($moduleContainer, $config);
7374
}
7475

76+
/** @param mixed $settings */
7577
public function _beforeSuite($settings = []): void
7678
{
7779
$defaultDir = $this->getDefaultDirectory();
@@ -93,6 +95,7 @@ public function _before(TestInterface $test): void
9395
$this->errors = null;
9496
$this->output = null;
9597
$this->exitCode = null;
98+
/** @psalm-suppress RedundantCondition required for older codeception versions */
9699
assert(is_array($this->config));
97100
$path = $this->config['psalm_path'];
98101
assert(is_string($path));
@@ -119,9 +122,16 @@ public function runPsalmOn(string $filename, array $options = []): void
119122
$this->debug('Running: ' . $cmd);
120123
$this->cli()->runShellCommand($cmd, false);
121124

122-
/** @psalm-suppress MissingPropertyType shouldn't be required, but older Psalm needs it */
125+
/**
126+
* @psalm-suppress MissingPropertyType shouldn't be required, but older Psalm needs it
127+
* @psalm-suppress RedundantCast required for older codeception versions
128+
*/
123129
$this->output = (string)$this->cli()->output;
124-
/** @psalm-suppress MissingPropertyType shouldn't be required, but older Psalm needs it */
130+
131+
/**
132+
* @psalm-suppress MissingPropertyType shouldn't be required, but older Psalm needs it
133+
* @psalm-suppress RedundantCast required for older codeception versions
134+
*/
125135
$this->exitCode = (int)$this->cli()->result;
126136

127137
$this->debug(sprintf('Psalm exit code: %d', $this->exitCode));
@@ -568,6 +578,7 @@ function (array $row): array {
568578

569579
private function getDefaultDirectory(): string
570580
{
581+
/** @psalm-suppress RedundantCondition required for older codeception versions */
571582
assert(is_array($this->config));
572583
$directory = $this->config['default_dir'];
573584
assert(is_string($directory));
@@ -577,6 +588,7 @@ private function getDefaultDirectory(): string
577588

578589
private function getPsalmPath(): string
579590
{
591+
/** @psalm-suppress RedundantCondition required for older codeception versions */
580592
assert(is_array($this->config));
581593
$psalmPath = $this->config['psalm_path'];
582594
assert(is_string($psalmPath));

0 commit comments

Comments
 (0)