Source code should not contain TODO comments 2

More information: https://insight.symfony.com/what-we-analyse/task_todo_comment

  1. $pathOperation['tags'] = $subresourceOperation['shortNames'];
  2. $pathOperation['operationId'] = $operationId;
  3. $pathOperation['summary'] = sprintf('Retrieves %s%s resource%s.', $subresourceOperation['collection'] ? 'the collection of ' : 'a ', $subresourceOperation['shortNames'][0], $subresourceOperation['collection'] ? 's' : '');
  4. if (null === $this->formatsProvider) {
  5. // TODO: Subresource operation metadata aren't available by default, for now we have to fallback on default formats.

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Kévin Dunglas
  6. // TODO: A better approach would be to always populate the subresource operation array.
  7. $responseFormats = $this
  8. ->resourceMetadataFactory
  9. ->create($subresourceOperation['resource_class'])
  10. ->getTypedOperationAttribute(OperationType::SUBRESOURCE, $operationName, 'output_formats', $this->formats, true);
  1. $pathOperation['operationId'] = $operationId;
  2. $pathOperation['summary'] = sprintf('Retrieves %s%s resource%s.', $subresourceOperation['collection'] ? 'the collection of ' : 'a ', $subresourceOperation['shortNames'][0], $subresourceOperation['collection'] ? 's' : '');
  3. if (null === $this->formatsProvider) {
  4. // TODO: Subresource operation metadata aren't available by default, for now we have to fallback on default formats.
  5. // TODO: A better approach would be to always populate the subresource operation array.

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Kévin Dunglas
  6. $responseFormats = $this
  7. ->resourceMetadataFactory
  8. ->create($subresourceOperation['resource_class'])
  9. ->getTypedOperationAttribute(OperationType::SUBRESOURCE, $operationName, 'output_formats', $this->formats, true);
  10. } else {