Open
Description
Hello,
During its inspection, PHPStorm returns errors like these in generated base query classes, complaining that the method Collection
is already defined:
The code still works fine but obviously it's a bit inconvenient. I dealt with it by removing the following piece of code from the baseQueryClassHeader.php
file, deleting all query classes and then re-running propel model:build
:
<?php foreach($columns as $column):?>
* @method <?= $modelClass ?>[]|Collection findBy<?= $column->getPhpName() ?>(<?= $column->getPhpType() ?>|array<<?= $column->getPhpType() ?>> $<?= $column->getName() ?>) Return <?= $modelClass ?> objects filtered by the <?= $column->getName() ?> column
* @psalm-method Collection&\Traversable<<?= $modelClass ?>> findBy<?= $column->getPhpName() ?>(<?= $column->getPhpType() ?>|array<<?= $column->getPhpType() ?>> $<?= $column->getName() ?>) Return <?= $modelClass ?> objects filtered by the <?= $column->getName() ?> column
<?php endforeach;?>
Another issue is the word match
in the same file - it's now a reserved word in PHP so some comments were highlighting it as an error. I fixed it by putting match
between single quotes on line 67.
What are your thoughts?
Metadata
Metadata
Assignees
Labels
No labels