-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Drupal check errors on baseFieldDefinitions #252
Comments
Does the code know it's an interface? You need to type hint the result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The errors can be reproduced by installing the drupal examples module and drupal check the content_entity_example submodule provided.
drupal-check is installed globally via Composer
Environment:
drupal-check -a moduleName gives error on:
Access to an undefined property Drupal\Core\Entity\EntityInterface::$title
But the property does exist, it is created dynamically via:
public static baseFieldDefinitions(EntityTypeInterface $entity_type)
Q: Is drupal-check unable to check this?
drupal-check -a moduleName gives error on:
Method Drupal\ModuleName\Entity\Sample::getOwner() should return
Drupal\user\UserInterface but returns
Drupal\Core\Entity\EntityInterface.
getOwner returns: return $this->get('user_id')->entity;
Q: Isn't this a user interface?
The text was updated successfully, but these errors were encountered: