diff --git a/YaLinqo/Linq.php b/YaLinqo/Linq.php index f4867db..b2c3ddf 100644 --- a/YaLinqo/Linq.php +++ b/YaLinqo/Linq.php @@ -8,12 +8,14 @@ }); // @codeCoverageIgnoreEnd -/** - * @param array|\Iterator|\IteratorAggregate|\YaLinqo\Enumerable $source - * @throws \InvalidArgumentException If source is not array or Traversible or Enumerable. - * @return \YaLinqo\Enumerable - */ -function from ($source) -{ - return \YaLinqo\Enumerable::from($source); -} +if (!function_exists('from')) { + /** + * @param array|\Iterator|\IteratorAggregate|\YaLinqo\Enumerable $source + * @throws \InvalidArgumentException If source is not array or Traversible or Enumerable. + * @return \YaLinqo\Enumerable + */ + function from ($source) + { + return \YaLinqo\Enumerable::from($source); + } +} \ No newline at end of file