Skip to content

Commit

Permalink
[Translator] optimized adding of resources and saving a call to array…
Browse files Browse the repository at this point in the history
…_unique
  • Loading branch information
Tobion committed Feb 14, 2013
1 parent 42357bb commit 296920a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MessageCatalogue.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public function getFallbackCatalogue()
*/
public function getResources()
{
return array_values(array_unique($this->resources));
return array_values($this->resources);
}

/**
Expand All @@ -230,7 +230,7 @@ public function getResources()
*/
public function addResource(ResourceInterface $resource)
{
$this->resources[] = $resource;
$this->resources[$resource->__toString()] = $resource;
}

/**
Expand Down

0 comments on commit 296920a

Please sign in to comment.