Skip to content

Commit 7ffc85c

Browse files
committed
Fix
1 parent 50f25e9 commit 7ffc85c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

conf/config.neon

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ parameters:
162162
- OPENSSL_VERSION_NUMBER
163163
- ZEND_DEBUG_BUILD
164164
- ZEND_THREAD_SAFE
165+
customRulesetUsed: null
165166
editorUrl: null
166167

167168
extensions:
@@ -289,7 +290,7 @@ parametersSchema:
289290
resultCacheChecksProjectExtensionFilesDependencies: bool()
290291
staticReflectionClassNamePatterns: listOf(string())
291292
dynamicConstantNames: listOf(string())
292-
customRulesetUsed: bool()
293+
customRulesetUsed: schema(bool(), nullable())
293294
rootDir: string()
294295
tmpDir: string()
295296
currentWorkingDirectory: string()

src/Command/CommandHelper.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,9 @@ public static function begin(
355355
}
356356

357357
self::setUpSignalHandler($errorOutput);
358-
if (!$container->hasParameter('customRulesetUsed')) {
358+
/** @var bool|null $customRulesetUsed */
359+
$customRulesetUsed = $container->getParameter('customRulesetUsed');
360+
if ($customRulesetUsed === null) {
359361
$errorOutput->writeLineFormatted('');
360362
$errorOutput->writeLineFormatted('<comment>No rules detected</comment>');
361363
$errorOutput->writeLineFormatted('');
@@ -367,7 +369,7 @@ public static function begin(
367369
$errorOutput->writeLineFormatted(' * in this case, don\'t forget to define parameter <options=bold>customRulesetUsed</> in your config file.');
368370
$errorOutput->writeLineFormatted('');
369371
throw new InceptionNotSuccessfulException();
370-
} elseif ((bool) $container->getParameter('customRulesetUsed')) {
372+
} elseif ($customRulesetUsed) {
371373
$defaultLevelUsed = false;
372374
}
373375

0 commit comments

Comments
 (0)