@@ -326,7 +326,6 @@ |
||
| 326 | 326 | |
| 327 | 327 | /** |
| 328 | 328 | * @param $row |
| 329 | - * @param null $callback |
|
| 330 | 329 | */ |
| 331 | 330 | public function fputcsv($row) |
| 332 | 331 | { |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | { |
| 350 | 350 | $config = $this->eccubeConfig; |
| 351 | 351 | |
| 352 | - return function ($value) use ($config) { |
|
| 352 | + return function($value) use ($config) { |
|
| 353 | 353 | return mb_convert_encoding( |
| 354 | 354 | (string) $value, $config['eccube_csv_export_encoding'], 'UTF-8' |
| 355 | 355 | ); |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | if ($Conditions instanceof ArrayCollection) { |
| 490 | 490 | $Conditions = new ArrayCollection( |
| 491 | 491 | array_map( |
| 492 | - function ($Entity) use ($em) { |
|
| 492 | + function($Entity) use ($em) { |
|
| 493 | 493 | return $em->getRepository(get_class($Entity))->find($Entity->getId()); |
| 494 | 494 | }, $Conditions->toArray() |
| 495 | 495 | ) |
@@ -16,7 +16,10 @@ discard block |
||
| 16 | 16 | use Doctrine\Common\Collections\ArrayCollection; |
| 17 | 17 | use Doctrine\Common\Util\ClassUtils; |
| 18 | 18 | use Doctrine\ORM\EntityManagerInterface; |
| 19 | +use Doctrine\ORM\QueryBuilder; |
|
| 19 | 20 | use Eccube\Common\EccubeConfig; |
| 21 | +use Eccube\Entity\Csv; |
|
| 22 | +use Eccube\Entity\Master\CsvType; |
|
| 20 | 23 | use Eccube\Form\Type\Admin\SearchProductType; |
| 21 | 24 | use Eccube\Form\Type\Admin\SearchShippingType; |
| 22 | 25 | use Eccube\Repository\CsvRepository; |
@@ -29,9 +32,6 @@ discard block |
||
| 29 | 32 | use Eccube\Util\FormUtil; |
| 30 | 33 | use Symfony\Component\Form\FormFactoryInterface; |
| 31 | 34 | use Symfony\Component\HttpFoundation\Request; |
| 32 | -use Doctrine\ORM\QueryBuilder; |
|
| 33 | -use Eccube\Entity\Master\CsvType; |
|
| 34 | -use Eccube\Entity\Csv; |
|
| 35 | 35 | |
| 36 | 36 | class CsvExportService |
| 37 | 37 | { |
@@ -116,9 +116,9 @@ |
||
| 116 | 116 | |
| 117 | 117 | $this->file = $file; |
| 118 | 118 | $this->file->setFlags( |
| 119 | - \SplFileObject::READ_CSV | |
|
| 120 | - \SplFileObject::SKIP_EMPTY | |
|
| 121 | - \SplFileObject::READ_AHEAD | |
|
| 119 | + \SplFileObject::READ_CSV| |
|
| 120 | + \SplFileObject::SKIP_EMPTY| |
|
| 121 | + \SplFileObject::READ_AHEAD| |
|
| 122 | 122 | \SplFileObject::DROP_NEW_LINE |
| 123 | 123 | ); |
| 124 | 124 | $this->file->setCsvControl( |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | /** |
| 58 | 58 | * Constructor. |
| 59 | 59 | * |
| 60 | - * @param Query|QueryBuilder $query A Doctrine ORM query or query builder. |
|
| 60 | + * @param Query $query A Doctrine ORM query or query builder. |
|
| 61 | 61 | * @param boolean $fetchJoinCollection Whether the query joins a collection (true by default). |
| 62 | 62 | */ |
| 63 | 63 | public function __construct($query, $fetchJoinCollection = true) |
@@ -15,9 +15,9 @@ |
||
| 15 | 15 | |
| 16 | 16 | use Doctrine\ORM\NoResultException; |
| 17 | 17 | use Doctrine\ORM\Query; |
| 18 | +use Doctrine\ORM\QueryBuilder; |
|
| 18 | 19 | use Doctrine\ORM\Query\Parser; |
| 19 | 20 | use Doctrine\ORM\Query\ResultSetMapping; |
| 20 | -use Doctrine\ORM\QueryBuilder; |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * The paginator can handle various complex scenarios with DQL. |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | $pathExpression = new PathExpression( |
| 72 | - PathExpression::TYPE_STATE_FIELD | PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $rootAlias, |
|
| 72 | + PathExpression::TYPE_STATE_FIELD|PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $rootAlias, |
|
| 73 | 73 | $identifierFieldName |
| 74 | 74 | ); |
| 75 | 75 | $pathExpression->type = $pathType; |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | return $log; |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - foreach (array_reverse(file($logFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)) as $line) { |
|
| 86 | + foreach (array_reverse(file($logFile, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES)) as $line) { |
|
| 87 | 87 | // 上限に達した場合、処理を抜ける |
| 88 | 88 | if (count($log) >= $formData['line_max']) { |
| 89 | 89 | break; |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | /** |
| 77 | 77 | * parse log file |
| 78 | 78 | * |
| 79 | - * @param $logFile |
|
| 79 | + * @param string $logFile |
|
| 80 | 80 | * @param $formData |
| 81 | 81 | * |
| 82 | 82 | * @return array |
@@ -42,13 +42,13 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | public function register(Container $app) |
| 44 | 44 | { |
| 45 | - $app->extend('form.type.extensions', function ($extensions) use ($app) { |
|
| 45 | + $app->extend('form.type.extensions', function($extensions) use ($app) { |
|
| 46 | 46 | $extensions[] = new \Eccube\Form\Extension\HelpTypeExtension(); |
| 47 | 47 | |
| 48 | 48 | return $extensions; |
| 49 | 49 | }); |
| 50 | 50 | |
| 51 | - $app->extend('form.types', function ($types) use ($app) { |
|
| 51 | + $app->extend('form.types', function($types) use ($app) { |
|
| 52 | 52 | $types[] = new \Eccube\Form\Type\Install\Step1Type($app); |
| 53 | 53 | $types[] = new \Eccube\Form\Type\Install\Step3Type($app); |
| 54 | 54 | $types[] = new \Eccube\Form\Type\Install\Step4Type($app); |
@@ -38,14 +38,14 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | public function buildForm(FormBuilderInterface $builder, array $options) |
| 40 | 40 | { |
| 41 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
| 41 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
| 42 | 42 | $options = $event->getForm()->getConfig()->getOptions(); |
| 43 | 43 | if (!$event->getData()) { |
| 44 | 44 | $data = current(array_keys($options['choice_loader']->loadChoiceList()->getValues())); |
| 45 | 45 | $event->setData($data); |
| 46 | 46 | } |
| 47 | 47 | }); |
| 48 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
| 48 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
| 49 | 49 | $options = $event->getForm()->getConfig()->getOptions(); |
| 50 | 50 | $values = $options['choice_loader']->loadChoiceList()->getValues(); |
| 51 | 51 | if (!in_array($event->getData(), $values)) { |
@@ -38,14 +38,14 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | public function buildForm(FormBuilderInterface $builder, array $options) |
| 40 | 40 | { |
| 41 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
| 41 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
| 42 | 42 | $options = $event->getForm()->getConfig()->getOptions(); |
| 43 | 43 | if (!$event->getData()) { |
| 44 | 44 | $data = current(array_keys($options['choice_loader']->loadChoiceList()->getValues())); |
| 45 | 45 | $event->setData($data); |
| 46 | 46 | } |
| 47 | 47 | }); |
| 48 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
| 48 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
| 49 | 49 | $options = $event->getForm()->getConfig()->getOptions(); |
| 50 | 50 | $values = $options['choice_loader']->loadChoiceList()->getValues(); |
| 51 | 51 | if (!in_array($event->getData(), $values)) { |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | ->name('*.csv') |
| 44 | 44 | ->sort( |
| 45 | 45 | // 定義ファイルに記載の順にソート. |
| 46 | - function (\SplFileInfo $a, \SplFileInfo $b) use ($definition) { |
|
| 46 | + function(\SplFileInfo $a, \SplFileInfo $b) use ($definition) { |
|
| 47 | 47 | if (!isset($definition[$a->getFilename()])) { |
| 48 | 48 | throw new \Exception(sprintf('"%s" is undefined in %s', $a->getFilename())); |
| 49 | 49 | } |