Skip to content

Commit

Permalink
FileEntityNormalizer::getEntityUri() typehint
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed Jun 17, 2015
1 parent 8fbd130 commit fe3ebb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Normalizer/FileEntityNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
namespace Drupal\file_entity\Normalizer;

use Drupal\Component\Utility\SafeMarkup;
use Drupal\Core\Entity\EntityInterface;
use Drupal\hal\Normalizer\ContentEntityNormalizer;
use Gliph\Exception\RuntimeException;
use Symfony\Component\Serializer\Exception\UnexpectedValueException;
Expand All @@ -24,7 +25,7 @@ class FileEntityNormalizer extends ContentEntityNormalizer {
/**
* {@inheritdoc}
*/
protected function getEntityUri($entity) {
protected function getEntityUri(EntityInterface $entity) {
// The URI should refer to the entity, not only directly to the file.
global $base_url;
return $base_url . $entity->urlInfo()->toString();
Expand Down
2 changes: 2 additions & 0 deletions src/Tests/FileEntityNormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
/**
* Tests the File entity normalizer.
*
* @see Drupal\file_entity\Normalizer\FileEntityNormalizer
*
* @group file_entity
*/
class FileEntityNormalizerTest extends KernelTestBase {
Expand Down

0 comments on commit fe3ebb8

Please sign in to comment.