mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 11:44:14 +01:00
fix typoe open-source parameter
This commit is contained in:
parent
d4db3c741f
commit
d1b63e2e55
@ -232,8 +232,7 @@ PHP
|
||||
private function shouldSkipOpenSourceAbstract(ClassMethod $classMethod, Class_ $class): bool
|
||||
{
|
||||
// skip as possible contract for 3rd party
|
||||
$projectType = $this->parameterProvider->provideParameter(Option::PROJECT_TYPE);
|
||||
if ($projectType !== Option::PROJECT_TYPE_OPEN_SOURCE) {
|
||||
if (! $this->isOpenSourceProjectType()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -247,4 +246,15 @@ PHP
|
||||
|
||||
return $classMethod->isPublic();
|
||||
}
|
||||
|
||||
private function isOpenSourceProjectType(): bool
|
||||
{
|
||||
$projectType = $this->parameterProvider->provideParameter(Option::PROJECT_TYPE);
|
||||
|
||||
return in_array(
|
||||
$projectType,
|
||||
[Option::PROJECT_TYPE_OPEN_SOURCE, Option::PROJECT_TYPE_OPEN_SOURCE_UNDESCORED],
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -85,4 +85,9 @@ final class Option
|
||||
* @var string
|
||||
*/
|
||||
public const PROJECT_TYPE_OPEN_SOURCE = 'open-source';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PROJECT_TYPE_OPEN_SOURCE_UNDESCORED = 'open_source';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user