Skip to content

Commit

Permalink
Merge pull request Sylius#9540 from pamil/1.1-phpstan-fixes
Browse files Browse the repository at this point in the history
PHPStan 0.10 upgrade & road to level 2 checks
  • Loading branch information
pamil authored Jul 3, 2018
2 parents e4dbd33 + 4cefa89 commit 8ff0c5b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Generator/PromotionCouponGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

use Doctrine\Common\Persistence\ObjectManager;
use Sylius\Component\Promotion\Exception\FailedGenerationException;
use Sylius\Component\Promotion\Model\PromotionCouponInterface;
use Sylius\Component\Promotion\Model\PromotionInterface;
use Sylius\Component\Promotion\Repository\PromotionCouponRepositoryInterface;
use Sylius\Component\Resource\Factory\FactoryInterface;
Expand Down Expand Up @@ -70,6 +71,8 @@ public function generate(PromotionInterface $promotion, PromotionCouponGenerator
$this->assertGenerationIsPossible($instruction);
for ($i = 0, $amount = $instruction->getAmount(); $i < $amount; ++$i) {
$code = $this->generateUniqueCode($instruction->getCodeLength(), $generatedCoupons);

/** @var PromotionCouponInterface $coupon */
$coupon = $this->couponFactory->createNew();
$coupon->setPromotion($promotion);
$coupon->setCode($code);
Expand Down

0 comments on commit 8ff0c5b

Please sign in to comment.