This repository has been archived by the owner on Feb 19, 2025. It is now read-only.
Update dependency vimeo/psalm to ^6.6.2 #1288
continuous-integration.yml
on: push
Generate job matrix
8s
Matrix: QA Checks
Annotations
10 errors and 10 warnings
ClassMustBeFinal:
src/CodeGenerationUtils/Autoloader/Autoloader.php#L29
src/CodeGenerationUtils/Autoloader/Autoloader.php:29:7: ClassMustBeFinal: Class CodeGenerationUtils\Autoloader\Autoloader is never extended and is not part of the public API, and thus must be made final. (see https://psalm.dev/361)
|
ClassMustBeFinal:
src/CodeGenerationUtils/Exception/DisabledMethodException.php#L30
src/CodeGenerationUtils/Exception/DisabledMethodException.php:30:7: ClassMustBeFinal: Class CodeGenerationUtils\Exception\DisabledMethodException is never extended and is not part of the public API, and thus must be made final. (see https://psalm.dev/361)
|
ClassMustBeFinal:
src/CodeGenerationUtils/Exception/InvalidGeneratedClassesDirectoryException.php#L30
src/CodeGenerationUtils/Exception/InvalidGeneratedClassesDirectoryException.php:30:7: ClassMustBeFinal: Class CodeGenerationUtils\Exception\InvalidGeneratedClassesDirectoryException is never extended and is not part of the public API, and thus must be made final. (see https://psalm.dev/361)
|
ClassMustBeFinal:
src/CodeGenerationUtils/FileLocator/FileLocator.php#L31
src/CodeGenerationUtils/FileLocator/FileLocator.php:31:7: ClassMustBeFinal: Class CodeGenerationUtils\FileLocator\FileLocator is never extended and is not part of the public API, and thus must be made final. (see https://psalm.dev/361)
|
ClassMustBeFinal:
src/CodeGenerationUtils/GeneratorStrategy/EvaluatingGeneratorStrategy.php#L32
src/CodeGenerationUtils/GeneratorStrategy/EvaluatingGeneratorStrategy.php:32:7: ClassMustBeFinal: Class CodeGenerationUtils\GeneratorStrategy\EvaluatingGeneratorStrategy is never extended and is not part of the public API, and thus must be made final. (see https://psalm.dev/361)
|
ClassMustBeFinal:
src/CodeGenerationUtils/GeneratorStrategy/FileWriterGeneratorStrategy.php#L39
src/CodeGenerationUtils/GeneratorStrategy/FileWriterGeneratorStrategy.php:39:7: ClassMustBeFinal: Class CodeGenerationUtils\GeneratorStrategy\FileWriterGeneratorStrategy is never extended and is not part of the public API, and thus must be made final. (see https://psalm.dev/361)
|
ClassMustBeFinal:
src/CodeGenerationUtils/Inflector/ClassNameInflector.php#L31
src/CodeGenerationUtils/Inflector/ClassNameInflector.php:31:7: ClassMustBeFinal: Class CodeGenerationUtils\Inflector\ClassNameInflector is never extended and is not part of the public API, and thus must be made final. (see https://psalm.dev/361)
|
ClassMustBeFinal:
src/CodeGenerationUtils/Inflector/Util/ParameterEncoder.php#L30
src/CodeGenerationUtils/Inflector/Util/ParameterEncoder.php:30:7: ClassMustBeFinal: Class CodeGenerationUtils\Inflector\Util\ParameterEncoder is never extended and is not part of the public API, and thus must be made final. (see https://psalm.dev/361)
|
ClassMustBeFinal:
src/CodeGenerationUtils/ReflectionBuilder/ClassBuilder.php#L53
src/CodeGenerationUtils/ReflectionBuilder/ClassBuilder.php:53:7: ClassMustBeFinal: Class CodeGenerationUtils\ReflectionBuilder\ClassBuilder is never extended and is not part of the public API, and thus must be made final. (see https://psalm.dev/361)
|
ClassMustBeFinal:
src/CodeGenerationUtils/Visitor/ClassClonerVisitor.php#L38
src/CodeGenerationUtils/Visitor/ClassClonerVisitor.php:38:7: ClassMustBeFinal: Class CodeGenerationUtils\Visitor\ClassClonerVisitor is never extended and is not part of the public API, and thus must be made final. (see https://psalm.dev/361)
|
QA Checks (Infection (with PCOV) [8.4, locked], ubuntu-latest, laminas/laminas-continuous-integra...:
src/CodeGenerationUtils/Autoloader/Autoloader.php#L37
Escaped Mutant for Mutator "FalseValue":
@@ @@
}
public function __invoke(string $className): bool
{
- if (class_exists($className, false) || !$this->classNameInflector->isGeneratedClassName($className)) {
+ if (class_exists($className, true) || !$this->classNameInflector->isGeneratedClassName($className)) {
return false;
}
$file = $this->fileLocator->getGeneratedClassFileName($className);
|
QA Checks (Infection (with PCOV) [8.4, locked], ubuntu-latest, laminas/laminas-continuous-integra...:
src/CodeGenerationUtils/GeneratorStrategy/BaseGeneratorStrategy.php#L46
Escaped Mutant for Mutator "ProtectedVisibility":
@@ @@
{
$this->prettyPrinter = $prettyPrinter;
}
- protected function getPrettyPrinter(): PrettyPrinterAbstract
+ private function getPrettyPrinter(): PrettyPrinterAbstract
{
return $this->prettyPrinter ?: $this->prettyPrinter = new Standard();
}
}
|
QA Checks (Infection (with PCOV) [8.4, locked], ubuntu-latest, laminas/laminas-continuous-integra...:
src/CodeGenerationUtils/GeneratorStrategy/EvaluatingGeneratorStrategy.php#L42
Escaped Mutant for Mutator "Identical":
@@ @@
*/
public function __construct()
{
- $this->canEval = ini_get('suhosin.executor.disable_eval') === '1';
+ $this->canEval = ini_get('suhosin.executor.disable_eval') !== '1';
}
/**
* Evaluates the generated code before returning it
|
QA Checks (Infection (with PCOV) [8.4, locked], ubuntu-latest, laminas/laminas-continuous-integra...:
src/CodeGenerationUtils/GeneratorStrategy/EvaluatingGeneratorStrategy.php#L54
Escaped Mutant for Mutator "LogicalNot":
@@ @@
public function generate(array $ast): string
{
$code = parent::generate($ast);
- if (!$this->canEval) {
+ if ($this->canEval) {
$fileName = sys_get_temp_dir() . '/EvaluatingGeneratorStrategy.php.tmp.' . uniqid('', true);
file_put_contents($fileName, "<?php\n" . $code);
/** @psalm-suppress UnresolvableInclude we're doing `eval()` here! There's no going back! */
|
QA Checks (Infection (with PCOV) [8.4, locked], ubuntu-latest, laminas/laminas-continuous-integra...:
src/CodeGenerationUtils/GeneratorStrategy/EvaluatingGeneratorStrategy.php#L55
Escaped Mutant for Mutator "ConcatOperandRemoval":
@@ @@
{
$code = parent::generate($ast);
if (!$this->canEval) {
- $fileName = sys_get_temp_dir() . '/EvaluatingGeneratorStrategy.php.tmp.' . uniqid('', true);
+ $fileName = sys_get_temp_dir() . '/EvaluatingGeneratorStrategy.php.tmp.';
file_put_contents($fileName, "<?php\n" . $code);
/** @psalm-suppress UnresolvableInclude we're doing `eval()` here! There's no going back! */
require $fileName;
|
QA Checks (Infection (with PCOV) [8.4, locked], ubuntu-latest, laminas/laminas-continuous-integra...:
src/CodeGenerationUtils/GeneratorStrategy/EvaluatingGeneratorStrategy.php#L60
Escaped Mutant for Mutator "FunctionCallRemoval":
@@ @@
file_put_contents($fileName, "<?php\n" . $code);
/** @psalm-suppress UnresolvableInclude we're doing `eval()` here! There's no going back! */
require $fileName;
- unlink($fileName);
+
return $code;
}
eval($code);
|
QA Checks (Infection (with PCOV) [8.4, locked], ubuntu-latest, laminas/laminas-continuous-integra...:
src/CodeGenerationUtils/GeneratorStrategy/FileWriterGeneratorStrategy.php#L64
Escaped Mutant for Mutator "UnwrapTrim":
@@ @@
{
$this->traverser->traverse($ast);
$generatedCode = parent::generate($ast);
- $className = trim($this->visitor->getNamespace() . '\\' . $this->visitor->getName(), '\\');
+ $className = $this->visitor->getNamespace() . '\\' . $this->visitor->getName();
$fileName = $this->fileLocator->getGeneratedClassFileName($className);
$tmpFileName = $fileName . '.' . uniqid('', true);
// renaming files is necessary to avoid race conditions when the same file is written multiple times
|
QA Checks (Infection (with PCOV) [8.4, locked], ubuntu-latest, laminas/laminas-continuous-integra...:
src/CodeGenerationUtils/GeneratorStrategy/FileWriterGeneratorStrategy.php#L66
Escaped Mutant for Mutator "ConcatOperandRemoval":
@@ @@
$generatedCode = parent::generate($ast);
$className = trim($this->visitor->getNamespace() . '\\' . $this->visitor->getName(), '\\');
$fileName = $this->fileLocator->getGeneratedClassFileName($className);
- $tmpFileName = $fileName . '.' . uniqid('', true);
+ $tmpFileName = '.' . uniqid('', true);
// renaming files is necessary to avoid race conditions when the same file is written multiple times
// in a short time period
file_put_contents($tmpFileName, "<?php\n\n" . $generatedCode);
|
QA Checks (Infection (with PCOV) [8.4, locked], ubuntu-latest, laminas/laminas-continuous-integra...:
src/CodeGenerationUtils/GeneratorStrategy/FileWriterGeneratorStrategy.php#L66
Escaped Mutant for Mutator "ConcatOperandRemoval":
@@ @@
$generatedCode = parent::generate($ast);
$className = trim($this->visitor->getNamespace() . '\\' . $this->visitor->getName(), '\\');
$fileName = $this->fileLocator->getGeneratedClassFileName($className);
- $tmpFileName = $fileName . '.' . uniqid('', true);
+ $tmpFileName = $fileName . uniqid('', true);
// renaming files is necessary to avoid race conditions when the same file is written multiple times
// in a short time period
file_put_contents($tmpFileName, "<?php\n\n" . $generatedCode);
|
QA Checks (Infection (with PCOV) [8.4, locked], ubuntu-latest, laminas/laminas-continuous-integra...:
src/CodeGenerationUtils/GeneratorStrategy/FileWriterGeneratorStrategy.php#L66
Escaped Mutant for Mutator "Concat":
@@ @@
$generatedCode = parent::generate($ast);
$className = trim($this->visitor->getNamespace() . '\\' . $this->visitor->getName(), '\\');
$fileName = $this->fileLocator->getGeneratedClassFileName($className);
- $tmpFileName = $fileName . '.' . uniqid('', true);
+ $tmpFileName = $fileName . uniqid('', true) . '.';
// renaming files is necessary to avoid race conditions when the same file is written multiple times
// in a short time period
file_put_contents($tmpFileName, "<?php\n\n" . $generatedCode);
|