-
-
Notifications
You must be signed in to change notification settings - Fork 80
Add stubs for core field types #344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
36660d5
to
350ec56
Compare
350ec56
to
dbfd954
Compare
// LinkItem. | ||
$link_field = $node->get('field_link')->first(); | ||
assert($link_field instanceof LinkItem); | ||
assertType(LinkItem::class, $link_field); | ||
assertType('string', $link_field->title); | ||
assertType('string', $link_field->uri); | ||
assertType('array<string, mixed>', $link_field->options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@neclimdul this should fix your errors :)
https://phpstan.org/user-guide/stub-files All dependency classes need to be stubbed |
6ae8de0
to
944d9ea
Compare
|
c997cea
to
ff32b96
Compare
stubs/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.stub
Outdated
Show resolved
Hide resolved
stubs/Drupal/Core/Field/Plugin/Field/FieldType/StringLongItem.stub
Outdated
Show resolved
Hide resolved
ff32b96
to
bde99eb
Compare
bde99eb
to
0cff2b6
Compare
Fixes #342