From c5fa984e6ef41168039c19d6064749ebb180f87d Mon Sep 17 00:00:00 2001 From: Benjamin Perche Date: Wed, 18 Jun 2014 12:35:24 +0200 Subject: [PATCH] Fix cs --- setup/faker.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setup/faker.php b/setup/faker.php index a9a4afdae..eb3372185 100644 --- a/setup/faker.php +++ b/setup/faker.php @@ -496,7 +496,7 @@ try { echo "Creating orders\n"; - for($i=0; $i < 50; ++$i) { + for ($i=0; $i < 50; ++$i) { $placedOrder = new \Thelia\Model\Order(); @@ -902,11 +902,12 @@ function getRandomObject(\Propel\Runtime\ActiveQuery\ModelCriteria $query) { $max = $query->count(); - if($max === 0) { + if ($max === 0) { throw new Exception("There is no entry in ". get_class($query)); } $first_id = $query->findOne()->getId(); $obj = $query->findPk(mt_rand($first_id, $first_id+$max-1)); + return $obj; -} \ No newline at end of file +}