@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | * @param array $mapping Associative list of field position in CSV as key and domain item key as value |
28 | 28 | * @param \Aimeos\Controller\Common\Coupon\Import\Csv\Processor\Iface $object Decorated processor |
29 | 29 | */ |
30 | - public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $mapping, |
|
31 | - \Aimeos\Controller\Common\Coupon\Import\Csv\Processor\Iface $object = null ) |
|
30 | + public function __construct(\Aimeos\MShop\Context\Item\Iface $context, array $mapping, |
|
31 | + \Aimeos\Controller\Common\Coupon\Import\Csv\Processor\Iface $object = null) |
|
32 | 32 | { |
33 | 33 | } |
34 | 34 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * @param array $data List of CSV fields with position as key and data as value |
41 | 41 | * @return array List of data which hasn't been imported |
42 | 42 | */ |
43 | - public function process( \Aimeos\MShop\Coupon\Item\Code\Iface $item, array $data ) |
|
43 | + public function process(\Aimeos\MShop\Coupon\Item\Code\Iface $item, array $data) |
|
44 | 44 | { |
45 | 45 | return $data; |
46 | 46 | } |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | * @param array $mapping Associative list of field position in CSV as key and domain item key as value |
27 | 27 | * @param \Aimeos\Controller\Common\Coupon\Import\Csv\Processor\Iface $object Decorated processor |
28 | 28 | */ |
29 | - public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $mapping, |
|
30 | - \Aimeos\Controller\Common\Coupon\Import\Csv\Processor\Iface $object = null ); |
|
29 | + public function __construct(\Aimeos\MShop\Context\Item\Iface $context, array $mapping, |
|
30 | + \Aimeos\Controller\Common\Coupon\Import\Csv\Processor\Iface $object = null); |
|
31 | 31 | |
32 | 32 | |
33 | 33 | /** |
@@ -37,5 +37,5 @@ discard block |
||
37 | 37 | * @param array $data List of CSV fields with position as key and data as value |
38 | 38 | * @return array List of data which hasn't been imported |
39 | 39 | */ |
40 | - public function process( \Aimeos\MShop\Coupon\Item\Code\Iface $item, array $data ); |
|
40 | + public function process(\Aimeos\MShop\Coupon\Item\Code\Iface $item, array $data); |
|
41 | 41 | } |
42 | 42 | \ No newline at end of file |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * @param string|null $name Name of the controller or "Standard" if null |
30 | 30 | * @return \Aimeos\Controller\Jobs\Iface New controller object |
31 | 31 | */ |
32 | - public static function createController( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null ) |
|
32 | + public static function createController(\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null) |
|
33 | 33 | { |
34 | 34 | /** controller/jobs/coupon/import/csv/code/name |
35 | 35 | * Class name of the used coupon code import job controller implementation |
@@ -64,20 +64,20 @@ discard block |
||
64 | 64 | * @since 2017.10 |
65 | 65 | * @category Developer |
66 | 66 | */ |
67 | - if ( $name === null ) { |
|
67 | + if ($name === null) { |
|
68 | 68 | $name = $context->getConfig()->get('controller/jobs/coupon/import/csv/code/name', 'Standard'); |
69 | 69 | } |
70 | 70 | |
71 | - if ( ctype_alnum($name) === false ) |
|
71 | + if (ctype_alnum($name) === false) |
|
72 | 72 | { |
73 | 73 | $classname = is_string($name) ? '\\Aimeos\\Controller\\Jobs\\Coupon\\Import\\Csv\\Code\\' . $name : '<not a string>'; |
74 | - throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
|
74 | + throw new \Aimeos\Controller\Jobs\Exception(sprintf('Invalid characters in class name "%1$s"', $classname)); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | $iface = '\\Aimeos\\Controller\\Jobs\\Iface'; |
78 | 78 | $classname = '\\Aimeos\\Controller\\Jobs\\Coupon\\Import\\Csv\\Code\\' . $name; |
79 | 79 | |
80 | - $controller = self::createControllerBase( $context, $aimeos, $classname, $iface ); |
|
80 | + $controller = self::createControllerBase($context, $aimeos, $classname, $iface); |
|
81 | 81 | |
82 | 82 | /** controller/jobs/coupon/import/csv/code/decorators/excludes |
83 | 83 | * Excludes decorators added by the "common" option from the coupon code import CSV job controller |
@@ -154,6 +154,6 @@ discard block |
||
154 | 154 | * @see controller/jobs/coupon/import/csv/code/decorators/excludes |
155 | 155 | * @see controller/jobs/coupon/import/csv/code/decorators/global |
156 | 156 | */ |
157 | - return self::addControllerDecorators( $context, $aimeos, $controller, 'coupon/import/csv/code' ); |
|
157 | + return self::addControllerDecorators($context, $aimeos, $controller, 'coupon/import/csv/code'); |
|
158 | 158 | } |
159 | 159 | } |
160 | 160 | \ No newline at end of file |
@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | $context = \TestHelperJobs::getContext(); |
17 | 17 | $aimeos = \TestHelperJobs::getAimeos(); |
18 | 18 | |
19 | - $obj = \Aimeos\Controller\Jobs\Coupon\Import\Csv\Code\Factory::createController( $context, $aimeos ); |
|
20 | - $this->assertInstanceOf( '\\Aimeos\\Controller\\Jobs\\Iface', $obj); |
|
19 | + $obj = \Aimeos\Controller\Jobs\Coupon\Import\Csv\Code\Factory::createController($context, $aimeos); |
|
20 | + $this->assertInstanceOf('\\Aimeos\\Controller\\Jobs\\Iface', $obj); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | $context = \TestHelperJobs::getContext(); |
27 | 27 | $aimeos = \TestHelperJobs::getAimeos(); |
28 | 28 | |
29 | - $this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' ); |
|
30 | - \Aimeos\Controller\Jobs\Coupon\Import\Csv\Code\Factory::createController( $context, $aimeos, 'Wrong$$$Name' ); |
|
29 | + $this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception'); |
|
30 | + \Aimeos\Controller\Jobs\Coupon\Import\Csv\Code\Factory::createController($context, $aimeos, 'Wrong$$$Name'); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | $context = \TestHelperJobs::getContext(); |
37 | 37 | $aimeos = \TestHelperJobs::getAimeos(); |
38 | 38 | |
39 | - $this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' ); |
|
40 | - \Aimeos\Controller\Jobs\Coupon\Import\Csv\Code\Factory::createController( $context, $aimeos, 'WrongClass' ); |
|
39 | + $this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception'); |
|
40 | + \Aimeos\Controller\Jobs\Coupon\Import\Csv\Code\Factory::createController($context, $aimeos, 'WrongClass'); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $context = \TestHelperJobs::getContext(); |
47 | 47 | $aimeos = \TestHelperJobs::getAimeos(); |
48 | 48 | |
49 | - $this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' ); |
|
50 | - \Aimeos\Controller\Jobs\Coupon\Import\Csv\Code\Factory::createController( $context, $aimeos, 'Factory' ); |
|
49 | + $this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception'); |
|
50 | + \Aimeos\Controller\Jobs\Coupon\Import\Csv\Code\Factory::createController($context, $aimeos, 'Factory'); |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | \ No newline at end of file |
@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | * @param array $mapping Associative list of field position in CSV as key and domain item key as value |
28 | 28 | * @param \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Iface $processor Decorated processor |
29 | 29 | */ |
30 | - public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $mapping, |
|
31 | - \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Iface $processor = null ) |
|
30 | + public function __construct(\Aimeos\MShop\Context\Item\Iface $context, array $mapping, |
|
31 | + \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Iface $processor = null) |
|
32 | 32 | { |
33 | 33 | } |
34 | 34 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * @param array $data List of CSV fields with position as key and data as value |
41 | 41 | * @return array List of data which hasn't been imported |
42 | 42 | */ |
43 | - public function process( \Aimeos\MShop\Catalog\Item\Iface $catalog, array $data ) |
|
43 | + public function process(\Aimeos\MShop\Catalog\Item\Iface $catalog, array $data) |
|
44 | 44 | { |
45 | 45 | return $data; |
46 | 46 | } |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | * @param array $mapping Associative list of field position in CSV as key and domain item key as value |
27 | 27 | * @param \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Iface $processor Decorated processor |
28 | 28 | */ |
29 | - public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $mapping, |
|
30 | - \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Iface $processor = null ); |
|
29 | + public function __construct(\Aimeos\MShop\Context\Item\Iface $context, array $mapping, |
|
30 | + \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Iface $processor = null); |
|
31 | 31 | |
32 | 32 | |
33 | 33 | /** |
@@ -37,5 +37,5 @@ discard block |
||
37 | 37 | * @param array $data List of CSV fields with position as key and data as value |
38 | 38 | * @return array List of data which hasn't been imported |
39 | 39 | */ |
40 | - public function process( \Aimeos\MShop\Catalog\Item\Iface $catalog, array $data ); |
|
40 | + public function process(\Aimeos\MShop\Catalog\Item\Iface $catalog, array $data); |
|
41 | 41 | } |
42 | 42 | \ No newline at end of file |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * |
25 | 25 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object |
26 | 26 | */ |
27 | - public function __construct( \Aimeos\MShop\Context\Item\Iface $context ); |
|
27 | + public function __construct(\Aimeos\MShop\Context\Item\Iface $context); |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * Returns the item or ID for the given code |
@@ -33,12 +33,12 @@ discard block |
||
33 | 33 | * @param string|null $type Item type if used and required |
34 | 34 | * @return \Aimeos\MShop\Common\Item\Iface|string|null Item object, unique ID or null if not found |
35 | 35 | */ |
36 | - public function get( $code, $type = null ); |
|
36 | + public function get($code, $type = null); |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * Adds the item or ID to the cache |
40 | 40 | * |
41 | 41 | * @param \Aimeos\MShop\Common\Item\Iface $item Item object |
42 | 42 | */ |
43 | - public function set( \Aimeos\MShop\Common\Item\Iface $item ); |
|
43 | + public function set(\Aimeos\MShop\Common\Item\Iface $item); |
|
44 | 44 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | * |
28 | 28 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object |
29 | 29 | */ |
30 | - public function __construct( \Aimeos\MShop\Context\Item\Iface $context ) |
|
30 | + public function __construct(\Aimeos\MShop\Context\Item\Iface $context) |
|
31 | 31 | { |
32 | 32 | $this->context = $context; |
33 | 33 | } |
@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | $context = \TestHelperJobs::getContext(); |
17 | 17 | $aimeos = \TestHelperJobs::getAimeos(); |
18 | 18 | |
19 | - $obj = \Aimeos\Controller\Jobs\Catalog\Import\Csv\Factory::createController( $context, $aimeos ); |
|
20 | - $this->assertInstanceOf( '\\Aimeos\\Controller\\Jobs\\Iface', $obj); |
|
19 | + $obj = \Aimeos\Controller\Jobs\Catalog\Import\Csv\Factory::createController($context, $aimeos); |
|
20 | + $this->assertInstanceOf('\\Aimeos\\Controller\\Jobs\\Iface', $obj); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | $context = \TestHelperJobs::getContext(); |
27 | 27 | $aimeos = \TestHelperJobs::getAimeos(); |
28 | 28 | |
29 | - $this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' ); |
|
30 | - \Aimeos\Controller\Jobs\Catalog\Import\Csv\Factory::createController( $context, $aimeos, 'Wrong$$$Name' ); |
|
29 | + $this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception'); |
|
30 | + \Aimeos\Controller\Jobs\Catalog\Import\Csv\Factory::createController($context, $aimeos, 'Wrong$$$Name'); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | $context = \TestHelperJobs::getContext(); |
37 | 37 | $aimeos = \TestHelperJobs::getAimeos(); |
38 | 38 | |
39 | - $this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' ); |
|
40 | - \Aimeos\Controller\Jobs\Catalog\Import\Csv\Factory::createController( $context, $aimeos, 'WrongClass' ); |
|
39 | + $this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception'); |
|
40 | + \Aimeos\Controller\Jobs\Catalog\Import\Csv\Factory::createController($context, $aimeos, 'WrongClass'); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $context = \TestHelperJobs::getContext(); |
47 | 47 | $aimeos = \TestHelperJobs::getAimeos(); |
48 | 48 | |
49 | - $this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' ); |
|
50 | - \Aimeos\Controller\Jobs\Catalog\Import\Csv\Factory::createController( $context, $aimeos, 'Factory' ); |
|
49 | + $this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception'); |
|
50 | + \Aimeos\Controller\Jobs\Catalog\Import\Csv\Factory::createController($context, $aimeos, 'Factory'); |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | \ No newline at end of file |