Skip to content

Commit

Permalink
Merge pull request #6114 from tominaga-h/fix/type_definition
Browse files Browse the repository at this point in the history
型定義の記述に誤りがあるものを修正
  • Loading branch information
ji-eunsoo committed Mar 27, 2024
2 parents 20e9b91 + f8f0d3b commit 7786521
Show file tree
Hide file tree
Showing 36 changed files with 79 additions and 79 deletions.
2 changes: 1 addition & 1 deletion src/Eccube/Controller/Admin/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
10 changes: 5 additions & 5 deletions src/Eccube/Controller/Admin/Order/EditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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'));

Expand Down Expand Up @@ -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)) {
Expand All @@ -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,
]);
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Controller/Admin/Order/MailController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/Eccube/Controller/Admin/Product/CategoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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出力項目と合致するデータを取得.
Expand Down
4 changes: 2 additions & 2 deletions src/Eccube/Controller/Admin/Product/CsvImportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']])) {
Expand Down Expand Up @@ -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が存在しません。');
Expand Down
16 changes: 8 additions & 8 deletions src/Eccube/Controller/Admin/Product/ProductController.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public function loadProductClasses(Request $request, Product $Product)
}

$data = [];
/** @var $Product ProductRepository */
/** @var ProductRepository $Product */
if (!$Product) {
throw new NotFoundHttpException();
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand Down Expand Up @@ -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()) {
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Controller/Admin/Product/TagController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Controller/Admin/Store/TemplateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
6 changes: 3 additions & 3 deletions src/Eccube/Controller/EntryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/Eccube/Controller/Mypage/ChangeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/Eccube/Controller/Mypage/MypageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Controller/Mypage/WithdrawController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
8 changes: 4 additions & 4 deletions src/Eccube/Controller/ProductController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -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);
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Controller/ShoppingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/DependencyInjection/Compiler/TwigBlockPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Entity/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Entity/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Form/Type/AddCartType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Repository/TaxRuleRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Service/MailService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(), [
Expand Down
6 changes: 3 additions & 3 deletions src/Eccube/Service/OrderHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Service/OrderStateMachine.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Loading

0 comments on commit 7786521

Please sign in to comment.