Skip to content

Commit

Permalink
LazyCollection: drop Nette dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
fprochazka committed Mar 29, 2016
1 parent aa246fc commit 6600581
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Kdyby/Doctrine/Collections/LazyCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
use Doctrine\Common\Collections\Criteria;
use Doctrine\Common\Collections\Selectable;
use Kdyby;
use Nette;
use Nette\Utils\Callback;



Expand All @@ -41,7 +39,10 @@ class LazyCollection implements Collection, Selectable

public function __construct($callback)
{
$this->callback = Callback::check($callback);
if (!is_callable($callback)) {
throw new \InvalidArgumentException('Given value is not a callable type.');
}
$this->callback = $callback;
}


Expand Down

0 comments on commit 6600581

Please sign in to comment.