Skip to content

Github Actions: Add Phpstan #675

Github Actions: Add Phpstan

Github Actions: Add Phpstan #675

Triggered via pull request August 21, 2023 10:28
@yhabteabyhabteab
synchronize #186
phpstan
Status Failure
Total duration 6m 5s
Artifacts

php.yml

on: pull_request
Matrix: lint
Fit to window
Zoom out
Zoom in

Annotations

96 errors
Static analysis for php 7.3 on ubuntu-latest: application/clicommands/JobsCommand.php#L117
Parameter #3 $fromDisk of static method Icinga\Application\Config::module() expects string, true given.
Static analysis for php 7.3 on ubuntu-latest: library/X509/CertificateUtils.php#L246
Unsafe call to private method Icinga\Module\X509\CertificateUtils::shortNameFromDN() through static::.
Static analysis for php 7.3 on ubuntu-latest: library/X509/Model/Behavior/ExpressionInjector.php#L37
Method Icinga\Module\X509\Model\Behavior\ExpressionInjector::rewriteCondition() should return ipl\Stdlib\Filter\Rule|null but return statement is missing.
Static analysis for php 7.3 on ubuntu-latest
Ignored error pattern #Unsafe usage of new static\(\)# was not matched in reported errors.
Static analysis for php 7.3 on ubuntu-latest
Process completed with exit code 1.
InvalidScalarArgument: application/clicommands/JobsCommand.php#L117
application/clicommands/JobsCommand.php:117:67: InvalidScalarArgument: Argument 3 of Icinga\Application\Config::module expects string, but true provided (see https://psalm.dev/012)
PossiblyNullArgument: application/controllers/CertificateController.php#L40
application/controllers/CertificateController.php:40:23: PossiblyNullArgument: Argument 1 of Icinga\Module\X509\CertificateDetails::setCert cannot be null, possibly null value provided (see https://psalm.dev/078)
PossiblyNullReference: application/controllers/ChainController.php#L54
application/controllers/ChainController.php:54:13: PossiblyNullReference: Cannot call method offsetGet on possibly null value (see https://psalm.dev/083)
PossiblyNullArrayAccess: application/controllers/ChainController.php#L54
application/controllers/ChainController.php:54:13: PossiblyNullArrayAccess: Cannot access array value on possibly null variable $chain of type Icinga\Module\X509\Model\X509CertificateChain|null (see https://psalm.dev/079)
ImplicitToStringCast: application/controllers/JobsController.php#L86
application/controllers/JobsController.php:86:30: ImplicitToStringCast: Argument 1 of Icinga\Module\X509\Forms\Config\JobConfigForm::setRedirectUrl expects string, but Icinga\Web\Url provided with a __toString method (see https://psalm.dev/060)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L99
application/controllers/JobsController.php:99:25: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L99
application/controllers/JobsController.php:99:58: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L101
application/controllers/JobsController.php:101:31: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L108
application/controllers/JobsController.php:108:39: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L109
application/controllers/JobsController.php:109:39: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
Static analysis for php 7.2 on ubuntu-latest: application/clicommands/JobsCommand.php#L117
Parameter #3 $fromDisk of static method Icinga\Application\Config::module() expects string, true given.
Static analysis for php 7.2 on ubuntu-latest: library/X509/CertificateUtils.php#L246
Unsafe call to private method Icinga\Module\X509\CertificateUtils::shortNameFromDN() through static::.
Static analysis for php 7.2 on ubuntu-latest: library/X509/Model/Behavior/ExpressionInjector.php#L37
Method Icinga\Module\X509\Model\Behavior\ExpressionInjector::rewriteCondition() should return ipl\Stdlib\Filter\Rule|null but return statement is missing.
Static analysis for php 7.2 on ubuntu-latest
Ignored error pattern #Unsafe usage of new static\(\)# was not matched in reported errors.
Static analysis for php 7.2 on ubuntu-latest
Process completed with exit code 1.
InvalidScalarArgument: application/clicommands/JobsCommand.php#L117
application/clicommands/JobsCommand.php:117:67: InvalidScalarArgument: Argument 3 of Icinga\Application\Config::module expects string, but true provided (see https://psalm.dev/012)
PossiblyNullArgument: application/controllers/CertificateController.php#L40
application/controllers/CertificateController.php:40:23: PossiblyNullArgument: Argument 1 of Icinga\Module\X509\CertificateDetails::setCert cannot be null, possibly null value provided (see https://psalm.dev/078)
PossiblyNullReference: application/controllers/ChainController.php#L54
application/controllers/ChainController.php:54:13: PossiblyNullReference: Cannot call method offsetGet on possibly null value (see https://psalm.dev/083)
PossiblyNullArrayAccess: application/controllers/ChainController.php#L54
application/controllers/ChainController.php:54:13: PossiblyNullArrayAccess: Cannot access array value on possibly null variable $chain of type Icinga\Module\X509\Model\X509CertificateChain|null (see https://psalm.dev/079)
ImplicitToStringCast: application/controllers/JobsController.php#L86
application/controllers/JobsController.php:86:30: ImplicitToStringCast: Argument 1 of Icinga\Module\X509\Forms\Config\JobConfigForm::setRedirectUrl expects string, but Icinga\Web\Url provided with a __toString method (see https://psalm.dev/060)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L99
application/controllers/JobsController.php:99:25: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L99
application/controllers/JobsController.php:99:58: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L101
application/controllers/JobsController.php:101:31: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L108
application/controllers/JobsController.php:108:39: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L109
application/controllers/JobsController.php:109:39: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
Static analysis for php 8.0 on ubuntu-latest: application/clicommands/JobsCommand.php#L117
Parameter #3 $fromDisk of static method Icinga\Application\Config::module() expects string, true given.
Static analysis for php 8.0 on ubuntu-latest: library/X509/CertificateUtils.php#L246
Unsafe call to private method Icinga\Module\X509\CertificateUtils::shortNameFromDN() through static::.
Static analysis for php 8.0 on ubuntu-latest: library/X509/Model/Behavior/ExpressionInjector.php#L37
Method Icinga\Module\X509\Model\Behavior\ExpressionInjector::rewriteCondition() should return ipl\Stdlib\Filter\Rule|null but return statement is missing.
Static analysis for php 8.0 on ubuntu-latest
Ignored error pattern #Unsafe usage of new static\(\)# was not matched in reported errors.
Static analysis for php 8.0 on ubuntu-latest
Process completed with exit code 1.
PossiblyFalseOperand: application/clicommands/CheckCommand.php#L265
application/clicommands/CheckCommand.php:265:36: PossiblyFalseOperand: Left operand cannot be falsable, got false|int (see https://psalm.dev/162)
InvalidArgument: application/clicommands/JobsCommand.php#L117
application/clicommands/JobsCommand.php:117:67: InvalidArgument: Argument 3 of Icinga\Application\Config::module expects string, but true provided (see https://psalm.dev/004)
PossiblyNullArgument: application/controllers/CertificateController.php#L40
application/controllers/CertificateController.php:40:23: PossiblyNullArgument: Argument 1 of Icinga\Module\X509\CertificateDetails::setCert cannot be null, possibly null value provided (see https://psalm.dev/078)
PossiblyNullArrayAccess: application/controllers/ChainController.php#L54
application/controllers/ChainController.php:54:13: PossiblyNullArrayAccess: Cannot access array value on possibly null variable $chain of type Icinga\Module\X509\Model\X509CertificateChain|null (see https://psalm.dev/079)
PossiblyNullReference: application/controllers/ChainController.php#L54
application/controllers/ChainController.php:54:13: PossiblyNullReference: Cannot call method offsetGet on possibly null value (see https://psalm.dev/083)
ImplicitToStringCast: application/controllers/JobsController.php#L86
application/controllers/JobsController.php:86:30: ImplicitToStringCast: Argument 1 of Icinga\Module\X509\Forms\Config\JobConfigForm::setRedirectUrl expects string, but Icinga\Web\Url provided with a __toString method (see https://psalm.dev/060)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L99
application/controllers/JobsController.php:99:25: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L99
application/controllers/JobsController.php:99:58: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L101
application/controllers/JobsController.php:101:31: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L108
application/controllers/JobsController.php:108:39: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
Static analysis for php 7.4 on ubuntu-latest: application/clicommands/JobsCommand.php#L117
Parameter #3 $fromDisk of static method Icinga\Application\Config::module() expects string, true given.
Static analysis for php 7.4 on ubuntu-latest: library/X509/CertificateUtils.php#L246
Unsafe call to private method Icinga\Module\X509\CertificateUtils::shortNameFromDN() through static::.
Static analysis for php 7.4 on ubuntu-latest: library/X509/Model/Behavior/ExpressionInjector.php#L37
Method Icinga\Module\X509\Model\Behavior\ExpressionInjector::rewriteCondition() should return ipl\Stdlib\Filter\Rule|null but return statement is missing.
Static analysis for php 7.4 on ubuntu-latest
Ignored error pattern #Unsafe usage of new static\(\)# was not matched in reported errors.
Static analysis for php 7.4 on ubuntu-latest
Process completed with exit code 1.
PossiblyFalseOperand: application/clicommands/CheckCommand.php#L265
application/clicommands/CheckCommand.php:265:36: PossiblyFalseOperand: Left operand cannot be falsable, got false|int (see https://psalm.dev/162)
InvalidArgument: application/clicommands/JobsCommand.php#L117
application/clicommands/JobsCommand.php:117:67: InvalidArgument: Argument 3 of Icinga\Application\Config::module expects string, but true provided (see https://psalm.dev/004)
PossiblyNullArgument: application/controllers/CertificateController.php#L40
application/controllers/CertificateController.php:40:23: PossiblyNullArgument: Argument 1 of Icinga\Module\X509\CertificateDetails::setCert cannot be null, possibly null value provided (see https://psalm.dev/078)
PossiblyNullArrayAccess: application/controllers/ChainController.php#L54
application/controllers/ChainController.php:54:13: PossiblyNullArrayAccess: Cannot access array value on possibly null variable $chain of type Icinga\Module\X509\Model\X509CertificateChain|null (see https://psalm.dev/079)
PossiblyNullReference: application/controllers/ChainController.php#L54
application/controllers/ChainController.php:54:13: PossiblyNullReference: Cannot call method offsetGet on possibly null value (see https://psalm.dev/083)
ImplicitToStringCast: application/controllers/JobsController.php#L86
application/controllers/JobsController.php:86:30: ImplicitToStringCast: Argument 1 of Icinga\Module\X509\Forms\Config\JobConfigForm::setRedirectUrl expects string, but Icinga\Web\Url provided with a __toString method (see https://psalm.dev/060)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L99
application/controllers/JobsController.php:99:25: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L99
application/controllers/JobsController.php:99:58: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L101
application/controllers/JobsController.php:101:31: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L108
application/controllers/JobsController.php:108:39: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
Static analysis for php 8.1 on ubuntu-latest: application/clicommands/JobsCommand.php#L117
Parameter #3 $fromDisk of static method Icinga\Application\Config::module() expects string, true given.
Static analysis for php 8.1 on ubuntu-latest: library/X509/CertificateUtils.php#L246
Unsafe call to private method Icinga\Module\X509\CertificateUtils::shortNameFromDN() through static::.
Static analysis for php 8.1 on ubuntu-latest: library/X509/Model/Behavior/ExpressionInjector.php#L37
Method Icinga\Module\X509\Model\Behavior\ExpressionInjector::rewriteCondition() should return ipl\Stdlib\Filter\Rule|null but return statement is missing.
Static analysis for php 8.1 on ubuntu-latest
Ignored error pattern #Unsafe usage of new static\(\)# was not matched in reported errors.
Static analysis for php 8.1 on ubuntu-latest
Process completed with exit code 1.
PossiblyFalseOperand: application/clicommands/CheckCommand.php#L265
application/clicommands/CheckCommand.php:265:36: PossiblyFalseOperand: Left operand cannot be falsable, got false|int (see https://psalm.dev/162)
InvalidArgument: application/clicommands/JobsCommand.php#L117
application/clicommands/JobsCommand.php:117:67: InvalidArgument: Argument 3 of Icinga\Application\Config::module expects string, but true provided (see https://psalm.dev/004)
PossiblyNullArgument: application/controllers/CertificateController.php#L40
application/controllers/CertificateController.php:40:23: PossiblyNullArgument: Argument 1 of Icinga\Module\X509\CertificateDetails::setCert cannot be null, possibly null value provided (see https://psalm.dev/078)
PossiblyNullArrayAccess: application/controllers/ChainController.php#L54
application/controllers/ChainController.php:54:13: PossiblyNullArrayAccess: Cannot access array value on possibly null variable $chain of type Icinga\Module\X509\Model\X509CertificateChain|null (see https://psalm.dev/079)
PossiblyNullReference: application/controllers/ChainController.php#L54
application/controllers/ChainController.php:54:13: PossiblyNullReference: Cannot call method offsetGet on possibly null value (see https://psalm.dev/083)
ImplicitToStringCast: application/controllers/JobsController.php#L86
application/controllers/JobsController.php:86:30: ImplicitToStringCast: Argument 1 of Icinga\Module\X509\Forms\Config\JobConfigForm::setRedirectUrl expects string, but Icinga\Web\Url provided with a __toString method (see https://psalm.dev/060)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L99
application/controllers/JobsController.php:99:25: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L99
application/controllers/JobsController.php:99:58: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L101
application/controllers/JobsController.php:101:31: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L108
application/controllers/JobsController.php:108:39: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
Static analysis for php 8.2 on ubuntu-latest: application/clicommands/JobsCommand.php#L117
Parameter #3 $fromDisk of static method Icinga\Application\Config::module() expects string, true given.
Static analysis for php 8.2 on ubuntu-latest: library/X509/CertificateUtils.php#L246
Unsafe call to private method Icinga\Module\X509\CertificateUtils::shortNameFromDN() through static::.
Static analysis for php 8.2 on ubuntu-latest: library/X509/Model/Behavior/ExpressionInjector.php#L37
Method Icinga\Module\X509\Model\Behavior\ExpressionInjector::rewriteCondition() should return ipl\Stdlib\Filter\Rule|null but return statement is missing.
Static analysis for php 8.2 on ubuntu-latest
Ignored error pattern #Unsafe usage of new static\(\)# was not matched in reported errors.
Static analysis for php 8.2 on ubuntu-latest
Process completed with exit code 1.
PossiblyFalseOperand: application/clicommands/CheckCommand.php#L265
application/clicommands/CheckCommand.php:265:36: PossiblyFalseOperand: Left operand cannot be falsable, got false|int (see https://psalm.dev/162)
InvalidArgument: application/clicommands/JobsCommand.php#L117
application/clicommands/JobsCommand.php:117:67: InvalidArgument: Argument 3 of Icinga\Application\Config::module expects string, but true provided (see https://psalm.dev/004)
PossiblyNullArgument: application/controllers/CertificateController.php#L40
application/controllers/CertificateController.php:40:23: PossiblyNullArgument: Argument 1 of Icinga\Module\X509\CertificateDetails::setCert cannot be null, possibly null value provided (see https://psalm.dev/078)
PossiblyNullArrayAccess: application/controllers/ChainController.php#L54
application/controllers/ChainController.php:54:13: PossiblyNullArrayAccess: Cannot access array value on possibly null variable $chain of type Icinga\Module\X509\Model\X509CertificateChain|null (see https://psalm.dev/079)
PossiblyNullReference: application/controllers/ChainController.php#L54
application/controllers/ChainController.php:54:13: PossiblyNullReference: Cannot call method offsetGet on possibly null value (see https://psalm.dev/083)
ImplicitToStringCast: application/controllers/JobsController.php#L86
application/controllers/JobsController.php:86:30: ImplicitToStringCast: Argument 1 of Icinga\Module\X509\Forms\Config\JobConfigForm::setRedirectUrl expects string, but Icinga\Web\Url provided with a __toString method (see https://psalm.dev/060)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L99
application/controllers/JobsController.php:99:25: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L99
application/controllers/JobsController.php:99:58: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L101
application/controllers/JobsController.php:101:31: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)
PossiblyInvalidPropertyFetch: application/controllers/JobsController.php#L108
application/controllers/JobsController.php:108:39: PossiblyInvalidPropertyFetch: Cannot fetch property on possible non-object $data of type false (see https://psalm.dev/114)