diff --git a/console/controllers/FeedController.php b/console/controllers/FeedController.php index b2bbc79..02d5bde 100644 --- a/console/controllers/FeedController.php +++ b/console/controllers/FeedController.php @@ -21,12 +21,12 @@ class FeedController extends Controller private $count = 1; public function getProducts() { - return Product::find()->all(); + return Product::find()->all()->limit(10); } public function checkUrl($url){ if(!in_array($url, $this->urlList)){ - $this->urlList[] = array($url); + $this->urlList[] = $url; return true; } else { return false; @@ -37,7 +37,7 @@ class FeedController extends Controller $url = Url::to(['catalog/product', 'product' => $product]); if($this->checkUrl($url)){ print $this->count++ . "\n"; - $content[] = $url; + $content[] = [$url]; } } -- libgit2 0.21.4