Closed emodric closed 1 year ago
Looks good 👍 BTW, do inline type annotations also silence the errors here?
@pspanja They do, but when you work with content extensively (for example in netgen/site-bundle
), so much of them looks very very ugly, and you have to complicate code to actually use them:
/** @var \Ibexa\Core\FieldType\TextLine\Value $fieldValue **/
$fieldValue = $content->getFieldValue('title');
$text = $fieldValue->text;
That's why I always fallback to just excluding these errors from PHPStan.
Thanks all!
This adds some useful PHPStan ignore rules which are related to how Ibexa handles content fields and their values, e.g.
would result in an error:
I will add more later as I run into them