Skip to content

Commit

Permalink
Updating the collection object
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanedev-maroc committed Feb 11, 2018
1 parent 094dbf1 commit fa3c000
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
14 changes: 13 additions & 1 deletion src/Bases/MetaCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Arcanedev\SeoHelper\Contracts\Helpers\Meta as MetaContract;
use Arcanedev\SeoHelper\Contracts\Renderable;
use Arcanedev\SeoHelper\Helpers\Meta;
use Arcanedev\Support\Collection;
use Illuminate\Support\Collection;

/**
* Class MetaCollection
Expand Down Expand Up @@ -147,6 +147,18 @@ public function render()
return implode(PHP_EOL, array_filter($output));
}

/**
* Reset the collection.
*
* @return \Arcanedev\SeoHelper\Bases\MetaCollection
*/
public function reset()
{
$this->items = [];

return $this;
}

/**
* Render the tag.
*
Expand Down
1 change: 0 additions & 1 deletion tests/Entities/MetaCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public function it_can_be_instantiated()
$expectations = [
\Arcanedev\SeoHelper\Entities\MetaCollection::class,
\Arcanedev\SeoHelper\Contracts\Entities\MetaCollection::class,
\Arcanedev\Support\Collection::class,
\Illuminate\Support\Collection::class,
];

Expand Down

0 comments on commit fa3c000

Please sign in to comment.