Closed FlorentTorregrosa closed 1 year ago
Depending on the code base I execute Psalm. I have a huge number of similar warnings like the following.
</pre><em class="placeholder">Warning</em>: Uninitialized string offset 0 in <em class="placeholder">mortenson\PsalmPluginDrupal\RenderArrayTainter::removeTaints()</em> (line <em class="placeholder">52</em> of <em class="placeholder">/project/vendor/mortenson/psalm-plugin-drupal/RenderArrayTainter.php</em>). <pre class="backtrace">mortenson\PsalmPluginDrupal\RenderArrayTainter::removeTaints(Object) (Line: 616) Psalm\Internal\EventDispatcher->dispatchRemoveTaints(Object) (Line: 409) Psalm\Internal\Analyzer\Statements\Expression\ArrayAnalyzer::analyzeArrayItem(Object, Object, Object, Object, Object) (Line: 88) Psalm\Internal\Analyzer\Statements\Expression\ArrayAnalyzer::analyze(Object, Object, Object) (Line: 287) Psalm\Internal\Analyzer\Statements\ExpressionAnalyzer::handleExpression(Object, Object, Object, , NULL, ) (Line: 78) Psalm\Internal\Analyzer\Statements\ExpressionAnalyzer::analyze(Object, Object, Object) (Line: 240) Psalm\Internal\Analyzer\Statements\Expression\AssignmentAnalyzer::analyze(Object, Object, Object, NULL, Object, NULL) (Line: 167) Psalm\Internal\Analyzer\Statements\ExpressionAnalyzer::handleExpression(Object, Object, Object, , NULL, 1) (Line: 78) Psalm\Internal\Analyzer\Statements\ExpressionAnalyzer::analyze(Object, Object, Object, , NULL, 1) (Line: 572) Psalm\Internal\Analyzer\StatementsAnalyzer::analyzeStatement(Object, Object, Object, NULL) (Line: 207) Psalm\Internal\Analyzer\StatementsAnalyzer->analyze(Array, Object) (Line: 387) Psalm\Internal\Analyzer\Statements\Block\LoopAnalyzer::analyze(Object, Array, Array, Array, Object, Object, , 1) (Line: 340) Psalm\Internal\Analyzer\Statements\Block\ForeachAnalyzer::analyze(Object, Object, Object) (Line: 530) Psalm\Internal\Analyzer\StatementsAnalyzer::analyzeStatement(Object, Object, Object, Object) (Line: 207) Psalm\Internal\Analyzer\StatementsAnalyzer->analyze(Array, Object, Object, 1) (Line: 476) Psalm\Internal\Analyzer\FunctionLikeAnalyzer->analyze(Object, Object, Object) (Line: 1798) Psalm\Internal\Analyzer\ClassAnalyzer->analyzeClassMethod(Object, Object, Object, Object, Object) (Line: 425) Psalm\Internal\Analyzer\ClassAnalyzer->analyze(Object, Object) (Line: 229) Psalm\Internal\Analyzer\FileAnalyzer->analyze() (Line: 362) Psalm\Internal\Codebase\Analyzer->Psalm\Internal\Codebase\{closure}(17, '/project/app/modules/custom/') (Line: 211) Psalm\Internal\Fork\Pool->__construct(Object, Array, Object, Object, Object, Object) (Line: 428) Psalm\Internal\Codebase\Analyzer->doAnalysis(Object, 7) (Line: 291) Psalm\Internal\Codebase\Analyzer->analyzeFiles(Object, 7, , 1) (Line: 691) Psalm\Internal\Analyzer\ProjectAnalyzer->check('/project/app/', ) (Line: 373) Psalm\Internal\Cli\Psalm::run(Array) (Line: 7) include('/project/vendor/vimeo/psalm/psalm') (Line: 120) </pre>
My Psalm config: https://gitlab.com/florenttorregrosa-drupal/docker-drupal-project/-/blob/9.x/scripts/quality/psalm/psalm.xml
I will create a PR.
PR #8 created.
Depending on the code base I execute Psalm. I have a huge number of similar warnings like the following.
My Psalm config: https://gitlab.com/florenttorregrosa-drupal/docker-drupal-project/-/blob/9.x/scripts/quality/psalm/psalm.xml
I will create a PR.