From 479d7ce83a82bdd0b5a333f807a13e8c8c6d949e Mon Sep 17 00:00:00 2001 From: TOMINAGA HAYATO Date: Mon, 11 Mar 2024 20:58:42 +0900 Subject: [PATCH] =?UTF-8?q?=E5=9E=8B=E5=AE=9A=E7=BE=A9=E3=81=AE=E8=A8=98?= =?UTF-8?q?=E8=BF=B0=E3=81=AB=E8=AA=A4=E3=82=8A=E3=81=8C=E3=81=82=E3=82=8B?= =?UTF-8?q?=E3=82=82=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Eccube/Controller/Admin/AdminController.php | 2 +- .../Admin/Customer/CustomerController.php | 2 +- .../Controller/Admin/Order/EditController.php | 10 +++++----- .../Controller/Admin/Order/MailController.php | 2 +- .../Admin/Product/CategoryController.php | 4 ++-- .../Admin/Product/CsvImportController.php | 4 ++-- .../Admin/Product/ProductController.php | 16 ++++++++-------- .../Controller/Admin/Product/TagController.php | 2 +- .../Admin/Setting/Shop/TaxRuleController.php | 2 +- .../Admin/Store/TemplateController.php | 2 +- src/Eccube/Controller/EntryController.php | 6 +++--- .../Controller/Mypage/ChangeController.php | 4 ++-- .../Controller/Mypage/MypageController.php | 4 ++-- .../Controller/Mypage/WithdrawController.php | 2 +- src/Eccube/Controller/ProductController.php | 8 ++++---- src/Eccube/Controller/ShoppingController.php | 2 +- .../Compiler/NavCompilerPass.php | 2 +- .../Compiler/TwigBlockPass.php | 2 +- src/Eccube/Entity/Order.php | 2 +- src/Eccube/Entity/Product.php | 2 +- src/Eccube/Form/Type/AddCartType.php | 2 +- src/Eccube/Repository/TaxRuleRepository.php | 2 +- src/Eccube/Service/MailService.php | 2 +- src/Eccube/Service/OrderHelper.php | 6 +++--- src/Eccube/Service/OrderStateMachine.php | 2 +- src/Eccube/Service/TaxRuleService.php | 2 +- src/Eccube/Twig/Extension/EccubeExtension.php | 2 +- .../Tests/Service/CsvExportServiceTest.php | 2 +- .../Web/Admin/Order/OrderControllerTest.php | 4 ++-- .../Product/ClassCategoryControllerTest.php | 2 +- .../Admin/Product/CsvImportControllerTest.php | 16 ++++++++-------- .../Admin/Product/ProductClassControllerTest.php | 2 +- .../Web/Admin/Product/ProductControllerTest.php | 12 ++++++------ .../Admin/Setting/System/LogControllerTest.php | 4 ++-- tests/Eccube/Tests/Web/ProductControllerTest.php | 16 ++++++++-------- .../Eccube/Tests/Web/ShoppingControllerTest.php | 2 +- 36 files changed, 79 insertions(+), 79 deletions(-) diff --git a/src/Eccube/Controller/Admin/AdminController.php b/src/Eccube/Controller/Admin/AdminController.php index 9550a991eee..0b5b6cebbc2 100644 --- a/src/Eccube/Controller/Admin/AdminController.php +++ b/src/Eccube/Controller/Admin/AdminController.php @@ -135,7 +135,7 @@ public function login(Request $request) return $this->redirectToRoute('admin_homepage'); } - /* @var $form \Symfony\Component\Form\FormInterface */ + /** @var \Symfony\Component\Form\FormInterface $form */ $builder = $this->formFactory->createNamedBuilder('', LoginType::class); $event = new EventArgs( diff --git a/src/Eccube/Controller/Admin/Customer/CustomerController.php b/src/Eccube/Controller/Admin/Customer/CustomerController.php index f8f145a5805..8fe974afd22 100644 --- a/src/Eccube/Controller/Admin/Customer/CustomerController.php +++ b/src/Eccube/Controller/Admin/Customer/CustomerController.php @@ -304,7 +304,7 @@ public function export(Request $request) $this->csvExportService->exportData(function ($entity, $csvService) use ($request) { $Csvs = $csvService->getCsvs(); - /** @var $Customer \Eccube\Entity\Customer */ + /** @var \Eccube\Entity\Customer $Customer */ $Customer = $entity; $ExportCsvRow = new \Eccube\Entity\ExportCsvRow(); diff --git a/src/Eccube/Controller/Admin/Order/EditController.php b/src/Eccube/Controller/Admin/Order/EditController.php index 11cfc38fc1b..0aadb2f481c 100644 --- a/src/Eccube/Controller/Admin/Order/EditController.php +++ b/src/Eccube/Controller/Admin/Order/EditController.php @@ -221,7 +221,7 @@ public function index(Request $request, RouterInterface $router, $id = null) $form->handleRequest($request); $purchaseContext = new PurchaseContext($OriginOrder, $OriginOrder->getCustomer()); - + foreach ($TargetOrder->getOrderItems() as $orderItem) { if ($orderItem->getTaxDisplayType() == null) { $orderItem->setTaxDisplayType($this->orderHelper->getTaxDisplayType($orderItem->getOrderItemType())); @@ -466,7 +466,7 @@ public function searchCustomerHtml(Request $request, PaginatorInterface $paginat ['wrap-queries' => true] ); - /** @var $Customers \Eccube\Entity\Customer[] */ + /** @var \Eccube\Entity\Customer[] $Customers */ $Customers = $pagination->getItems(); if (empty($Customers)) { @@ -519,7 +519,7 @@ public function searchCustomerById(Request $request) if ($request->isXmlHttpRequest() && $this->isTokenValid()) { log_debug('search customer by id start.'); - /** @var $Customer \Eccube\Entity\Customer */ + /** @var \Eccube\Entity\Customer $Customer */ $Customer = $this->customerRepository ->find($request->get('id')); @@ -625,7 +625,7 @@ public function searchProduct(Request $request, PaginatorInterface $paginator, $ ['wrap-queries' => true] ); - /** @var $Products \Eccube\Entity\Product[] */ + /** @var \Eccube\Entity\Product[] $Products */ $Products = $pagination->getItems(); if (empty($Products)) { @@ -634,7 +634,7 @@ public function searchProduct(Request $request, PaginatorInterface $paginator, $ $forms = []; foreach ($Products as $Product) { - /* @var $builder \Symfony\Component\Form\FormBuilderInterface */ + /** @var \Symfony\Component\Form\FormBuilderInterface $builder */ $builder = $this->formFactory->createNamedBuilder('', AddCartType::class, null, [ 'product' => $Product, ]); diff --git a/src/Eccube/Controller/Admin/Order/MailController.php b/src/Eccube/Controller/Admin/Order/MailController.php index 34a2aa1fe3b..a126f2e5ae6 100644 --- a/src/Eccube/Controller/Admin/Order/MailController.php +++ b/src/Eccube/Controller/Admin/Order/MailController.php @@ -100,7 +100,7 @@ public function index(Request $request, Order $Order) switch ($mode) { case 'change': if ($form->get('template')->isValid()) { - /** @var $data \Eccube\Entity\MailTemplate */ + /** @var \Eccube\Entity\MailTemplate $data */ $MailTemplate = $form->get('template')->getData(); if ($MailTemplate) { diff --git a/src/Eccube/Controller/Admin/Product/CategoryController.php b/src/Eccube/Controller/Admin/Product/CategoryController.php index 56abb930573..92da87d0161 100644 --- a/src/Eccube/Controller/Admin/Product/CategoryController.php +++ b/src/Eccube/Controller/Admin/Product/CategoryController.php @@ -270,7 +270,7 @@ public function moveSortNo(Request $request, CacheUtil $cacheUtil) if ($this->isTokenValid()) { $sortNos = $request->request->all(); foreach ($sortNos as $categoryId => $sortNo) { - /* @var $Category \Eccube\Entity\Category */ + /** @var \Eccube\Entity\Category $Category */ $Category = $this->categoryRepository ->find($categoryId); $Category->setSortNo($sortNo); @@ -319,7 +319,7 @@ public function export(Request $request) $this->csvExportService->exportData(function ($entity, $csvService) use ($request) { $Csvs = $csvService->getCsvs(); - /** @var $Category \Eccube\Entity\Category */ + /** @var \Eccube\Entity\Category $Category */ $Category = $entity; // CSV出力項目と合致するデータを取得. diff --git a/src/Eccube/Controller/Admin/Product/CsvImportController.php b/src/Eccube/Controller/Admin/Product/CsvImportController.php index 361b4a8a27d..31e9c282444 100644 --- a/src/Eccube/Controller/Admin/Product/CsvImportController.php +++ b/src/Eccube/Controller/Admin/Product/CsvImportController.php @@ -733,7 +733,7 @@ public function csvCategory(Request $request, CacheUtil $cacheUtil) $this->entityManager->getConnection()->beginTransaction(); // CSVファイルの登録処理 foreach ($data as $row) { - /** @var $Category Category */ + /** @var Category $Category */ $Category = new Category(); if (isset($row[$headerByKey['id']]) && strlen($row[$headerByKey['id']]) > 0) { if (!preg_match('/^\d+$/', $row[$headerByKey['id']])) { @@ -790,7 +790,7 @@ public function csvCategory(Request $request, CacheUtil $cacheUtil) return $this->renderWithError($form, $headers); } - /** @var $ParentCategory Category */ + /** @var Category $ParentCategory */ $ParentCategory = $this->categoryRepository->find($row[$headerByKey['parent_category_id']]); if (!$ParentCategory) { $this->addErrors(($data->key() + 1).'行目の親カテゴリIDが存在しません。'); diff --git a/src/Eccube/Controller/Admin/Product/ProductController.php b/src/Eccube/Controller/Admin/Product/ProductController.php index 091a456dc6c..6f1f987b65d 100644 --- a/src/Eccube/Controller/Admin/Product/ProductController.php +++ b/src/Eccube/Controller/Admin/Product/ProductController.php @@ -295,7 +295,7 @@ public function loadProductClasses(Request $request, Product $Product) } $data = []; - /** @var $Product ProductRepository */ + /** @var ProductRepository $Product */ if (!$Product) { throw new NotFoundHttpException(); } @@ -504,7 +504,7 @@ public function edit(Request $request, RouterInterface $router, CacheUtil $cache $categories = []; $ProductCategories = $Product->getProductCategories(); foreach ($ProductCategories as $ProductCategory) { - /* @var $ProductCategory \Eccube\Entity\ProductCategory */ + /** @var \Eccube\Entity\ProductCategory $ProductCategory*/ $categories[] = $ProductCategory->getCategory(); } $form['Category']->setData($categories); @@ -557,7 +557,7 @@ public function edit(Request $request, RouterInterface $router, CacheUtil $cache // カテゴリの登録 // 一度クリア - /* @var $Product \Eccube\Entity\Product */ + /** @var \Eccube\Entity\Product $Product */ foreach ($Product->getProductCategories() as $ProductCategory) { $Product->removeProductCategory($ProductCategory); $this->entityManager->remove($ProductCategory); @@ -574,7 +574,7 @@ public function edit(Request $request, RouterInterface $router, CacheUtil $cache $ProductCategory = $this->createProductCategory($Product, $ParentCategory, $count); $this->entityManager->persist($ProductCategory); $count++; - /* @var $Product \Eccube\Entity\Product */ + /** @var \Eccube\Entity\Product $Product */ $Product->addProductCategory($ProductCategory); $categoriesIdList[$ParentCategory->getId()] = true; } @@ -583,7 +583,7 @@ public function edit(Request $request, RouterInterface $router, CacheUtil $cache $ProductCategory = $this->createProductCategory($Product, $Category, $count); $this->entityManager->persist($ProductCategory); $count++; - /* @var $Product \Eccube\Entity\Product */ + /** @var \Eccube\Entity\Product $Product */ $Product->addProductCategory($ProductCategory); $categoriesIdList[$Category->getId()] = true; } @@ -759,7 +759,7 @@ public function delete(Request $request, CacheUtil $cacheUtil, $id = null) $success = false; if (!is_null($id)) { - /* @var $Product \Eccube\Entity\Product */ + /** @var \Eccube\Entity\Product $Product */ $Product = $this->productRepository->find($id); if (!$Product) { if ($request->isXmlHttpRequest()) { @@ -1002,10 +1002,10 @@ public function export(Request $request) $this->csvExportService->exportData(function ($entity, CsvExportService $csvService) use ($request) { $Csvs = $csvService->getCsvs(); - /** @var $Product \Eccube\Entity\Product */ + /** @var \Eccube\Entity\Product $Product */ $Product = $entity; - /** @var $ProductClasses \Eccube\Entity\ProductClass[] */ + /** @var \Eccube\Entity\ProductClass[] $ProductClasses */ $ProductClasses = $Product->getProductClasses(); foreach ($ProductClasses as $ProductClass) { diff --git a/src/Eccube/Controller/Admin/Product/TagController.php b/src/Eccube/Controller/Admin/Product/TagController.php index 6f63f5a6a1f..3598f9c115f 100644 --- a/src/Eccube/Controller/Admin/Product/TagController.php +++ b/src/Eccube/Controller/Admin/Product/TagController.php @@ -163,7 +163,7 @@ public function moveSortNo(Request $request) if ($request->isXmlHttpRequest() && $this->isTokenValid()) { $sortNos = $request->request->all(); foreach ($sortNos as $tagId => $sortNo) { - /* @var $Tag \Eccube\Entity\Tag */ + /** @var \Eccube\Entity\Tag $Tag */ $Tag = $this->tagRepository ->find($tagId); $Tag->setSortNo($sortNo); diff --git a/src/Eccube/Controller/Admin/Setting/Shop/TaxRuleController.php b/src/Eccube/Controller/Admin/Setting/Shop/TaxRuleController.php index b389802e405..1b8e4e5ed3e 100644 --- a/src/Eccube/Controller/Admin/Setting/Shop/TaxRuleController.php +++ b/src/Eccube/Controller/Admin/Setting/Shop/TaxRuleController.php @@ -108,7 +108,7 @@ public function index(Request $request) $errors = []; /** @var TaxRule $TaxRule */ foreach ($TaxRules as $TaxRule) { - /* @var $builder \Symfony\Component\Form\FormBuilderInterface */ + /** @var \Symfony\Component\Form\FormBuilderInterface $builder */ $builder = $this->formFactory->createBuilder(TaxRuleType::class, $TaxRule); if ($TaxRule->isDefaultTaxRule()) { $builder->remove('apply_date'); diff --git a/src/Eccube/Controller/Admin/Store/TemplateController.php b/src/Eccube/Controller/Admin/Store/TemplateController.php index 02490955276..00327ed994d 100644 --- a/src/Eccube/Controller/Admin/Store/TemplateController.php +++ b/src/Eccube/Controller/Admin/Store/TemplateController.php @@ -227,7 +227,7 @@ public function install(Request $request) $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { - /** @var $Template \Eccube\Entity\Template */ + /** @var \Eccube\Entity\Template $Template */ $Template = $form->getData(); $TemplateExists = $this->templateRepository->findByCode($Template->getCode()); diff --git a/src/Eccube/Controller/EntryController.php b/src/Eccube/Controller/EntryController.php index 01c01f68650..927840a1d90 100644 --- a/src/Eccube/Controller/EntryController.php +++ b/src/Eccube/Controller/EntryController.php @@ -131,10 +131,10 @@ public function index(Request $request) return $this->redirectToRoute('mypage'); } - /** @var $Customer \Eccube\Entity\Customer */ + /** @var \Eccube\Entity\Customer $Customer */ $Customer = $this->customerRepository->newCustomer(); - /* @var $builder \Symfony\Component\Form\FormBuilderInterface */ + /** @var \Symfony\Component\Form\FormBuilderInterface $builder */ $builder = $this->formFactory->createBuilder(EntryType::class, $Customer); $event = new EventArgs( @@ -146,7 +146,7 @@ public function index(Request $request) ); $this->eventDispatcher->dispatch($event, EccubeEvents::FRONT_ENTRY_INDEX_INITIALIZE); - /* @var $form \Symfony\Component\Form\FormInterface */ + /** @var \Symfony\Component\Form\FormInterface $form */ $form = $builder->getForm(); $form->handleRequest($request); diff --git a/src/Eccube/Controller/Mypage/ChangeController.php b/src/Eccube/Controller/Mypage/ChangeController.php index ce6142f79d1..beede9185fa 100644 --- a/src/Eccube/Controller/Mypage/ChangeController.php +++ b/src/Eccube/Controller/Mypage/ChangeController.php @@ -83,7 +83,7 @@ public function index(Request $request) $Customer = $this->getUser(); $Customer->setPlainPassword($this->eccubeConfig['eccube_default_password']); - /* @var $builder \Symfony\Component\Form\FormBuilderInterface */ + /** @var \Symfony\Component\Form\FormBuilderInterface $builder */ $builder = $this->formFactory->createBuilder(EntryType::class, $Customer); $event = new EventArgs( @@ -95,7 +95,7 @@ public function index(Request $request) ); $this->eventDispatcher->dispatch($event, EccubeEvents::FRONT_MYPAGE_CHANGE_INDEX_INITIALIZE); - /* @var $form \Symfony\Component\Form\FormInterface */ + /** @var \Symfony\Component\Form\FormInterface $form */ $form = $builder->getForm(); $form->handleRequest($request); diff --git a/src/Eccube/Controller/Mypage/MypageController.php b/src/Eccube/Controller/Mypage/MypageController.php index a50e17fa13e..3398f5b83fb 100644 --- a/src/Eccube/Controller/Mypage/MypageController.php +++ b/src/Eccube/Controller/Mypage/MypageController.php @@ -106,7 +106,7 @@ public function login(Request $request, AuthenticationUtils $utils) return $this->redirectToRoute('mypage'); } - /* @var $form \Symfony\Component\Form\FormInterface */ + /** @var \Symfony\Component\Form\FormInterface $form */ $builder = $this->formFactory ->createNamedBuilder('', CustomerLoginType::class); @@ -233,7 +233,7 @@ public function order(Request $request, $order_no) $Customer = $this->getUser(); - /* @var $Order \Eccube\Entity\Order */ + /** @var \Eccube\Entity\Order $Order */ $Order = $this->orderRepository->findOneBy( [ 'order_no' => $order_no, diff --git a/src/Eccube/Controller/Mypage/WithdrawController.php b/src/Eccube/Controller/Mypage/WithdrawController.php index 982f85bdc55..861470f8d51 100644 --- a/src/Eccube/Controller/Mypage/WithdrawController.php +++ b/src/Eccube/Controller/Mypage/WithdrawController.php @@ -126,7 +126,7 @@ public function index(Request $request) case 'complete': log_info('退会処理開始'); - /* @var $Customer \Eccube\Entity\Customer */ + /** @var \Eccube\Entity\Customer $Customer */ $Customer = $this->getUser(); $email = $Customer->getEmail(); diff --git a/src/Eccube/Controller/ProductController.php b/src/Eccube/Controller/ProductController.php index e8b4f11a385..7857c9169bb 100644 --- a/src/Eccube/Controller/ProductController.php +++ b/src/Eccube/Controller/ProductController.php @@ -124,7 +124,7 @@ public function index(Request $request, PaginatorInterface $paginator) } // searchForm - /* @var $builder \Symfony\Component\Form\FormBuilderInterface */ + /** @var \Symfony\Component\Form\FormBuilderInterface $builder */ $builder = $this->formFactory->createNamedBuilder('', SearchProductType::class); if ($request->getMethod() === 'GET') { @@ -139,7 +139,7 @@ public function index(Request $request, PaginatorInterface $paginator) ); $this->eventDispatcher->dispatch($event, EccubeEvents::FRONT_PRODUCT_INDEX_INITIALIZE); - /* @var $searchForm \Symfony\Component\Form\FormInterface */ + /** @var \Symfony\Component\Form\FormInterface $searchForm */ $searchForm = $builder->getForm(); $searchForm->handleRequest($request); @@ -177,7 +177,7 @@ public function index(Request $request, PaginatorInterface $paginator) // addCart form $forms = []; foreach ($pagination as $Product) { - /* @var $builder \Symfony\Component\Form\FormBuilderInterface */ + /** @var \Symfony\Component\Form\FormBuilderInterface $builder */ $builder = $this->formFactory->createNamedBuilder( '', AddCartType::class, @@ -336,7 +336,7 @@ public function addCart(Request $request, Product $Product) ); $this->eventDispatcher->dispatch($event, EccubeEvents::FRONT_PRODUCT_CART_ADD_INITIALIZE); - /* @var $form \Symfony\Component\Form\FormInterface */ + /** @var \Symfony\Component\Form\FormInterface $form */ $form = $builder->getForm(); $form->handleRequest($request); diff --git a/src/Eccube/Controller/ShoppingController.php b/src/Eccube/Controller/ShoppingController.php index e969eae0662..3893a6d47e2 100644 --- a/src/Eccube/Controller/ShoppingController.php +++ b/src/Eccube/Controller/ShoppingController.php @@ -761,7 +761,7 @@ public function login(Request $request, AuthenticationUtils $authenticationUtils return $this->redirectToRoute('shopping'); } - /* @var $form \Symfony\Component\Form\FormInterface */ + /** @var \Symfony\Component\Form\FormInterface $form */ $builder = $this->formFactory->createNamedBuilder('', CustomerLoginType::class); if ($this->isGranted('IS_AUTHENTICATED_REMEMBERED')) { diff --git a/src/Eccube/DependencyInjection/Compiler/NavCompilerPass.php b/src/Eccube/DependencyInjection/Compiler/NavCompilerPass.php index 21735f296d4..0dfbe0268a5 100644 --- a/src/Eccube/DependencyInjection/Compiler/NavCompilerPass.php +++ b/src/Eccube/DependencyInjection/Compiler/NavCompilerPass.php @@ -33,7 +33,7 @@ public function process(ContainerBuilder $container) throw new \InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, EccubeNav::class)); } - /** @var $class EccubeNav */ + /** @var EccubeNav $class */ $addNav = $class::getNav(); $nav = array_replace_recursive($nav, $addNav); } diff --git a/src/Eccube/DependencyInjection/Compiler/TwigBlockPass.php b/src/Eccube/DependencyInjection/Compiler/TwigBlockPass.php index 54705e28270..ee56c77c840 100644 --- a/src/Eccube/DependencyInjection/Compiler/TwigBlockPass.php +++ b/src/Eccube/DependencyInjection/Compiler/TwigBlockPass.php @@ -33,7 +33,7 @@ public function process(ContainerBuilder $container) throw new \InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, EccubeTwigBlock::class)); } - /** @var $class EccubeTwigBlock */ + /** @var EccubeTwigBlock $class */ $blocks = $class::getTwigBlock(); foreach ($blocks as $block) { $templates[] = $block; diff --git a/src/Eccube/Entity/Order.php b/src/Eccube/Entity/Order.php index 5a31b76c210..057200ebfd4 100644 --- a/src/Eccube/Entity/Order.php +++ b/src/Eccube/Entity/Order.php @@ -271,7 +271,7 @@ public function getSaleTypes() { $saleTypes = []; foreach ($this->getOrderItems() as $OrderItem) { - /* @var $ProductClass \Eccube\Entity\ProductClass */ + /** @var \Eccube\Entity\ProductClass $ProductClass */ $ProductClass = $OrderItem->getProductClass(); if ($ProductClass) { $saleTypes[] = $ProductClass->getSaleType(); diff --git a/src/Eccube/Entity/Product.php b/src/Eccube/Entity/Product.php index 9c934e63372..8c77829dc4d 100644 --- a/src/Eccube/Entity/Product.php +++ b/src/Eccube/Entity/Product.php @@ -55,7 +55,7 @@ public function _calc() if (!$this->_calc) { $i = 0; foreach ($this->getProductClasses() as $ProductClass) { - /* @var $ProductClass \Eccube\Entity\ProductClass */ + /** @var \Eccube\Entity\ProductClass $ProductClass */ // stock_find if ($ProductClass->isVisible() == false) { continue; diff --git a/src/Eccube/Form/Type/AddCartType.php b/src/Eccube/Form/Type/AddCartType.php index c91c5ebfd41..a791e21ddb2 100644 --- a/src/Eccube/Form/Type/AddCartType.php +++ b/src/Eccube/Form/Type/AddCartType.php @@ -68,7 +68,7 @@ public function __construct(ManagerRegistry $doctrine, EccubeConfig $config) */ public function buildForm(FormBuilderInterface $builder, array $options) { - /* @var $Product \Eccube\Entity\Product */ + /** @var \Eccube\Entity\Product $Product */ $Product = $options['product']; $this->Product = $Product; $ProductClasses = $Product->getProductClasses(); diff --git a/src/Eccube/Repository/TaxRuleRepository.php b/src/Eccube/Repository/TaxRuleRepository.php index ea265225690..ae289049ce8 100644 --- a/src/Eccube/Repository/TaxRuleRepository.php +++ b/src/Eccube/Repository/TaxRuleRepository.php @@ -112,7 +112,7 @@ public function getByRule($Product = null, $ProductClass = null, $Pref = null, $ { // Pref Country 設定 if (!$Pref && !$Country && $this->tokenStorage->getToken() && $this->authorizationChecker->isGranted('ROLE_USER')) { - /* @var $Customer \Eccube\Entity\Customer */ + /** @var \Eccube\Entity\Customer $Customer */ $Customer = $this->tokenStorage->getToken()->getUser(); // FIXME なぜか管理画面でも実行されている. if ($Customer instanceof Customer) { diff --git a/src/Eccube/Service/MailService.php b/src/Eccube/Service/MailService.php index 2795dc2e58a..68fee92ff6d 100644 --- a/src/Eccube/Service/MailService.php +++ b/src/Eccube/Service/MailService.php @@ -423,7 +423,7 @@ public function sendAdminCustomerConfirmMail(Customer $Customer, $activateUrl) { log_info('仮会員登録再送メール送信開始'); - /* @var $MailTemplate \Eccube\Entity\MailTemplate */ + /** @var \Eccube\Entity\MailTemplate $MailTemplate */ $MailTemplate = $this->mailTemplateRepository->find($this->eccubeConfig['eccube_entry_confirm_mail_template_id']); $body = $this->twig->render($MailTemplate->getFileName(), [ diff --git a/src/Eccube/Service/OrderHelper.php b/src/Eccube/Service/OrderHelper.php index 8c6def6d3c1..a62d394becb 100644 --- a/src/Eccube/Service/OrderHelper.php +++ b/src/Eccube/Service/OrderHelper.php @@ -386,10 +386,10 @@ protected function createOrderItemsFromCartItems($CartItems) $ProductItemType = $this->orderItemTypeRepository->find(OrderItemType::PRODUCT); return array_map(function ($item) use ($ProductItemType) { - /* @var $item CartItem */ - /* @var $ProductClass \Eccube\Entity\ProductClass */ + /** @var CartItem $item */ + /** @var \Eccube\Entity\ProductClass $ProductClass */ $ProductClass = $item->getProductClass(); - /* @var $Product \Eccube\Entity\Product */ + /** @var \Eccube\Entity\Product $Product */ $Product = $ProductClass->getProduct(); $OrderItem = new OrderItem(); diff --git a/src/Eccube/Service/OrderStateMachine.php b/src/Eccube/Service/OrderStateMachine.php index 14d6e4442fc..e74c40ca134 100644 --- a/src/Eccube/Service/OrderStateMachine.php +++ b/src/Eccube/Service/OrderStateMachine.php @@ -217,7 +217,7 @@ public function rollbackAddPoint(Event $event) */ public function onCompleted(Event $event) { - /** @var $context OrderStateMachineContext */ + /** @var OrderStateMachineContext $context */ $context = $event->getSubject(); $Order = $context->getOrder(); $CompletedOrderStatus = $this->orderStatusRepository->find($context->getStatus()); diff --git a/src/Eccube/Service/TaxRuleService.php b/src/Eccube/Service/TaxRuleService.php index 50ad60711bd..9f1e9849eb8 100644 --- a/src/Eccube/Service/TaxRuleService.php +++ b/src/Eccube/Service/TaxRuleService.php @@ -54,7 +54,7 @@ public function getTax($price, $product = null, $productClass = null, $pref = nu * 商品別税率が有効で商品別税率が設定されていない場合は基本税率 * 商品別税率が無効の場合は基本税率 */ - /* @var $TaxRule \Eccube\Entity\TaxRule */ + /** @var \Eccube\Entity\TaxRule $TaxRule */ if ($this->BaseInfo->isOptionProductTaxRule() && $productClass) { if ($productClass instanceof ProductClass) { $TaxRule = $productClass->getTaxRule() ?: $this->taxRuleRepository->getByRule(null, null, $pref, $country); diff --git a/src/Eccube/Twig/Extension/EccubeExtension.php b/src/Eccube/Twig/Extension/EccubeExtension.php index b21ad3fa875..d4aa155ed33 100644 --- a/src/Eccube/Twig/Extension/EccubeExtension.php +++ b/src/Eccube/Twig/Extension/EccubeExtension.php @@ -250,7 +250,7 @@ public function getClassCategoriesAsJson(Product $Product) if (!$ProductClass->isVisible()) { continue; } - /* @var $ProductClass \Eccube\Entity\ProductClass */ + /** @var \Eccube\Entity\ProductClass $ProductClass */ $ClassCategory1 = $ProductClass->getClassCategory1(); $ClassCategory2 = $ProductClass->getClassCategory2(); if ($ClassCategory2 && !$ClassCategory2->isVisible()) { diff --git a/tests/Eccube/Tests/Service/CsvExportServiceTest.php b/tests/Eccube/Tests/Service/CsvExportServiceTest.php index 03a8d934b29..def52d4bb2a 100644 --- a/tests/Eccube/Tests/Service/CsvExportServiceTest.php +++ b/tests/Eccube/Tests/Service/CsvExportServiceTest.php @@ -106,7 +106,7 @@ public function testExportData() $this->csvExportService->exportData(function ($entity, $csvService) { $Csvs = $csvService->getCsvs(); - /** @var $Order \Eccube\Entity\Order */ + /** @var \Eccube\Entity\Order $Order */ $Order = $entity; $row = []; // CSV出力項目と合致するデータを取得. diff --git a/tests/Eccube/Tests/Web/Admin/Order/OrderControllerTest.php b/tests/Eccube/Tests/Web/Admin/Order/OrderControllerTest.php index 810c6f51fe3..48b9ada864b 100644 --- a/tests/Eccube/Tests/Web/Admin/Order/OrderControllerTest.php +++ b/tests/Eccube/Tests/Web/Admin/Order/OrderControllerTest.php @@ -314,7 +314,7 @@ public function testSearchWithEmail() '_token' => 'dummy', 'email' => 'user-1', ]; - /* @var $crawler Crawler */ + /** @var Crawler $crawler */ $crawler = $this->client->request( 'POST', $this->generateUrl('admin_order'), @@ -328,7 +328,7 @@ public function testSearchWithEmail() $this->actual = $crawler->filter('#search_form #search_total_count')->text(); $this->verify(); - /* @var $customer \Eccube\Entity\Customer */ + /** @var \Eccube\Entity\Customer $customer */ $customer = $this->customerRepository->findOneBy(['email' => 'user-1@example.com']); $this->assertStringContainsString($customer->getName01(), $crawler->filter('table#search_result')->html()); diff --git a/tests/Eccube/Tests/Web/Admin/Product/ClassCategoryControllerTest.php b/tests/Eccube/Tests/Web/Admin/Product/ClassCategoryControllerTest.php index ad9dd6bfd94..257d1ea8c51 100644 --- a/tests/Eccube/Tests/Web/Admin/Product/ClassCategoryControllerTest.php +++ b/tests/Eccube/Tests/Web/Admin/Product/ClassCategoryControllerTest.php @@ -201,7 +201,7 @@ public function testRoutingAdminProductClassCategoryToggle() */ public function testClassCategorySortByRank() { - /* @var $ClassCategory \Eccube\Entity\ClassCategory */ + /** @var \Eccube\Entity\ClassCategory $ClassCategory */ //set チョコ rank $ClassCategory = $this->classCategoryRepository->findOneBy(['name' => 'チョコ']); $testData[$ClassCategory->getId()] = 1; diff --git a/tests/Eccube/Tests/Web/Admin/Product/CsvImportControllerTest.php b/tests/Eccube/Tests/Web/Admin/Product/CsvImportControllerTest.php index 74bf80003de..7d09151913e 100644 --- a/tests/Eccube/Tests/Web/Admin/Product/CsvImportControllerTest.php +++ b/tests/Eccube/Tests/Web/Admin/Product/CsvImportControllerTest.php @@ -177,9 +177,9 @@ public function testCsvProduct() // expected categories is $expectedIds = $this->getExpectedCategoriesIdList($csvCat[$nameHash]); $actualIds = []; - /* @var $Product \Eccube\Entity\Product */ + /** @var \Eccube\Entity\Product $Product */ foreach ($Product->getProductCategories() as $ProductCategory) { - /* @var $ProductCategory \Eccube\Entity\ProductCategory */ + /** @var \Eccube\Entity\ProductCategory $ProductCategory */ $actualIds[$ProductCategory->getCategoryId()] = $ProductCategory->getCategoryId(); $this->expected = $expectedIds[$ProductCategory->getCategoryId()]; $this->actual = $ProductCategory->getCategoryId(); @@ -352,7 +352,7 @@ public function testCsvImportWithExistsProductsAddProductClass() // expected categories is $expectedIds = $this->getExpectedCategoriesIdList($csvCat[$nameHash]); $actualIds = []; - /* @var $ProductCategory \Eccube\Entity\ProductCategory */ + /** @var \Eccube\Entity\ProductCategory $ProductCategory */ foreach ($Product->getProductCategories() as $ProductCategory) { $actualIds[$ProductCategory->getCategoryId()] = $ProductCategory->getCategoryId(); $this->expected = $expectedIds[$ProductCategory->getCategoryId()]; @@ -568,7 +568,7 @@ public function testCsvCategoryWithColumnSorted() $this->filepath = __DIR__.'/categories.csv'; copy(__DIR__.'/../../../../../Fixtures/categories.csv', $this->filepath); // 削除されてしまうのでコピーしておく - /** @var $faker \Faker\Generator */ + /** @var \Faker\Generator $faker */ $faker = $this->getFaker(); $categoryName = 'CategoryNameTest'; $csv = [ @@ -642,9 +642,9 @@ public function testImportProductWithColumnIsMissed() // expected categories is $expectedIds = $this->getExpectedCategoriesIdList($csvCat[$nameHash]); $actualIds = []; - /* @var $Product \Eccube\Entity\Product */ + /** @var \Eccube\Entity\Product $Product */ foreach ($Product->getProductCategories() as $ProductCategory) { - /* @var $ProductCategory \Eccube\Entity\ProductCategory */ + /** @var \Eccube\Entity\ProductCategory $ProductCategory */ $actualIds[$ProductCategory->getCategoryId()] = $ProductCategory->getCategoryId(); $this->expected = $expectedIds[$ProductCategory->getCategoryId()]; $this->actual = $ProductCategory->getCategoryId(); @@ -666,7 +666,7 @@ public function testImportProductWithColumnIsRequiredOnly() { $Products = $this->productRepo->findAll(); $this->expected = count($Products) + 1; - /** @var $faker Generator */ + /** @var Generator $faker */ $faker = $this->getFaker(); // 1 product case stock_unlimited = true $csv[] = ['公開ステータス(ID)', '商品名', '販売種別(ID)', '在庫数無制限フラグ', '販売価格']; @@ -727,7 +727,7 @@ public function testImportProductWithIdIsWrong($id, $expectedMessage) */ public function testImportProductWithPublicIdIsIncorrect($status, $expectedMessage) { - /** @var $faker Generator */ + /** @var Generator $faker */ $faker = $this->getFaker(); // 1 product $csv[] = ['公開ステータス(ID)', '商品名', '販売種別(ID)', '在庫数無制限フラグ', '販売価格']; diff --git a/tests/Eccube/Tests/Web/Admin/Product/ProductClassControllerTest.php b/tests/Eccube/Tests/Web/Admin/Product/ProductClassControllerTest.php index 5525ef9d361..d8e5d9bd0ff 100644 --- a/tests/Eccube/Tests/Web/Admin/Product/ProductClassControllerTest.php +++ b/tests/Eccube/Tests/Web/Admin/Product/ProductClassControllerTest.php @@ -614,7 +614,7 @@ protected function enableProductTaxRule() */ public function testProductClassSortByRank() { - /* @var $ClassCategory \Eccube\Entity\ClassCategory */ + /** @var \Eccube\Entity\ClassCategory $ClassCategory */ //set チョコ rank $ClassCategory = $this->classCategoryRepository->findOneBy(['name' => 'チョコ']); $ClassCategory->setSortNo(3); diff --git a/tests/Eccube/Tests/Web/Admin/Product/ProductControllerTest.php b/tests/Eccube/Tests/Web/Admin/Product/ProductControllerTest.php index d7089405049..9b085c0ec26 100644 --- a/tests/Eccube/Tests/Web/Admin/Product/ProductControllerTest.php +++ b/tests/Eccube/Tests/Web/Admin/Product/ProductControllerTest.php @@ -528,7 +528,7 @@ public function testExportWithFilterNoStock() { $testProduct = $this->createProduct('Product with stock 01'); $this->createProduct('Product with stock 02', 1); - /** @var $ProductClass ProductClass */ + /** @var ProductClass $ProductClass */ $ProductClass = $testProduct->getProductClasses()->first(); $ProductClass->setStock(0); $ProductClass->getProductStock()->setStock(0); @@ -538,7 +538,7 @@ public function testExportWithFilterNoStock() $searchForm['id'] = 'Product with stock'; - /* @var $crawler Crawler*/ + /** @var Crawler $crawler */ $crawler = $this->client->request( 'POST', $this->generateUrl('admin_product'), @@ -579,7 +579,7 @@ public function testExportWithFilterPrivate() $searchForm = $this->createSearchForm(); $searchForm['id'] = 'Product with status'; - /* @var $crawler Crawler*/ + /** @var Crawler $crawler */ $crawler = $this->client->request( 'POST', $this->generateUrl('admin_product'), @@ -620,7 +620,7 @@ public function testExportWithFilterPublic() $searchForm = $this->createSearchForm(); $searchForm['id'] = 'Product with status'; - /* @var $crawler Crawler*/ + /** @var Crawler $crawler */ $crawler = $this->client->request( 'POST', $this->generateUrl('admin_product'), @@ -663,7 +663,7 @@ public function testExportWithAll() $searchForm = $this->createSearchForm(); $searchForm['id'] = 'Product with status'; - /* @var $crawler Crawler*/ + /** @var Crawler $crawler */ $crawler = $this->client->request( 'POST', $this->generateUrl('admin_product'), @@ -713,7 +713,7 @@ public function testExportWithOrderByProduct() $searchForm = $this->createSearchForm(); $searchForm['id'] = 'Product name'; - /* @var $crawler Crawler*/ + /** @var Crawler $crawler */ $crawler = $this->client->request( 'POST', $this->generateUrl('admin_product'), diff --git a/tests/Eccube/Tests/Web/Admin/Setting/System/LogControllerTest.php b/tests/Eccube/Tests/Web/Admin/Setting/System/LogControllerTest.php index c42645a3fff..1284d1cd412 100644 --- a/tests/Eccube/Tests/Web/Admin/Setting/System/LogControllerTest.php +++ b/tests/Eccube/Tests/Web/Admin/Setting/System/LogControllerTest.php @@ -97,7 +97,7 @@ public function testSystemLogValidate($value, $expected, $message) $this->formData['line_max'] = $value; - /** @var $crawler Crawler */ + /** @var Crawler $crawler */ $crawler = $this->client->request( 'POST', $this->generateUrl('admin_setting_system_log'), @@ -133,7 +133,7 @@ public function dataProvider() private function createTestFile($number) { - /** @var $faker Generator */ + /** @var Generator $faker */ $faker = $this->getFaker(); if (!file_exists($this->logTest)) { diff --git a/tests/Eccube/Tests/Web/ProductControllerTest.php b/tests/Eccube/Tests/Web/ProductControllerTest.php index 00e38e64a95..7d54350a7c6 100644 --- a/tests/Eccube/Tests/Web/ProductControllerTest.php +++ b/tests/Eccube/Tests/Web/ProductControllerTest.php @@ -101,7 +101,7 @@ public function testCategoryFound() */ public function testProductClassSortByRank() { - /* @var $ClassCategory \Eccube\Entity\ClassCategory */ + /** @var \Eccube\Entity\ClassCategory $ClassCategory */ //set チョコ rank $ClassCategory = $this->classCategoryRepository->findOneBy(['name' => 'チョコ']); $ClassCategory->setSortNo(3); @@ -138,7 +138,7 @@ public function testProductFavoriteAddWhenOutOfStock() $BaseInfo = $this->baseInfoRepository->get(); $BaseInfo->setOptionFavoriteProduct(true); $Product = $this->createProduct('Product no stock', 1); - /** @var $ProductClass ProductClass */ + /** @var ProductClass $ProductClass */ $ProductClass = $Product->getProductClasses()->first(); $ProductClass->setStockUnlimited(false); $ProductClass->setStock(0); @@ -149,9 +149,9 @@ public function testProductFavoriteAddWhenOutOfStock() $user = $this->createCustomer(); $this->loginTo($user); - /** @var $client Client */ + /** @var Client $client */ $client = $this->client; - /** @var $crawler Crawler */ + /** @var Crawler $crawler */ $crawler = $client->request('GET', $this->generateUrl('product_detail', ['id' => $id])); $this->assertTrue($client->getResponse()->isSuccessful()); @@ -187,9 +187,9 @@ public function testProductFavoriteAdd() $user = $this->createCustomer(); $this->loginTo($user); - /** @var $client Client */ + /** @var Client $client */ $client = $this->client; - /** @var $crawler Crawler */ + /** @var Crawler $crawler */ $crawler = $client->request('GET', $this->generateUrl('product_detail', ['id' => $id])); $this->assertTrue($client->getResponse()->isSuccessful()); @@ -223,10 +223,10 @@ public function testProductFavoriteAddThroughLogin() $user = $this->createCustomer(); - /** @var $client Client */ + /** @var Client $client */ $client = $this->client; - /** @var $crawler Crawler */ + /** @var Crawler $crawler */ $crawler = $client->request('GET', $this->generateUrl('product_detail', ['id' => $id])); $this->assertTrue($client->getResponse()->isSuccessful()); diff --git a/tests/Eccube/Tests/Web/ShoppingControllerTest.php b/tests/Eccube/Tests/Web/ShoppingControllerTest.php index 54b1b8a88e8..c229becbfd3 100644 --- a/tests/Eccube/Tests/Web/ShoppingControllerTest.php +++ b/tests/Eccube/Tests/Web/ShoppingControllerTest.php @@ -543,7 +543,7 @@ public function testShippingEditTitle() $client = $this->client; $this->scenarioCartIn($Customer); - /** @var $crawler Crawler */ + /** @var Crawler $crawler */ $crawler = $this->scenarioConfirm($Customer); $this->expected = 'ご注文内容のご確認'; $this->actual = $crawler->filter('h1.page-heading')->text();