Skip to content

Commit

Permalink
PHPStan のエラーを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
nanasess committed Jan 15, 2021
1 parent 1ded4aa commit 45781e8
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/Eccube/Controller/Admin/Setting/Shop/MailController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\Routing\Annotation\Route;
use Twig\Environment;


/**
* Class MailController
*/
Expand Down
5 changes: 2 additions & 3 deletions src/Eccube/Entity/Master/AbstractMasterEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ protected static function getConstantValue($name)
throw new \InvalidArgumentException();
}
// see also. http://qiita.com/Hiraku/items/71e385b56dcaa37629fe
$class = get_class(new static());
$ref = new \ReflectionClass($class);
$ref = new \ReflectionClass(static::class);
// クラス定数が存在していれば, クラス定数から値を取得する
$constants = $ref->getConstants();
if (array_key_exists($name, $constants)) {
Expand All @@ -157,6 +156,6 @@ protected static function getConstantValue($name)
$refProperty = $ref->getProperty($name);
$refProperty->setAccessible(true);

return $refProperty->getValue(new $class());
return $refProperty->getValue($ref->newInstance());
}
}
30 changes: 30 additions & 0 deletions src/Eccube/Service/OrderHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,36 @@ class OrderHelper
*/
protected $orderItemTypeRepository;

/**
* @var OrderStatusRepository
*/
protected $orderStatusRepository;

/**
* @var DeliveryRepository
*/
protected $deliveryRepository;

/**
* @var PaymentRepository
*/
protected $paymentRepository;

/**
* @var DeviceTypeRepository
*/
protected $deviceTypeRepository;

/**
* @var MobileDetector
*/
protected $mobileDetector;

/**
* @var EntityManagerInterface
*/
protected $entityManager;

public function __construct(
ContainerInterface $container,
EntityManagerInterface $entityManager,
Expand Down

0 comments on commit 45781e8

Please sign in to comment.