@@ -20,49 +20,49 @@ discard block |
||
20 | 20 | $aimeos = \TestHelperJobs::getAimeos(); |
21 | 21 | $this->context = \TestHelperJobs::getContext(); |
22 | 22 | |
23 | - $this->object = new \Aimeos\Controller\Jobs\Subscription\Process\Begin\Standard( $this->context, $aimeos ); |
|
23 | + $this->object = new \Aimeos\Controller\Jobs\Subscription\Process\Begin\Standard($this->context, $aimeos); |
|
24 | 24 | |
25 | - \Aimeos\MShop::cache( true ); |
|
25 | + \Aimeos\MShop::cache(true); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | |
29 | 29 | protected function tearDown() |
30 | 30 | { |
31 | - \Aimeos\MShop::cache( false ); |
|
31 | + \Aimeos\MShop::cache(false); |
|
32 | 32 | \Aimeos\MShop::clear(); |
33 | 33 | |
34 | - unset( $this->object, $this->context ); |
|
34 | + unset($this->object, $this->context); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | |
38 | 38 | public function testGetName() |
39 | 39 | { |
40 | - $this->assertEquals( 'Subscription process start', $this->object->getName() ); |
|
40 | + $this->assertEquals('Subscription process start', $this->object->getName()); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | |
44 | 44 | public function testGetDescription() |
45 | 45 | { |
46 | - $this->assertEquals( 'Process subscriptions initially', $this->object->getDescription() ); |
|
46 | + $this->assertEquals('Process subscriptions initially', $this->object->getDescription()); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | |
50 | 50 | public function testRun() |
51 | 51 | { |
52 | - $this->context->getConfig()->set( 'controller/common/subscription/process/processors', ['cgroup'] ); |
|
52 | + $this->context->getConfig()->set('controller/common/subscription/process/processors', ['cgroup']); |
|
53 | 53 | $item = $this->getSubscription(); |
54 | 54 | |
55 | - $managerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Subscription\\Manager\\Standard' ) |
|
56 | - ->setConstructorArgs( [$this->context] ) |
|
57 | - ->setMethods( ['searchItems', 'saveItem'] ) |
|
55 | + $managerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Subscription\\Manager\\Standard') |
|
56 | + ->setConstructorArgs([$this->context]) |
|
57 | + ->setMethods(['searchItems', 'saveItem']) |
|
58 | 58 | ->getMock(); |
59 | 59 | |
60 | - \Aimeos\MShop::inject( $this->context, 'subscription', $managerStub ); |
|
60 | + \Aimeos\MShop::inject($this->context, 'subscription', $managerStub); |
|
61 | 61 | |
62 | - $managerStub->expects( $this->once() )->method( 'searchItems' ) |
|
63 | - ->will( $this->returnValue( [$item] ) ); |
|
62 | + $managerStub->expects($this->once())->method('searchItems') |
|
63 | + ->will($this->returnValue([$item])); |
|
64 | 64 | |
65 | - $managerStub->expects( $this->once() )->method( 'saveItem' ); |
|
65 | + $managerStub->expects($this->once())->method('saveItem'); |
|
66 | 66 | |
67 | 67 | $this->object->run(); |
68 | 68 | } |
@@ -70,21 +70,21 @@ discard block |
||
70 | 70 | |
71 | 71 | public function testRunException() |
72 | 72 | { |
73 | - $this->context->getConfig()->set( 'controller/common/subscription/process/processors', ['cgroup'] ); |
|
74 | - $this->context->getConfig()->set( 'controller/common/subscription/process/processor/cgroup/groupids', ['1'] ); |
|
73 | + $this->context->getConfig()->set('controller/common/subscription/process/processors', ['cgroup']); |
|
74 | + $this->context->getConfig()->set('controller/common/subscription/process/processor/cgroup/groupids', ['1']); |
|
75 | 75 | |
76 | - $managerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Subscription\\Manager\\Standard' ) |
|
77 | - ->setConstructorArgs( [$this->context] ) |
|
78 | - ->setMethods( ['searchItems', 'saveItem'] ) |
|
76 | + $managerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Subscription\\Manager\\Standard') |
|
77 | + ->setConstructorArgs([$this->context]) |
|
78 | + ->setMethods(['searchItems', 'saveItem']) |
|
79 | 79 | ->getMock(); |
80 | 80 | |
81 | - \Aimeos\MShop::inject( $this->context, 'subscription', $managerStub ); |
|
81 | + \Aimeos\MShop::inject($this->context, 'subscription', $managerStub); |
|
82 | 82 | |
83 | - $managerStub->expects( $this->once() )->method( 'searchItems' ) |
|
84 | - ->will( $this->returnValue( [$managerStub->createItem()] ) ); |
|
83 | + $managerStub->expects($this->once())->method('searchItems') |
|
84 | + ->will($this->returnValue([$managerStub->createItem()])); |
|
85 | 85 | |
86 | - $managerStub->expects( $this->once() )->method( 'saveItem' ) |
|
87 | - ->will( $this->throwException( new \Exception() ) ); |
|
86 | + $managerStub->expects($this->once())->method('saveItem') |
|
87 | + ->will($this->throwException(new \Exception())); |
|
88 | 88 | |
89 | 89 | $this->object->run(); |
90 | 90 | } |
@@ -92,17 +92,17 @@ discard block |
||
92 | 92 | |
93 | 93 | protected function getSubscription() |
94 | 94 | { |
95 | - $manager = \Aimeos\MShop::create( $this->context, 'subscription' ); |
|
95 | + $manager = \Aimeos\MShop::create($this->context, 'subscription'); |
|
96 | 96 | |
97 | 97 | $search = $manager->createSearch(); |
98 | - $search->setConditions( $search->compare( '==', 'subscription.dateend', '2010-01-01' ) ); |
|
98 | + $search->setConditions($search->compare('==', 'subscription.dateend', '2010-01-01')); |
|
99 | 99 | |
100 | - $items = $manager->searchItems( $search ); |
|
100 | + $items = $manager->searchItems($search); |
|
101 | 101 | |
102 | - if( ( $item = reset( $items ) ) !== false ) { |
|
102 | + if (($item = reset($items)) !== false) { |
|
103 | 103 | return $item; |
104 | 104 | } |
105 | 105 | |
106 | - throw new \Exception( 'No subscription item found' ); |
|
106 | + throw new \Exception('No subscription item found'); |
|
107 | 107 | } |
108 | 108 | } |
@@ -20,109 +20,109 @@ |
||
20 | 20 | $this->context = \TestHelperJobs::getContext(); |
21 | 21 | $aimeos = \TestHelperJobs::getAimeos(); |
22 | 22 | |
23 | - $this->object = new \Aimeos\Controller\Jobs\Order\Export\Csv\Standard( $this->context, $aimeos ); |
|
23 | + $this->object = new \Aimeos\Controller\Jobs\Order\Export\Csv\Standard($this->context, $aimeos); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | |
27 | 27 | protected function tearDown() |
28 | 28 | { |
29 | - unset( $this->object, $this->context ); |
|
29 | + unset($this->object, $this->context); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | |
33 | 33 | public function testGetName() |
34 | 34 | { |
35 | - $this->assertEquals( 'Order export CSV', $this->object->getName() ); |
|
35 | + $this->assertEquals('Order export CSV', $this->object->getName()); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
39 | 39 | public function testGetDescription() |
40 | 40 | { |
41 | - $this->assertEquals( 'Exports orders to CSV file', $this->object->getDescription() ); |
|
41 | + $this->assertEquals('Exports orders to CSV file', $this->object->getDescription()); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | |
45 | 45 | public function testRun() |
46 | 46 | { |
47 | - $mqmStub = $this->getMockBuilder( '\\Aimeos\\MW\\MQueue\\Manager\\Standard' ) |
|
48 | - ->setConstructorArgs( [$this->context->getConfig()] ) |
|
49 | - ->setMethods( ['get'] ) |
|
47 | + $mqmStub = $this->getMockBuilder('\\Aimeos\\MW\\MQueue\\Manager\\Standard') |
|
48 | + ->setConstructorArgs([$this->context->getConfig()]) |
|
49 | + ->setMethods(['get']) |
|
50 | 50 | ->getMock(); |
51 | 51 | |
52 | - $mqStub = $this->getMockBuilder( '\\Aimeos\\MW\\MQueue\\Standard' ) |
|
52 | + $mqStub = $this->getMockBuilder('\\Aimeos\\MW\\MQueue\\Standard') |
|
53 | 53 | ->disableOriginalConstructor() |
54 | - ->setMethods( ['getQueue'] ) |
|
54 | + ->setMethods(['getQueue']) |
|
55 | 55 | ->getMock(); |
56 | 56 | |
57 | - $queueStub = $this->getMockBuilder( '\\Aimeos\\MW\\MQueue\\Queue\\Standard' ) |
|
57 | + $queueStub = $this->getMockBuilder('\\Aimeos\\MW\\MQueue\\Queue\\Standard') |
|
58 | 58 | ->disableOriginalConstructor() |
59 | - ->setMethods( ['del', 'get'] ) |
|
59 | + ->setMethods(['del', 'get']) |
|
60 | 60 | ->getMock(); |
61 | 61 | |
62 | - $msgStub = $this->getMockBuilder( '\\Aimeos\\MW\\MQueue\\Message\\Standard' ) |
|
62 | + $msgStub = $this->getMockBuilder('\\Aimeos\\MW\\MQueue\\Message\\Standard') |
|
63 | 63 | ->disableOriginalConstructor() |
64 | - ->setMethods( ['getBody'] ) |
|
64 | + ->setMethods(['getBody']) |
|
65 | 65 | ->getMock(); |
66 | 66 | |
67 | 67 | |
68 | - $this->context->setMessageQueueManager( $mqmStub ); |
|
68 | + $this->context->setMessageQueueManager($mqmStub); |
|
69 | 69 | |
70 | 70 | |
71 | - $mqmStub->expects( $this->once() )->method( 'get' ) |
|
72 | - ->will( $this->returnValue( $mqStub ) ); |
|
71 | + $mqmStub->expects($this->once())->method('get') |
|
72 | + ->will($this->returnValue($mqStub)); |
|
73 | 73 | |
74 | - $mqStub->expects( $this->once() )->method( 'getQueue' ) |
|
75 | - ->will( $this->returnValue( $queueStub ) ); |
|
74 | + $mqStub->expects($this->once())->method('getQueue') |
|
75 | + ->will($this->returnValue($queueStub)); |
|
76 | 76 | |
77 | - $queueStub->expects( $this->exactly( 2 ) )->method( 'get' ) |
|
78 | - ->will( $this->onConsecutiveCalls( $msgStub, null ) ); |
|
77 | + $queueStub->expects($this->exactly(2))->method('get') |
|
78 | + ->will($this->onConsecutiveCalls($msgStub, null)); |
|
79 | 79 | |
80 | - $queueStub->expects( $this->once() )->method( 'del' ); |
|
80 | + $queueStub->expects($this->once())->method('del'); |
|
81 | 81 | |
82 | - $msgStub->expects( $this->once() )->method( 'getBody' ) |
|
83 | - ->will( $this->returnValue( '{"sitecode":"unittest"}' ) ); |
|
82 | + $msgStub->expects($this->once())->method('getBody') |
|
83 | + ->will($this->returnValue('{"sitecode":"unittest"}')); |
|
84 | 84 | |
85 | 85 | |
86 | 86 | $this->object->run(); |
87 | 87 | |
88 | 88 | |
89 | - $jobManager = \Aimeos\MAdmin::create( $this->context, 'job' ); |
|
89 | + $jobManager = \Aimeos\MAdmin::create($this->context, 'job'); |
|
90 | 90 | $jobSearch = $jobManager->createSearch(); |
91 | - $jobSearch->setConditions( $jobSearch->compare( '=~', 'job.label', 'order-export_' ) ); |
|
92 | - $jobItems = $jobManager->searchItems( $jobSearch ); |
|
93 | - $jobManager->deleteItems( array_keys( $jobItems ) ); |
|
91 | + $jobSearch->setConditions($jobSearch->compare('=~', 'job.label', 'order-export_')); |
|
92 | + $jobItems = $jobManager->searchItems($jobSearch); |
|
93 | + $jobManager->deleteItems(array_keys($jobItems)); |
|
94 | 94 | |
95 | - $this->assertEquals( 1, count( $jobItems ) ); |
|
95 | + $this->assertEquals(1, count($jobItems)); |
|
96 | 96 | |
97 | 97 | |
98 | - $filename = dirname( dirname( dirname( dirname( dirname( __DIR__ ) ) ) ) ) . '/tmp/' . reset( $jobItems )->getLabel(); |
|
99 | - $fp = fopen( $filename, 'r' ); |
|
98 | + $filename = dirname(dirname(dirname(dirname(dirname(__DIR__))))) . '/tmp/' . reset($jobItems)->getLabel(); |
|
99 | + $fp = fopen($filename, 'r'); |
|
100 | 100 | |
101 | - $invoice = fgetcsv( $fp ); |
|
102 | - $address1 = fgetcsv( $fp ); |
|
103 | - $address2 = fgetcsv( $fp ); |
|
104 | - $service1 = fgetcsv( $fp ); |
|
105 | - $service2 = fgetcsv( $fp ); |
|
101 | + $invoice = fgetcsv($fp); |
|
102 | + $address1 = fgetcsv($fp); |
|
103 | + $address2 = fgetcsv($fp); |
|
104 | + $service1 = fgetcsv($fp); |
|
105 | + $service2 = fgetcsv($fp); |
|
106 | 106 | $coupon1 = fgetcsv($fp); |
107 | 107 | $coupon2 = fgetcsv($fp); |
108 | - $product1 = fgetcsv( $fp ); |
|
109 | - $product2 = fgetcsv( $fp ); |
|
110 | - $product3 = fgetcsv( $fp ); |
|
111 | - $product4 = fgetcsv( $fp ); |
|
112 | - |
|
113 | - fclose( $fp ); |
|
114 | - unlink( $filename ); |
|
115 | - |
|
116 | - $this->assertEquals( 'invoice', $invoice[0] ); |
|
117 | - $this->assertEquals( 'address', $address1[0] ); |
|
118 | - $this->assertEquals( 'address', $address2[0] ); |
|
119 | - $this->assertEquals( 'service', $service1[0] ); |
|
120 | - $this->assertEquals( 'service', $service2[0] ); |
|
121 | - $this->assertEquals( 'coupon', $coupon1[0]); |
|
122 | - $this->assertEquals( 'coupon', $coupon2[0]); |
|
123 | - $this->assertEquals( 'product', $product1[0] ); |
|
124 | - $this->assertEquals( 'product', $product2[0] ); |
|
125 | - $this->assertEquals( 'product', $product3[0] ); |
|
126 | - $this->assertEquals( 'product', $product4[0] ); |
|
108 | + $product1 = fgetcsv($fp); |
|
109 | + $product2 = fgetcsv($fp); |
|
110 | + $product3 = fgetcsv($fp); |
|
111 | + $product4 = fgetcsv($fp); |
|
112 | + |
|
113 | + fclose($fp); |
|
114 | + unlink($filename); |
|
115 | + |
|
116 | + $this->assertEquals('invoice', $invoice[0]); |
|
117 | + $this->assertEquals('address', $address1[0]); |
|
118 | + $this->assertEquals('address', $address2[0]); |
|
119 | + $this->assertEquals('service', $service1[0]); |
|
120 | + $this->assertEquals('service', $service2[0]); |
|
121 | + $this->assertEquals('coupon', $coupon1[0]); |
|
122 | + $this->assertEquals('coupon', $coupon2[0]); |
|
123 | + $this->assertEquals('product', $product1[0]); |
|
124 | + $this->assertEquals('product', $product2[0]); |
|
125 | + $this->assertEquals('product', $product3[0]); |
|
126 | + $this->assertEquals('product', $product4[0]); |
|
127 | 127 | } |
128 | 128 | } |
@@ -18,95 +18,95 @@ |
||
18 | 18 | |
19 | 19 | protected function setUp() |
20 | 20 | { |
21 | - \Aimeos\MShop::cache( true ); |
|
21 | + \Aimeos\MShop::cache(true); |
|
22 | 22 | |
23 | 23 | $this->context = \TestHelperJobs::getContext(); |
24 | 24 | $this->aimeos = \TestHelperJobs::getAimeos(); |
25 | 25 | $config = $this->context->getConfig(); |
26 | 26 | |
27 | - $config->set( 'controller/jobs/product/import/csv/skip-lines', 1 ); |
|
27 | + $config->set('controller/jobs/product/import/csv/skip-lines', 1); |
|
28 | 28 | |
29 | - $this->object = new \Aimeos\Controller\Jobs\Coupon\Import\Csv\Code\Standard( $this->context, $this->aimeos ); |
|
29 | + $this->object = new \Aimeos\Controller\Jobs\Coupon\Import\Csv\Code\Standard($this->context, $this->aimeos); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | |
33 | 33 | protected function tearDown() |
34 | 34 | { |
35 | - \Aimeos\MShop::cache( false ); |
|
35 | + \Aimeos\MShop::cache(false); |
|
36 | 36 | \Aimeos\MShop::clear(); |
37 | 37 | |
38 | - unset( $this->object ); |
|
38 | + unset($this->object); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | |
42 | 42 | public function testGetName() |
43 | 43 | { |
44 | - $this->assertEquals( 'Coupon code import CSV', $this->object->getName() ); |
|
44 | + $this->assertEquals('Coupon code import CSV', $this->object->getName()); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | |
48 | 48 | public function testGetDescription() |
49 | 49 | { |
50 | 50 | $text = 'Imports new and updates existing coupon code from CSV files'; |
51 | - $this->assertEquals( $text, $this->object->getDescription() ); |
|
51 | + $this->assertEquals($text, $this->object->getDescription()); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | |
55 | 55 | public function testRun() |
56 | 56 | { |
57 | - $manager = \Aimeos\MShop::create( $this->context, 'coupon' ); |
|
58 | - $coupon = $manager->saveItem( $manager->createItem()->setProvider( 'Example' ) ); |
|
57 | + $manager = \Aimeos\MShop::create($this->context, 'coupon'); |
|
58 | + $coupon = $manager->saveItem($manager->createItem()->setProvider('Example')); |
|
59 | 59 | |
60 | 60 | $dir = 'tmp/import/couponcode/unittest'; |
61 | 61 | $filepath = $dir . '/' . $coupon->getId() . '.csv'; |
62 | 62 | |
63 | - if( !is_dir( $dir ) && mkdir( 'tmp/import/couponcode/unittest', 0775, true ) === false ) { |
|
64 | - throw new \Exception( sprintf( 'Unable to create directory "%1$s"', $dir ) ); |
|
63 | + if (!is_dir($dir) && mkdir('tmp/import/couponcode/unittest', 0775, true) === false) { |
|
64 | + throw new \Exception(sprintf('Unable to create directory "%1$s"', $dir)); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | $content = 'code,count,start,end |
68 | 68 | jobccimport1,3,2000-01-01 00:00:00, |
69 | 69 | jobccimport2,5,,'; |
70 | 70 | |
71 | - if( file_put_contents( $filepath, $content ) === false ) { |
|
72 | - throw new \Exception( sprintf( 'Unable to create file "%1$s"', $file ) ); |
|
71 | + if (file_put_contents($filepath, $content) === false) { |
|
72 | + throw new \Exception(sprintf('Unable to create file "%1$s"', $file)); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | $this->object->run(); |
76 | 76 | |
77 | 77 | |
78 | - $codeManager = \Aimeos\MShop::create( $this->context, 'coupon/code' ); |
|
79 | - $code1 = $codeManager->findItem( 'jobccimport1' ); |
|
80 | - $code2 = $codeManager->findItem( 'jobccimport2' ); |
|
78 | + $codeManager = \Aimeos\MShop::create($this->context, 'coupon/code'); |
|
79 | + $code1 = $codeManager->findItem('jobccimport1'); |
|
80 | + $code2 = $codeManager->findItem('jobccimport2'); |
|
81 | 81 | |
82 | - $manager->deleteItem( $coupon->getId() ); |
|
82 | + $manager->deleteItem($coupon->getId()); |
|
83 | 83 | |
84 | - $this->assertEquals( 3, $code1->getCount() ); |
|
85 | - $this->assertEquals( '2000-01-01 00:00:00', $code1->getDateStart() ); |
|
86 | - $this->assertEquals( null, $code1->getDateEnd() ); |
|
84 | + $this->assertEquals(3, $code1->getCount()); |
|
85 | + $this->assertEquals('2000-01-01 00:00:00', $code1->getDateStart()); |
|
86 | + $this->assertEquals(null, $code1->getDateEnd()); |
|
87 | 87 | |
88 | - $this->assertEquals( 5, $code2->getCount() ); |
|
89 | - $this->assertEquals( null, $code2->getDateStart() ); |
|
90 | - $this->assertEquals( null, $code2->getDateEnd() ); |
|
88 | + $this->assertEquals(5, $code2->getCount()); |
|
89 | + $this->assertEquals(null, $code2->getDateStart()); |
|
90 | + $this->assertEquals(null, $code2->getDateEnd()); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | |
94 | 94 | public function testRunException() |
95 | 95 | { |
96 | - $manager = \Aimeos\MShop::create( $this->context, 'coupon' ); |
|
96 | + $manager = \Aimeos\MShop::create($this->context, 'coupon'); |
|
97 | 97 | |
98 | 98 | $dir = 'tmp/import/couponcode/unittest'; |
99 | 99 | $filepath = $dir . '/0.csv'; |
100 | 100 | |
101 | - if( !is_dir( $dir ) && mkdir( 'tmp/import/couponcode/unittest', 0775, true ) === false ) { |
|
102 | - throw new \Exception( sprintf( 'Unable to create directory "%1$s"', $dir ) ); |
|
101 | + if (!is_dir($dir) && mkdir('tmp/import/couponcode/unittest', 0775, true) === false) { |
|
102 | + throw new \Exception(sprintf('Unable to create directory "%1$s"', $dir)); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | $content = 'code,count,start,end |
106 | 106 | jobccimport1,,,'; |
107 | 107 | |
108 | - if( file_put_contents( $filepath, $content ) === false ) { |
|
109 | - throw new \Exception( sprintf( 'Unable to create file "%1$s"', $file ) ); |
|
108 | + if (file_put_contents($filepath, $content) === false) { |
|
109 | + throw new \Exception(sprintf('Unable to create file "%1$s"', $file)); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | $this->object->run(); |
@@ -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 create( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null ) |
|
32 | + public static function create(\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null) |
|
33 | 33 | { |
34 | 34 | /** controller/jobs/product/import/csv/name |
35 | 35 | * Class name of the used product suggestions scheduler controller implementation |
@@ -64,20 +64,20 @@ discard block |
||
64 | 64 | * @since 2015.01 |
65 | 65 | * @category Developer |
66 | 66 | */ |
67 | - if ( $name === null ) { |
|
67 | + if ($name === null) { |
|
68 | 68 | $name = $context->getConfig()->get('controller/jobs/product/import/csv/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\\Product\\Import\\Csv\\' . $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\\Product\\Import\\Csv\\' . $name; |
79 | 79 | |
80 | - $controller = self::createController( $context, $aimeos, $classname, $iface ); |
|
80 | + $controller = self::createController($context, $aimeos, $classname, $iface); |
|
81 | 81 | |
82 | 82 | /** controller/jobs/product/import/csv/decorators/excludes |
83 | 83 | * Excludes decorators added by the "common" option from the product import CSV job controller |
@@ -154,6 +154,6 @@ discard block |
||
154 | 154 | * @see controller/jobs/product/import/csv/decorators/excludes |
155 | 155 | * @see controller/jobs/product/import/csv/decorators/global |
156 | 156 | */ |
157 | - return self::addControllerDecorators( $context, $aimeos, $controller, 'product/import/csv' ); |
|
157 | + return self::addControllerDecorators($context, $aimeos, $controller, 'product/import/csv'); |
|
158 | 158 | } |
159 | 159 | } |
160 | 160 | \ 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 create( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null ) |
|
32 | + public static function create(\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null) |
|
33 | 33 | { |
34 | 34 | /** controller/jobs/product/export/sitemap/name |
35 | 35 | * Class name of the used product suggestions scheduler controller implementation |
@@ -64,20 +64,20 @@ discard block |
||
64 | 64 | * @since 2015.01 |
65 | 65 | * @category Developer |
66 | 66 | */ |
67 | - if ( $name === null ) { |
|
67 | + if ($name === null) { |
|
68 | 68 | $name = $context->getConfig()->get('controller/jobs/product/export/sitemap/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\\Product\\Export\\Sitemap\\' . $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\\Product\\Export\\Sitemap\\' . $name; |
79 | 79 | |
80 | - $controller = self::createController( $context, $aimeos, $classname, $iface ); |
|
80 | + $controller = self::createController($context, $aimeos, $classname, $iface); |
|
81 | 81 | |
82 | 82 | /** controller/jobs/product/export/sitemap/decorators/excludes |
83 | 83 | * Excludes decorators added by the "common" option from the product export sitemap job controller |
@@ -154,6 +154,6 @@ discard block |
||
154 | 154 | * @see controller/jobs/product/export/sitemap/export/sitemap/decorators/excludes |
155 | 155 | * @see controller/jobs/product/export/sitemap/export/sitemap/decorators/global |
156 | 156 | */ |
157 | - return self::addControllerDecorators( $context, $aimeos, $controller, 'product/export/sitemap' ); |
|
157 | + return self::addControllerDecorators($context, $aimeos, $controller, 'product/export/sitemap'); |
|
158 | 158 | } |
159 | 159 | } |
160 | 160 | \ 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 create( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null ) |
|
32 | + public static function create(\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null) |
|
33 | 33 | { |
34 | 34 | /** controller/jobs/product/export/name |
35 | 35 | * Class name of the used product suggestions scheduler controller implementation |
@@ -64,20 +64,20 @@ discard block |
||
64 | 64 | * @since 2015.01 |
65 | 65 | * @category Developer |
66 | 66 | */ |
67 | - if ( $name === null ) { |
|
67 | + if ($name === null) { |
|
68 | 68 | $name = $context->getConfig()->get('controller/jobs/product/export/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\\Product\\Export\\' . $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\\Product\\Export\\' . $name; |
79 | 79 | |
80 | - $controller = self::createController( $context, $aimeos, $classname, $iface ); |
|
80 | + $controller = self::createController($context, $aimeos, $classname, $iface); |
|
81 | 81 | |
82 | 82 | /** controller/jobs/product/export/decorators/excludes |
83 | 83 | * Excludes decorators added by the "common" option from the product export job controller |
@@ -154,6 +154,6 @@ discard block |
||
154 | 154 | * @see controller/jobs/product/export/decorators/excludes |
155 | 155 | * @see controller/jobs/product/export/decorators/global |
156 | 156 | */ |
157 | - return self::addControllerDecorators( $context, $aimeos, $controller, 'product/export' ); |
|
157 | + return self::addControllerDecorators($context, $aimeos, $controller, 'product/export'); |
|
158 | 158 | } |
159 | 159 | } |
160 | 160 | \ No newline at end of file |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * @param string|null $name Name of the controller or "Standard" if null |
31 | 31 | * @return \Aimeos\Controller\Jobs\Iface New controller object |
32 | 32 | */ |
33 | - public static function create( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null ) |
|
33 | + public static function create(\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null) |
|
34 | 34 | { |
35 | 35 | /** controller/jobs/product/bought/name |
36 | 36 | * Class name of the used product suggestions scheduler controller implementation |
@@ -65,20 +65,20 @@ discard block |
||
65 | 65 | * @since 2014.03 |
66 | 66 | * @category Developer |
67 | 67 | */ |
68 | - if( $name === null ) { |
|
69 | - $name = $context->getConfig()->get( 'controller/jobs/product/bought/name', 'Standard' ); |
|
68 | + if ($name === null) { |
|
69 | + $name = $context->getConfig()->get('controller/jobs/product/bought/name', 'Standard'); |
|
70 | 70 | } |
71 | 71 | |
72 | - if( ctype_alnum( $name ) === false ) |
|
72 | + if (ctype_alnum($name) === false) |
|
73 | 73 | { |
74 | - $classname = is_string( $name ) ? '\\Aimeos\\Controller\\Jobs\\Product\\Bought\\' . $name : '<not a string>'; |
|
75 | - throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
|
74 | + $classname = is_string($name) ? '\\Aimeos\\Controller\\Jobs\\Product\\Bought\\' . $name : '<not a string>'; |
|
75 | + throw new \Aimeos\Controller\Jobs\Exception(sprintf('Invalid characters in class name "%1$s"', $classname)); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | $iface = '\\Aimeos\\Controller\\Jobs\\Iface'; |
79 | 79 | $classname = '\\Aimeos\\Controller\\Jobs\\Product\\Bought\\' . $name; |
80 | 80 | |
81 | - $controller = self::createController( $context, $aimeos, $classname, $iface ); |
|
81 | + $controller = self::createController($context, $aimeos, $classname, $iface); |
|
82 | 82 | |
83 | 83 | /** controller/jobs/product/bought/decorators/excludes |
84 | 84 | * Excludes decorators added by the "common" option from the product bought job controller |
@@ -155,6 +155,6 @@ discard block |
||
155 | 155 | * @see controller/jobs/product/bought/decorators/excludes |
156 | 156 | * @see controller/jobs/product/bought/decorators/global |
157 | 157 | */ |
158 | - return self::addControllerDecorators( $context, $aimeos, $controller, 'product/bought' ); |
|
158 | + return self::addControllerDecorators($context, $aimeos, $controller, 'product/bought'); |
|
159 | 159 | } |
160 | 160 | } |
161 | 161 | \ 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 create( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null ) |
|
32 | + public static function create(\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null) |
|
33 | 33 | { |
34 | 34 | /** controller/jobs/subscription/export/csv/name |
35 | 35 | * Class name of the used subscription suggestions scheduler controller implementation |
@@ -64,20 +64,20 @@ discard block |
||
64 | 64 | * @since 2018.04 |
65 | 65 | * @category Developer |
66 | 66 | */ |
67 | - if ( $name === null ) { |
|
67 | + if ($name === null) { |
|
68 | 68 | $name = $context->getConfig()->get('controller/jobs/subscription/export/csv/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\\Subscription\\Export\\Csv\\' . $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\\Subscription\\Export\\Csv\\' . $name; |
79 | 79 | |
80 | - $controller = self::createController( $context, $aimeos, $classname, $iface ); |
|
80 | + $controller = self::createController($context, $aimeos, $classname, $iface); |
|
81 | 81 | |
82 | 82 | /** controller/jobs/subscription/export/csv/decorators/excludes |
83 | 83 | * Excludes decorators added by the "common" option from the subscription export CSV job controller |
@@ -154,6 +154,6 @@ discard block |
||
154 | 154 | * @see controller/jobs/subscription/export/csv/decorators/excludes |
155 | 155 | * @see controller/jobs/subscription/export/csv/decorators/global |
156 | 156 | */ |
157 | - return self::addControllerDecorators( $context, $aimeos, $controller, 'subscription/export/csv' ); |
|
157 | + return self::addControllerDecorators($context, $aimeos, $controller, 'subscription/export/csv'); |
|
158 | 158 | } |
159 | 159 | } |
160 | 160 | \ 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 create( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null ) |
|
32 | + public static function create(\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null) |
|
33 | 33 | { |
34 | 34 | /** controller/jobs/subscription/process/end/name |
35 | 35 | * Class name of the used subscription suggestions scheduler controller implementation |
@@ -64,20 +64,20 @@ discard block |
||
64 | 64 | * @since 2018.04 |
65 | 65 | * @category Developer |
66 | 66 | */ |
67 | - if ( $name === null ) { |
|
67 | + if ($name === null) { |
|
68 | 68 | $name = $context->getConfig()->get('controller/jobs/subscription/process/end/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\\Subscription\\Process\\End\\' . $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\\Subscription\\Process\\End\\' . $name; |
79 | 79 | |
80 | - $controller = self::createController( $context, $aimeos, $classname, $iface ); |
|
80 | + $controller = self::createController($context, $aimeos, $classname, $iface); |
|
81 | 81 | |
82 | 82 | /** controller/jobs/subscription/process/end/decorators/excludes |
83 | 83 | * Excludes decorators added by the "common" option from the subscription process CSV job controller |
@@ -154,6 +154,6 @@ discard block |
||
154 | 154 | * @see controller/jobs/subscription/process/end/decorators/excludes |
155 | 155 | * @see controller/jobs/subscription/process/end/decorators/global |
156 | 156 | */ |
157 | - return self::addControllerDecorators( $context, $aimeos, $controller, 'subscription/process/end' ); |
|
157 | + return self::addControllerDecorators($context, $aimeos, $controller, 'subscription/process/end'); |
|
158 | 158 | } |
159 | 159 | } |
160 | 160 | \ No newline at end of file |