Browse Source

phpcs.

pull/920/head
Rosie Le Faive 2 years ago
parent
commit
665abfbd6c
  1. 3
      src/Exception/IslandoraDerivativeException.php
  2. 2
      src/Plugin/Action/AbstractGenerateDerivative.php

3
src/Exception/IslandoraDerivativeException.php

@ -7,6 +7,5 @@ namespace Drupal\islandora\Exception;
* *
* @package islandora * @package islandora
*/ */
class IslandoraDerivativeException extends \RuntimeException class IslandoraDerivativeException extends \RuntimeException {
{
} }

2
src/Plugin/Action/AbstractGenerateDerivative.php

@ -65,7 +65,7 @@ class AbstractGenerateDerivative extends AbstractGenerateDerivativeBase {
// same as the source media. Dont cause an error, just don't continue. // same as the source media. Dont cause an error, just don't continue.
$derivative_media = $this->utils->getMediaWithTerm($entity, $derivative_term); $derivative_media = $this->utils->getMediaWithTerm($entity, $derivative_term);
if (!is_null($derivative_media) && $derivative_media->id() == $source_media->id()) { if (!is_null($derivative_media) && $derivative_media->id() == $source_media->id()) {
throw new IslandoraDerivativeException("Halting derivative, as source and target media are the same. Derivative term: [" . $this->configuration['derivative_term_uri'] . "] Source term: [" . $this->configuration['source_term_uri'] . "] Node id: [". $entity->id() . "].", 500); throw new IslandoraDerivativeException("Halting derivative, as source and target media are the same. Derivative term: [" . $this->configuration['derivative_term_uri'] . "] Source term: [" . $this->configuration['source_term_uri'] . "] Node id: [" . $entity->id() . "].", 500);
} }
$route_params = [ $route_params = [

Loading…
Cancel
Save