Problem/Motivation

The method is missing a @return.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

joachim created an issue. See original summary.

sidharth_soman’s picture

Status: Active » Needs review
StatusFileSize
new728 bytes

I've added the @return doc comment. Please review.

joachim’s picture

Thanks for the patch!

I'm not sure each item has to be an array, as one of the callers of this method does this:

    $query_results = $this->getStorageClient()->query($this->parameters, $this->sort, $start, $length);

SNIP 

    foreach ($query_results as $query_result) {

      $id = $field_mapper->extractIdFromRawData((array) $query_result);
roberttabigue’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new522.65 KB
new472.89 KB

Hi,

Patch #2 was applied cleanly to the External Entities module against 8.x-2.x-dev on Drupal 9.5.10, and confirmed that the ExternalEntityStorageClientInterface.php is now updated.

Checking patch src/StorageClient/ExternalEntityStorageClientInterface.php...
Applied patch src/StorageClient/ExternalEntityStorageClientInterface.php cleanly.

Please see the attached files for reference.

I'm moving this now to RTBC.

Thank you!

joachim’s picture

Status: Reviewed & tested by the community » Needs work

Needs work as per my comment.

@roberttabigue thanks for reviewing, but please don't upload screenshots of code! We can see the patch applies - the test is green. And we can see the change the patch makes -- that's what the diff is for.

imustakim’s picture

Assigned: Unassigned » imustakim
imustakim’s picture

Assigned: imustakim » Unassigned
Status: Needs work » Needs review
StatusFileSize
new759 bytes

Patch updated.
Please review.

joachim’s picture

Status: Needs review » Needs work
+++ b/src/StorageClient/ExternalEntityStorageClientInterface.php
@@ -77,6 +77,9 @@ interface ExternalEntityStorageClientInterface extends PluginInspectionInterface
+   *   A single external entity or array of raw data arrays each representing an external entity.

It can't be a single entity, because:

    $query_results = $this->getStorageClient()->query($this->parameters, $this->sort, $start, $length);
    $field_mapper = $this->getExternalEntityType()->getFieldMapper();
    $result = [];
    foreach ($query_results as $query_result) {
      $id = $field_mapper->extractIdFromRawData((array) $query_result);
      if (!empty($id)) {
        $result[$id] = $id;
      }
    }
sourabhjain’s picture

Status: Needs work » Needs review
StatusFileSize
new727 bytes
new637 bytes

Updated patch as issue mentioned in #8. Please review.

roberttabigue’s picture

Status: Needs review » Reviewed & tested by the community

Hi,

I reviewed the changes and it looks good on my end.

Moving this now to RTBC.

Thank you!

  • pefferen committed 4ecb68b9 on 8.x-2.x
    Issue #3376604: missing @return in docs for...
pefferen’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the work

sourabhjain’s picture

@pefferen I don't see you haven't given credit to anyone apart from you. Is there any specific reason?

pefferen’s picture

Status: Fixed » Closed (fixed)

No specific reason, I just forgot to set it properly, thanks for checking :)

joseph.olstad’s picture

@pefferen, it is normal to wait two weeks and let drupal.org automatically close issues. Now that you have force closed this issue no one else can re-open it should there be a regression to report.

When an issue is marked as Fixed and has no activity for 2 weeks, it is closed automatically.

pefferen’s picture

Status: Closed (fixed) » Fixed

thanks, @josepholstad I did not know, reopening to fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.