Completed
Push — master ( 490435...42dca0 )
by Aimeos
10:05
created
controller/jobs/src/Controller/Jobs/Index/Optimize/Standard.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	public function getName()
31 31
 	{
32
-		return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Index optimization' );
32
+		return $this->getContext()->getI18n()->dt('controller/jobs', 'Index optimization');
33 33
 	}
34 34
 
35 35
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	public function getDescription()
42 42
 	{
43
-		return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Optimizes the index for searching products faster' );
43
+		return $this->getContext()->getI18n()->dt('controller/jobs', 'Optimizes the index for searching products faster');
44 44
 	}
45 45
 
46 46
 
@@ -51,6 +51,6 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	public function run()
53 53
 	{
54
-		\Aimeos\MShop\Index\Manager\Factory::createManager( $this->getContext() )->optimize();
54
+		\Aimeos\MShop\Index\Manager\Factory::createManager($this->getContext())->optimize();
55 55
 	}
56 56
 }
Please login to merge, or discard this patch.
controller/jobs/src/Controller/Jobs/Index/Rebuild/Standard.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	public function getName()
31 31
 	{
32
-		return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Index rebuild' );
32
+		return $this->getContext()->getI18n()->dt('controller/jobs', 'Index rebuild');
33 33
 	}
34 34
 
35 35
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	public function getDescription()
42 42
 	{
43
-		return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Rebuilds the index for searching products' );
43
+		return $this->getContext()->getI18n()->dt('controller/jobs', 'Rebuilds the index for searching products');
44 44
 	}
45 45
 
46 46
 
@@ -51,15 +51,15 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	public function run()
53 53
 	{
54
-		$timestamp = date( 'Y-m-d H:i:s' );
54
+		$timestamp = date('Y-m-d H:i:s');
55 55
 		$context = clone $this->getContext();
56 56
 
57
-		$context->getLocale()->setLanguageId( null );
58
-		$context->getLocale()->setCurrencyId( null );
57
+		$context->getLocale()->setLanguageId(null);
58
+		$context->getLocale()->setCurrencyId(null);
59 59
 
60
-		$manager = \Aimeos\MShop\Index\Manager\Factory::createManager( $context );
60
+		$manager = \Aimeos\MShop\Index\Manager\Factory::createManager($context);
61 61
 
62 62
 		$manager->rebuildIndex();
63
-		$manager->cleanupIndex( $timestamp );
63
+		$manager->cleanupIndex($timestamp);
64 64
 	}
65 65
 }
Please login to merge, or discard this patch.
controller/jobs/tests/Controller/Jobs/Index/Optimize/StandardTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		$context = \TestHelperJobs::getContext();
25 25
 		$aimeos = \TestHelperJobs::getAimeos();
26 26
 
27
-		$this->object = new \Aimeos\Controller\Jobs\Index\Optimize\Standard( $context, $aimeos );
27
+		$this->object = new \Aimeos\Controller\Jobs\Index\Optimize\Standard($context, $aimeos);
28 28
 	}
29 29
 
30 30
 
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 
43 43
 	public function testGetName()
44 44
 	{
45
-		$this->assertEquals( 'Index optimization', $this->object->getName() );
45
+		$this->assertEquals('Index optimization', $this->object->getName());
46 46
 	}
47 47
 
48 48
 
49 49
 	public function testGetDescription()
50 50
 	{
51 51
 		$text = 'Optimizes the index for searching products faster';
52
-		$this->assertEquals( $text, $this->object->getDescription() );
52
+		$this->assertEquals($text, $this->object->getDescription());
53 53
 	}
54 54
 
55 55
 
@@ -60,21 +60,21 @@  discard block
 block discarded – undo
60 60
 
61 61
 
62 62
 		$name = 'ControllerJobsCatalogIndexOptimizeDefaultRun';
63
-		$context->getConfig()->set( 'mshop/index/manager/name', $name );
63
+		$context->getConfig()->set('mshop/index/manager/name', $name);
64 64
 
65 65
 
66
-		$indexManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Index\\Manager\\Standard' )
67
-			->setMethods( array( 'optimize' ) )
68
-			->setConstructorArgs( array( $context ) )
66
+		$indexManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Index\\Manager\\Standard')
67
+			->setMethods(array('optimize'))
68
+			->setConstructorArgs(array($context))
69 69
 			->getMock();
70 70
 
71
-		\Aimeos\MShop\Catalog\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Index\\Manager\\' . $name, $indexManagerStub );
71
+		\Aimeos\MShop\Catalog\Manager\Factory::injectManager('\\Aimeos\\MShop\\Index\\Manager\\' . $name, $indexManagerStub);
72 72
 
73 73
 
74
-		$indexManagerStub->expects( $this->once() )->method( 'optimize' );
74
+		$indexManagerStub->expects($this->once())->method('optimize');
75 75
 
76 76
 
77
-		$object = new \Aimeos\Controller\Jobs\Index\Optimize\Standard( $context, $aimeos );
77
+		$object = new \Aimeos\Controller\Jobs\Index\Optimize\Standard($context, $aimeos);
78 78
 		$object->run();
79 79
 	}
80 80
 }
Please login to merge, or discard this patch.
controller/jobs/tests/Controller/Jobs/Index/Rebuild/StandardTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		$context = \TestHelperJobs::getContext();
25 25
 		$aimeos = \TestHelperJobs::getAimeos();
26 26
 
27
-		$this->object = new \Aimeos\Controller\Jobs\Index\Rebuild\Standard( $context, $aimeos );
27
+		$this->object = new \Aimeos\Controller\Jobs\Index\Rebuild\Standard($context, $aimeos);
28 28
 	}
29 29
 
30 30
 
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 
43 43
 	public function testGetName()
44 44
 	{
45
-		$this->assertEquals( 'Index rebuild', $this->object->getName() );
45
+		$this->assertEquals('Index rebuild', $this->object->getName());
46 46
 	}
47 47
 
48 48
 
49 49
 	public function testGetDescription()
50 50
 	{
51 51
 		$text = 'Rebuilds the index for searching products';
52
-		$this->assertEquals( $text, $this->object->getDescription() );
52
+		$this->assertEquals($text, $this->object->getDescription());
53 53
 	}
54 54
 
55 55
 
@@ -60,22 +60,22 @@  discard block
 block discarded – undo
60 60
 
61 61
 
62 62
 		$name = 'ControllerJobsCatalogIndexRebuildDefaultRun';
63
-		$context->getConfig()->set( 'mshop/index/manager/name', $name );
63
+		$context->getConfig()->set('mshop/index/manager/name', $name);
64 64
 
65 65
 
66
-		$indexManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Index\\Manager\\Standard' )
67
-			->setMethods( array( 'rebuildIndex', 'cleanupIndex' ) )
68
-			->setConstructorArgs( array( $context ) )
66
+		$indexManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Index\\Manager\\Standard')
67
+			->setMethods(array('rebuildIndex', 'cleanupIndex'))
68
+			->setConstructorArgs(array($context))
69 69
 			->getMock();
70 70
 
71
-		\Aimeos\MShop\Catalog\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Index\\Manager\\' . $name, $indexManagerStub );
71
+		\Aimeos\MShop\Catalog\Manager\Factory::injectManager('\\Aimeos\\MShop\\Index\\Manager\\' . $name, $indexManagerStub);
72 72
 
73 73
 
74
-		$indexManagerStub->expects( $this->once() )->method( 'rebuildIndex' );
75
-		$indexManagerStub->expects( $this->once() )->method( 'cleanupIndex' );
74
+		$indexManagerStub->expects($this->once())->method('rebuildIndex');
75
+		$indexManagerStub->expects($this->once())->method('cleanupIndex');
76 76
 
77 77
 
78
-		$object = new \Aimeos\Controller\Jobs\Index\Rebuild\Standard( $context, $aimeos );
78
+		$object = new \Aimeos\Controller\Jobs\Index\Rebuild\Standard($context, $aimeos);
79 79
 		$object->run();
80 80
 	}
81 81
 }
Please login to merge, or discard this patch.