Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
+ /**
+ * Queries for the existence of a field.
+ *
+ * @param $field
+ * @param string $langcode
+ * @return ConditionInterface
+ * @see \Drupal\Core\Entity\Query\QueryInterface::exists()
+ */
+ public function exists($field, $langcode = NULL);
$field should be hinted as a string in the phpdoc, like for other methods in ConditionInterface ?
Also applies to the methods in QueryInterface.
(in field.module)
+use Drupal\Core\Entity\Query\QueryFactory;
Doesn't seem to be needed, we never refer to QueryFactory directly in this file, we call drupal_container()->get('entity.query');
Same applies to options.module and EfqTest.php
A couple methods have no phpdoc block at all.
Comments
Comment #1
yched CreditAttribution: yched commentedAAMOF, the code that got committed in #1801726-60: EntityFieldQuery v2 had more than a couple doc / code style issues.
A full code-style review based on that patch would probably be a good thing.
Comment #2
chx CreditAttribution: chx commentedComment #3
chx CreditAttribution: chx commentedComment #12
quietone CreditAttribution: quietone as a volunteer commented@chx, thanks for the issue. However, the community has decided that the best way to approach this is by fixing a rule at a time, rather than a file at a time. See #2571965: [meta] Fix PHP coding standards in core for the meta issue where this effort is being organized,
Closing this as a duplicate.