Completed
Push — master ( a4e8a9...31faa3 )
by Aimeos
02:22
created
controller/frontend/src/Controller/Frontend/Stock/Iface.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
28 28
 	 * @since 2017.03
29 29
 	 */
30
-	public function addFilterCodes( \Aimeos\MW\Criteria\Iface $filter, array $codes );
30
+	public function addFilterCodes(\Aimeos\MW\Criteria\Iface $filter, array $codes);
31 31
 
32 32
 
33 33
 	/**
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
39 39
 	 * @since 2017.03
40 40
 	 */
41
-	public function addFilterTypes( \Aimeos\MW\Criteria\Iface $filter, array $codes );
41
+	public function addFilterTypes(\Aimeos\MW\Criteria\Iface $filter, array $codes);
42 42
 
43 43
 
44 44
 	/**
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	 * @return \Aimeos\MShop\Stock\Item\Iface Stock item including the referenced domains items
59 59
 	 * @since 2017.03
60 60
 	 */
61
-	public function getItem( $id );
61
+	public function getItem($id);
62 62
 
63 63
 
64 64
 	/**
@@ -69,5 +69,5 @@  discard block
 block discarded – undo
69 69
 	 * @return array Ordered list of stock items implementing \Aimeos\MShop\Stock\Item\Iface
70 70
 	 * @since 2017.03
71 71
 	 */
72
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null );
72
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, &$total = null);
73 73
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Stock/Factory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 * @param string|null $name Name of the controller implementaton (default: "Standard")
29 29
 	 * @return \Aimeos\Controller\Frontend\Stock\Iface Controller object
30 30
 	 */
31
-	public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null )
31
+	public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null)
32 32
 	{
33 33
 		/** controller/frontend/stock/name
34 34
 		 * Class name of the used stock frontend controller implementation
@@ -63,20 +63,20 @@  discard block
 block discarded – undo
63 63
 		 * @since 2017.03
64 64
 		 * @category Developer
65 65
 		 */
66
-		if( $name === null ) {
67
-			$name = $context->getConfig()->get( 'controller/frontend/stock/name', 'Standard' );
66
+		if ($name === null) {
67
+			$name = $context->getConfig()->get('controller/frontend/stock/name', 'Standard');
68 68
 		}
69 69
 
70
-		if( ctype_alnum( $name ) === false )
70
+		if (ctype_alnum($name) === false)
71 71
 		{
72
-			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Stock\\' . $name : '<not a string>';
73
-			throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
72
+			$classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Stock\\' . $name : '<not a string>';
73
+			throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in class name "%1$s"', $classname));
74 74
 		}
75 75
 
76 76
 		$iface = '\\Aimeos\\Controller\\Frontend\\Stock\\Iface';
77 77
 		$classname = '\\Aimeos\\Controller\\Frontend\\Stock\\' . $name;
78 78
 
79
-		$manager = self::createControllerBase( $context, $classname, $iface );
79
+		$manager = self::createControllerBase($context, $classname, $iface);
80 80
 
81 81
 		/** controller/frontend/stock/decorators/excludes
82 82
 		 * Excludes decorators added by the "common" option from the stock frontend controllers
@@ -152,6 +152,6 @@  discard block
 block discarded – undo
152 152
 		 * @see controller/frontend/stock/decorators/excludes
153 153
 		 * @see controller/frontend/stock/decorators/global
154 154
 		 */
155
-		return self::addControllerDecorators( $context, $manager, 'stock' );
155
+		return self::addControllerDecorators($context, $manager, 'stock');
156 156
 	}
157 157
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Stock/Decorator/Base.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
 	 * @param \Aimeos\Controller\Frontend\Iface $controller Controller object
31 31
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
32 32
 	 */
33
-	public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context )
33
+	public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context)
34 34
 	{
35 35
 		$iface = '\Aimeos\Controller\Frontend\Stock\Iface';
36
-		if( !( $controller instanceof $iface ) )
36
+		if (!($controller instanceof $iface))
37 37
 		{
38
-			$msg = sprintf( 'Class "%1$s" does not implement interface "%2$s"', get_class( $controller ), $iface );
39
-			throw new \Aimeos\Controller\Frontend\Exception( $msg );
38
+			$msg = sprintf('Class "%1$s" does not implement interface "%2$s"', get_class($controller), $iface);
39
+			throw new \Aimeos\Controller\Frontend\Exception($msg);
40 40
 		}
41 41
 
42 42
 		$this->context = $context;
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 	 * @return mixed Returns the value of the called method
53 53
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
54 54
 	 */
55
-	public function __call( $name, array $param )
55
+	public function __call($name, array $param)
56 56
 	{
57
-		return @call_user_func_array( array( $this->controller, $name ), $param );
57
+		return @call_user_func_array(array($this->controller, $name), $param);
58 58
 	}
59 59
 
60 60
 
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
67 67
 	 * @since 2017.03
68 68
 	 */
69
-	public function addFilterCodes( \Aimeos\MW\Criteria\Iface $filter, array $codes )
69
+	public function addFilterCodes(\Aimeos\MW\Criteria\Iface $filter, array $codes)
70 70
 	{
71
-		return $this->controller->addFilterCodes( $filter, $codes );
71
+		return $this->controller->addFilterCodes($filter, $codes);
72 72
 	}
73 73
 
74 74
 
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
81 81
 	 * @since 2017.03
82 82
 	 */
83
-	public function addFilterTypes( \Aimeos\MW\Criteria\Iface $filter, array $codes )
83
+	public function addFilterTypes(\Aimeos\MW\Criteria\Iface $filter, array $codes)
84 84
 	{
85
-		return $this->controller->addFilterTypes( $filter, $codes );
85
+		return $this->controller->addFilterTypes($filter, $codes);
86 86
 	}
87 87
 
88 88
 
@@ -107,9 +107,9 @@  discard block
 block discarded – undo
107 107
 	 * @return \Aimeos\MShop\Stock\Item\Iface Stock item including the referenced domains items
108 108
 	 * @since 2017.03
109 109
 	 */
110
-	public function getItem( $id )
110
+	public function getItem($id)
111 111
 	{
112
-		return $this->controller->getItem( $id );
112
+		return $this->controller->getItem($id);
113 113
 	}
114 114
 
115 115
 
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
 	 * @return array Ordered list of stock items implementing \Aimeos\MShop\Stock\Item\Iface
122 122
 	 * @since 2017.03
123 123
 	 */
124
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null )
124
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, &$total = null)
125 125
 	{
126
-		return $this->controller->searchItems( $filter, $total );
126
+		return $this->controller->searchItems($filter, $total);
127 127
 	}
128 128
 
129 129
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Stock/Standard.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@  discard block
 block discarded – undo
29 29
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
30 30
 	 * @since 2017.03
31 31
 	 */
32
-	public function addFilterCodes( \Aimeos\MW\Criteria\Iface $filter, array $codes )
32
+	public function addFilterCodes(\Aimeos\MW\Criteria\Iface $filter, array $codes)
33 33
 	{
34 34
 		$expr = [
35
-			$filter->compare( '==', 'stock.productcode', $codes ),
35
+			$filter->compare('==', 'stock.productcode', $codes),
36 36
 			$filter->getConditions(),
37 37
 		];
38
-		$filter->setConditions( $filter->combine( '&&', $expr ) );
38
+		$filter->setConditions($filter->combine('&&', $expr));
39 39
 
40 40
 		return $filter;
41 41
 	}
@@ -49,15 +49,15 @@  discard block
 block discarded – undo
49 49
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
50 50
 	 * @since 2017.03
51 51
 	 */
52
-	public function addFilterTypes( \Aimeos\MW\Criteria\Iface $filter, array $codes )
52
+	public function addFilterTypes(\Aimeos\MW\Criteria\Iface $filter, array $codes)
53 53
 	{
54
-		if( !empty( $codes ) )
54
+		if (!empty($codes))
55 55
 		{
56 56
 			$expr = [
57
-				$filter->compare( '==', 'stock.type.code', $codes ),
57
+				$filter->compare('==', 'stock.type.code', $codes),
58 58
 				$filter->getConditions(),
59 59
 			];
60
-			$filter->setConditions( $filter->combine( '&&', $expr ) );
60
+			$filter->setConditions($filter->combine('&&', $expr));
61 61
 		}
62 62
 
63 63
 		return $filter;
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	 */
74 74
 	public function createFilter()
75 75
 	{
76
-		return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'stock' )->createSearch( true );
76
+		return \Aimeos\MShop\Factory::createManager($this->getContext(), 'stock')->createSearch(true);
77 77
 	}
78 78
 
79 79
 
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
 	 * @return \Aimeos\MShop\Stock\Item\Iface Stock item including the referenced domains items
86 86
 	 * @since 2017.03
87 87
 	 */
88
-	public function getItem( $id )
88
+	public function getItem($id)
89 89
 	{
90
-		return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'stock' )->getItem( $id );
90
+		return \Aimeos\MShop\Factory::createManager($this->getContext(), 'stock')->getItem($id);
91 91
 	}
92 92
 
93 93
 
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
 	 * @return array Ordered list of stock items implementing \Aimeos\MShop\Stock\Item\Iface
100 100
 	 * @since 2017.03
101 101
 	 */
102
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null )
102
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, &$total = null)
103 103
 	{
104
-		return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'stock' )->searchItems( $filter, [], $total );
104
+		return \Aimeos\MShop\Factory::createManager($this->getContext(), 'stock')->searchItems($filter, [], $total);
105 105
 	}
106 106
 }
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/Order/Decorator/BaseTest.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -20,85 +20,85 @@
 block discarded – undo
20 20
 	{
21 21
 		$this->context = \TestHelperFrontend::getContext();
22 22
 
23
-		$this->stub = $this->getMockBuilder( '\Aimeos\Controller\Frontend\Order\Standard' )
23
+		$this->stub = $this->getMockBuilder('\Aimeos\Controller\Frontend\Order\Standard')
24 24
 			->disableOriginalConstructor()
25 25
 			->getMock();
26 26
 
27
-		$this->object = $this->getMockBuilder( '\Aimeos\Controller\Frontend\Order\Decorator\Base' )
28
-			->setConstructorArgs( [$this->stub, $this->context] )
27
+		$this->object = $this->getMockBuilder('\Aimeos\Controller\Frontend\Order\Decorator\Base')
28
+			->setConstructorArgs([$this->stub, $this->context])
29 29
 			->getMockForAbstractClass();
30 30
 	}
31 31
 
32 32
 
33 33
 	protected function tearDown()
34 34
 	{
35
-		unset( $this->context, $this->object, $this->stub );
35
+		unset($this->context, $this->object, $this->stub);
36 36
 	}
37 37
 
38 38
 
39 39
 	public function testStore()
40 40
 	{
41
-		$orderItem = \Aimeos\MShop\Factory::createManager( $this->context, 'order' )->createItem();
42
-		$basket = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' )->createItem();
41
+		$orderItem = \Aimeos\MShop\Factory::createManager($this->context, 'order')->createItem();
42
+		$basket = \Aimeos\MShop\Factory::createManager($this->context, 'order/base')->createItem();
43 43
 
44
-		$this->stub->expects( $this->once() )->method( 'store' )
45
-			->will( $this->returnValue( $orderItem ) );
44
+		$this->stub->expects($this->once())->method('store')
45
+			->will($this->returnValue($orderItem));
46 46
 
47
-		$this->assertInstanceOf( '\Aimeos\MShop\Order\Item\Iface', $this->object->store( $basket ) );
47
+		$this->assertInstanceOf('\Aimeos\MShop\Order\Item\Iface', $this->object->store($basket));
48 48
 	}
49 49
 
50 50
 
51 51
 	public function testBlock()
52 52
 	{
53
-		$orderItem = \Aimeos\MShop\Factory::createManager( $this->context, 'order' )->createItem();
53
+		$orderItem = \Aimeos\MShop\Factory::createManager($this->context, 'order')->createItem();
54 54
 
55
-		$this->stub->expects( $this->once() )->method( 'block' );
55
+		$this->stub->expects($this->once())->method('block');
56 56
 
57
-		$this->object->block( $orderItem );
57
+		$this->object->block($orderItem);
58 58
 	}
59 59
 
60 60
 
61 61
 	public function testUnblock()
62 62
 	{
63
-		$orderItem = \Aimeos\MShop\Factory::createManager( $this->context, 'order' )->createItem();
63
+		$orderItem = \Aimeos\MShop\Factory::createManager($this->context, 'order')->createItem();
64 64
 
65
-		$this->stub->expects( $this->once() )->method( 'unblock' );
65
+		$this->stub->expects($this->once())->method('unblock');
66 66
 
67
-		$this->object->unblock( $orderItem );
67
+		$this->object->unblock($orderItem);
68 68
 	}
69 69
 
70 70
 
71 71
 	public function testUpdate()
72 72
 	{
73
-		$orderItem = \Aimeos\MShop\Factory::createManager( $this->context, 'order' )->createItem();
73
+		$orderItem = \Aimeos\MShop\Factory::createManager($this->context, 'order')->createItem();
74 74
 
75
-		$this->stub->expects( $this->once() )->method( 'update' );
75
+		$this->stub->expects($this->once())->method('update');
76 76
 
77
-		$this->object->update( $orderItem );
77
+		$this->object->update($orderItem);
78 78
 	}
79 79
 
80 80
 
81 81
 	public function testGetController()
82 82
 	{
83
-		$result = $this->access( 'getController' )->invokeArgs( $this->object, [] );
83
+		$result = $this->access('getController')->invokeArgs($this->object, []);
84 84
 
85
-		$this->assertSame( $this->stub, $result );
85
+		$this->assertSame($this->stub, $result);
86 86
 	}
87 87
 
88 88
 
89 89
 	public function testGetContext()
90 90
 	{
91
-		$result = $this->access( 'getContext' )->invokeArgs( $this->object, [] );
91
+		$result = $this->access('getContext')->invokeArgs($this->object, []);
92 92
 
93
-		$this->assertInstanceOf( '\Aimeos\MShop\Context\Item\Iface', $result );
93
+		$this->assertInstanceOf('\Aimeos\MShop\Context\Item\Iface', $result);
94 94
 	}
95 95
 
96 96
 
97
-	protected function access( $name )
97
+	protected function access($name)
98 98
 	{
99
-		$class = new \ReflectionClass( '\Aimeos\Controller\Frontend\Order\Decorator\Base' );
100
-		$method = $class->getMethod( $name );
101
-		$method->setAccessible( true );
99
+		$class = new \ReflectionClass('\Aimeos\Controller\Frontend\Order\Decorator\Base');
100
+		$method = $class->getMethod($name);
101
+		$method->setAccessible(true);
102 102
 
103 103
 		return $method;
104 104
 	}
Please login to merge, or discard this patch.
frontend/tests/Controller/Frontend/Catalog/Decorator/BaseTest.php 1 patch
Spacing   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -20,228 +20,228 @@
 block discarded – undo
20 20
 	{
21 21
 		$this->context = \TestHelperFrontend::getContext();
22 22
 
23
-		$this->stub = $this->getMockBuilder( '\Aimeos\Controller\Frontend\Catalog\Standard' )
23
+		$this->stub = $this->getMockBuilder('\Aimeos\Controller\Frontend\Catalog\Standard')
24 24
 			->disableOriginalConstructor()
25 25
 			->getMock();
26 26
 
27
-		$this->object = $this->getMockBuilder( '\Aimeos\Controller\Frontend\Catalog\Decorator\Base' )
28
-			->setConstructorArgs( [$this->stub, $this->context] )
27
+		$this->object = $this->getMockBuilder('\Aimeos\Controller\Frontend\Catalog\Decorator\Base')
28
+			->setConstructorArgs([$this->stub, $this->context])
29 29
 			->getMockForAbstractClass();
30 30
 	}
31 31
 
32 32
 
33 33
 	protected function tearDown()
34 34
 	{
35
-		unset( $this->context, $this->object, $this->stub );
35
+		unset($this->context, $this->object, $this->stub);
36 36
 	}
37 37
 
38 38
 
39 39
 	public function testCreateManager()
40 40
 	{
41
-		$catalogManager = \Aimeos\MShop\Factory::createManager( $this->context, 'catalog' );
41
+		$catalogManager = \Aimeos\MShop\Factory::createManager($this->context, 'catalog');
42 42
 
43
-		$this->stub->expects( $this->once() )->method( 'createManager' )
44
-			->will( $this->returnValue( $catalogManager ) );
43
+		$this->stub->expects($this->once())->method('createManager')
44
+			->will($this->returnValue($catalogManager));
45 45
 
46
-		$this->assertInstanceOf( '\Aimeos\MShop\Common\Manager\Iface', $this->object->createManager( 'catalog' ) );
46
+		$this->assertInstanceOf('\Aimeos\MShop\Common\Manager\Iface', $this->object->createManager('catalog'));
47 47
 	}
48 48
 
49 49
 
50 50
 	public function testCreateFilter()
51 51
 	{
52
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'catalog' )->createSearch();
52
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'catalog')->createSearch();
53 53
 
54
-		$this->stub->expects( $this->once() )->method( 'createFilter' )
55
-			->will( $this->returnValue( $search ) );
54
+		$this->stub->expects($this->once())->method('createFilter')
55
+			->will($this->returnValue($search));
56 56
 
57
-		$this->assertInstanceOf( '\Aimeos\MW\Criteria\Iface', $this->object->createFilter() );
57
+		$this->assertInstanceOf('\Aimeos\MW\Criteria\Iface', $this->object->createFilter());
58 58
 	}
59 59
 
60 60
 
61 61
 	public function testGetPath()
62 62
 	{
63
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'catalog' )->createSearch();
63
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'catalog')->createSearch();
64 64
 
65
-		$this->stub->expects( $this->once() )->method( 'getPath' )
66
-			->will( $this->returnValue( [] ) );
65
+		$this->stub->expects($this->once())->method('getPath')
66
+			->will($this->returnValue([]));
67 67
 
68
-		$this->assertEquals( [], $this->object->getPath( -1 ) );
68
+		$this->assertEquals([], $this->object->getPath( -1 ));
69 69
 	}
70 70
 
71 71
 
72 72
 	public function testGetTree()
73 73
 	{
74
-		$catItem = \Aimeos\MShop\Factory::createManager( $this->context, 'catalog' )->createItem();
74
+		$catItem = \Aimeos\MShop\Factory::createManager($this->context, 'catalog')->createItem();
75 75
 
76
-		$this->stub->expects( $this->once() )->method( 'getTree' )
77
-			->will( $this->returnValue( $catItem ) );
76
+		$this->stub->expects($this->once())->method('getTree')
77
+			->will($this->returnValue($catItem));
78 78
 
79
-		$this->assertInstanceOf( '\Aimeos\MShop\Catalog\Item\Iface', $this->object->getTree() );
79
+		$this->assertInstanceOf('\Aimeos\MShop\Catalog\Item\Iface', $this->object->getTree());
80 80
 	}
81 81
 
82 82
 
83 83
 	public function testCreateCatalogFilter()
84 84
 	{
85
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'catalog' )->createSearch();
85
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'catalog')->createSearch();
86 86
 
87
-		$this->stub->expects( $this->once() )->method( 'createCatalogFilter' )
88
-			->will( $this->returnValue( $search ) );
87
+		$this->stub->expects($this->once())->method('createCatalogFilter')
88
+			->will($this->returnValue($search));
89 89
 
90
-		$this->assertInstanceOf( '\Aimeos\MW\Criteria\Iface', $this->object->createCatalogFilter() );
90
+		$this->assertInstanceOf('\Aimeos\MW\Criteria\Iface', $this->object->createCatalogFilter());
91 91
 	}
92 92
 
93 93
 
94 94
 	public function testGetCatalogPath()
95 95
 	{
96
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'catalog' )->createSearch();
96
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'catalog')->createSearch();
97 97
 
98
-		$this->stub->expects( $this->once() )->method( 'getCatalogPath' )
99
-			->will( $this->returnValue( [] ) );
98
+		$this->stub->expects($this->once())->method('getCatalogPath')
99
+			->will($this->returnValue([]));
100 100
 
101
-		$this->assertEquals( [], $this->object->getCatalogPath( -1 ) );
101
+		$this->assertEquals([], $this->object->getCatalogPath( -1 ));
102 102
 	}
103 103
 
104 104
 
105 105
 	public function testGetCatalogTree()
106 106
 	{
107
-		$catItem = \Aimeos\MShop\Factory::createManager( $this->context, 'catalog' )->createItem();
107
+		$catItem = \Aimeos\MShop\Factory::createManager($this->context, 'catalog')->createItem();
108 108
 
109
-		$this->stub->expects( $this->once() )->method( 'getCatalogTree' )
110
-			->will( $this->returnValue( $catItem ) );
109
+		$this->stub->expects($this->once())->method('getCatalogTree')
110
+			->will($this->returnValue($catItem));
111 111
 
112
-		$this->assertInstanceOf( '\Aimeos\MShop\Catalog\Item\Iface', $this->object->getCatalogTree() );
112
+		$this->assertInstanceOf('\Aimeos\MShop\Catalog\Item\Iface', $this->object->getCatalogTree());
113 113
 	}
114 114
 
115 115
 
116 116
 	public function testAggregateIndex()
117 117
 	{
118
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'index' )->createSearch();
118
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'index')->createSearch();
119 119
 
120
-		$this->stub->expects( $this->once() )->method( 'aggregateIndex' )
121
-			->will( $this->returnValue( [] ) );
120
+		$this->stub->expects($this->once())->method('aggregateIndex')
121
+			->will($this->returnValue([]));
122 122
 
123
-		$this->assertEquals( [], $this->object->aggregateIndex( $search, 'test' ) );
123
+		$this->assertEquals([], $this->object->aggregateIndex($search, 'test'));
124 124
 	}
125 125
 
126 126
 
127 127
 	public function testAddIndexFilterCategory()
128 128
 	{
129
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'index' )->createSearch();
129
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'index')->createSearch();
130 130
 
131
-		$this->stub->expects( $this->once() )->method( 'addIndexFilterCategory' )
132
-			->will( $this->returnArgument( 0 ) );
131
+		$this->stub->expects($this->once())->method('addIndexFilterCategory')
132
+			->will($this->returnArgument(0));
133 133
 
134
-		$this->assertInstanceOf( '\Aimeos\MW\Criteria\Iface', $this->object->addIndexFilterCategory( $search, -1 ) );
134
+		$this->assertInstanceOf('\Aimeos\MW\Criteria\Iface', $this->object->addIndexFilterCategory($search, -1));
135 135
 	}
136 136
 
137 137
 
138 138
 	public function testAddIndexFilterText()
139 139
 	{
140
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'index' )->createSearch();
140
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'index')->createSearch();
141 141
 
142
-		$this->stub->expects( $this->once() )->method( 'addIndexFilterText' )
143
-			->will( $this->returnArgument( 0 ) );
142
+		$this->stub->expects($this->once())->method('addIndexFilterText')
143
+			->will($this->returnArgument(0));
144 144
 
145
-		$this->assertInstanceOf( '\Aimeos\MW\Criteria\Iface', $this->object->addIndexFilterText( $search, 'test' ) );
145
+		$this->assertInstanceOf('\Aimeos\MW\Criteria\Iface', $this->object->addIndexFilterText($search, 'test'));
146 146
 	}
147 147
 
148 148
 
149 149
 	public function testCreateIndexFilter()
150 150
 	{
151
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'index' )->createSearch();
151
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'index')->createSearch();
152 152
 
153
-		$this->stub->expects( $this->once() )->method( 'createIndexFilter' )
154
-			->will( $this->returnValue( $search ) );
153
+		$this->stub->expects($this->once())->method('createIndexFilter')
154
+			->will($this->returnValue($search));
155 155
 
156
-		$this->assertInstanceOf( '\Aimeos\MW\Criteria\Iface', $this->object->createIndexFilter() );
156
+		$this->assertInstanceOf('\Aimeos\MW\Criteria\Iface', $this->object->createIndexFilter());
157 157
 	}
158 158
 
159 159
 
160 160
 	public function testCreateIndexFilterCategory()
161 161
 	{
162
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'index' )->createSearch();
162
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'index')->createSearch();
163 163
 
164
-		$this->stub->expects( $this->once() )->method( 'createIndexFilterCategory' )
165
-			->will( $this->returnValue( $search ) );
164
+		$this->stub->expects($this->once())->method('createIndexFilterCategory')
165
+			->will($this->returnValue($search));
166 166
 
167
-		$this->assertInstanceOf( '\Aimeos\MW\Criteria\Iface', $this->object->createIndexFilterCategory( -1 ) );
167
+		$this->assertInstanceOf('\Aimeos\MW\Criteria\Iface', $this->object->createIndexFilterCategory( -1 ));
168 168
 	}
169 169
 
170 170
 
171 171
 	public function testCreateIndexFilterText()
172 172
 	{
173
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'index' )->createSearch();
173
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'index')->createSearch();
174 174
 
175
-		$this->stub->expects( $this->once() )->method( 'createIndexFilterText' )
176
-			->will( $this->returnValue( $search ) );
175
+		$this->stub->expects($this->once())->method('createIndexFilterText')
176
+			->will($this->returnValue($search));
177 177
 
178
-		$this->assertInstanceOf( '\Aimeos\MW\Criteria\Iface', $this->object->createIndexFilterText( 'test' ) );
178
+		$this->assertInstanceOf('\Aimeos\MW\Criteria\Iface', $this->object->createIndexFilterText('test'));
179 179
 	}
180 180
 
181 181
 
182 182
 	public function testGetIndexItems()
183 183
 	{
184
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'index' )->createSearch();
184
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'index')->createSearch();
185 185
 
186
-		$this->stub->expects( $this->once() )->method( 'getIndexItems' )
187
-			->will( $this->returnValue( [] ) );
186
+		$this->stub->expects($this->once())->method('getIndexItems')
187
+			->will($this->returnValue([]));
188 188
 
189
-		$this->assertEquals( [], $this->object->getIndexItems( $search ) );
189
+		$this->assertEquals([], $this->object->getIndexItems($search));
190 190
 	}
191 191
 
192 192
 
193 193
 	public function testGetProductItems()
194 194
 	{
195
-		$this->stub->expects( $this->once() )->method( 'getProductItems' )
196
-			->will( $this->returnValue( [] ) );
195
+		$this->stub->expects($this->once())->method('getProductItems')
196
+			->will($this->returnValue([]));
197 197
 
198
-		$this->assertEquals( [], $this->object->getProductItems( [-1] ) );
198
+		$this->assertEquals([], $this->object->getProductItems([-1]));
199 199
 	}
200 200
 
201 201
 
202 202
 	public function testCreateTextFilter()
203 203
 	{
204
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'index' )->createSearch();
204
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'index')->createSearch();
205 205
 
206
-		$this->stub->expects( $this->once() )->method( 'createTextFilter' )
207
-			->will( $this->returnValue( $search ) );
206
+		$this->stub->expects($this->once())->method('createTextFilter')
207
+			->will($this->returnValue($search));
208 208
 
209
-		$this->assertInstanceOf( '\Aimeos\MW\Criteria\Iface', $this->object->createTextFilter( 'test' ) );
209
+		$this->assertInstanceOf('\Aimeos\MW\Criteria\Iface', $this->object->createTextFilter('test'));
210 210
 	}
211 211
 
212 212
 
213 213
 	public function testGetTextList()
214 214
 	{
215
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'index' )->createSearch();
215
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'index')->createSearch();
216 216
 
217
-		$this->stub->expects( $this->once() )->method( 'getTextList' )
218
-			->will( $this->returnValue( [] ) );
217
+		$this->stub->expects($this->once())->method('getTextList')
218
+			->will($this->returnValue([]));
219 219
 
220
-		$this->assertEquals( [], $this->object->getTextList( $search ) );
220
+		$this->assertEquals([], $this->object->getTextList($search));
221 221
 	}
222 222
 
223 223
 
224 224
 	public function testGetController()
225 225
 	{
226
-		$result = $this->access( 'getController' )->invokeArgs( $this->object, [] );
226
+		$result = $this->access('getController')->invokeArgs($this->object, []);
227 227
 
228
-		$this->assertSame( $this->stub, $result );
228
+		$this->assertSame($this->stub, $result);
229 229
 	}
230 230
 
231 231
 
232 232
 	public function testGetContext()
233 233
 	{
234
-		$result = $this->access( 'getContext' )->invokeArgs( $this->object, [] );
234
+		$result = $this->access('getContext')->invokeArgs($this->object, []);
235 235
 
236
-		$this->assertInstanceOf( '\Aimeos\MShop\Context\Item\Iface', $result );
236
+		$this->assertInstanceOf('\Aimeos\MShop\Context\Item\Iface', $result);
237 237
 	}
238 238
 
239 239
 
240
-	protected function access( $name )
240
+	protected function access($name)
241 241
 	{
242
-		$class = new \ReflectionClass( '\Aimeos\Controller\Frontend\Catalog\Decorator\Base' );
243
-		$method = $class->getMethod( $name );
244
-		$method->setAccessible( true );
242
+		$class = new \ReflectionClass('\Aimeos\Controller\Frontend\Catalog\Decorator\Base');
243
+		$method = $class->getMethod($name);
244
+		$method->setAccessible(true);
245 245
 
246 246
 		return $method;
247 247
 	}
Please login to merge, or discard this patch.
frontend/tests/Controller/Frontend/Service/Decorator/BaseTest.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -20,78 +20,78 @@
 block discarded – undo
20 20
 	{
21 21
 		$this->context = \TestHelperFrontend::getContext();
22 22
 
23
-		$this->stub = $this->getMockBuilder( '\Aimeos\Controller\Frontend\Service\Standard' )
23
+		$this->stub = $this->getMockBuilder('\Aimeos\Controller\Frontend\Service\Standard')
24 24
 			->disableOriginalConstructor()
25 25
 			->getMock();
26 26
 
27
-		$this->object = $this->getMockBuilder( '\Aimeos\Controller\Frontend\Service\Decorator\Base' )
28
-			->setConstructorArgs( [$this->stub, $this->context] )
27
+		$this->object = $this->getMockBuilder('\Aimeos\Controller\Frontend\Service\Decorator\Base')
28
+			->setConstructorArgs([$this->stub, $this->context])
29 29
 			->getMockForAbstractClass();
30 30
 	}
31 31
 
32 32
 
33 33
 	protected function tearDown()
34 34
 	{
35
-		unset( $this->context, $this->object, $this->stub );
35
+		unset($this->context, $this->object, $this->stub);
36 36
 	}
37 37
 
38 38
 
39 39
 	public function testGetServices()
40 40
 	{
41
-		$basket = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' )->createItem();
41
+		$basket = \Aimeos\MShop\Factory::createManager($this->context, 'order/base')->createItem();
42 42
 
43
-		$this->stub->expects( $this->once() )->method( 'getServices' )
44
-			->will( $this->returnValue( [] ) );
43
+		$this->stub->expects($this->once())->method('getServices')
44
+			->will($this->returnValue([]));
45 45
 
46
-		$this->assertEquals( [], $this->object->getServices( 'payment', $basket ) );
46
+		$this->assertEquals([], $this->object->getServices('payment', $basket));
47 47
 	}
48 48
 
49 49
 
50 50
 	public function testGetServiceAttributes()
51 51
 	{
52
-		$basket = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' )->createItem();
52
+		$basket = \Aimeos\MShop\Factory::createManager($this->context, 'order/base')->createItem();
53 53
 
54
-		$this->stub->expects( $this->once() )->method( 'getServiceAttributes' )
55
-			->will( $this->returnValue( [] ) );
54
+		$this->stub->expects($this->once())->method('getServiceAttributes')
55
+			->will($this->returnValue([]));
56 56
 
57
-		$this->assertEquals( [], $this->object->getServiceAttributes( 'payment', -1, $basket ) );
57
+		$this->assertEquals([], $this->object->getServiceAttributes('payment', -1, $basket));
58 58
 	}
59 59
 
60 60
 
61 61
 	public function testGetServicePrice()
62 62
 	{
63
-		$priceItem = \Aimeos\MShop\Factory::createManager( $this->context, 'price' )->createItem();
64
-		$basket = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' )->createItem();
63
+		$priceItem = \Aimeos\MShop\Factory::createManager($this->context, 'price')->createItem();
64
+		$basket = \Aimeos\MShop\Factory::createManager($this->context, 'order/base')->createItem();
65 65
 
66
-		$this->stub->expects( $this->once() )->method( 'getServicePrice' )
67
-			->will( $this->returnValue( $priceItem ) );
66
+		$this->stub->expects($this->once())->method('getServicePrice')
67
+			->will($this->returnValue($priceItem));
68 68
 
69
-		$this->assertInstanceOf( '\Aimeos\MShop\Price\Item\Iface', $this->object->getServicePrice( 'payment', -1, $basket ) );
69
+		$this->assertInstanceOf('\Aimeos\MShop\Price\Item\Iface', $this->object->getServicePrice('payment', -1, $basket));
70 70
 	}
71 71
 
72 72
 
73 73
 	public function testCheckServiceAttributes()
74 74
 	{
75
-		$this->stub->expects( $this->once() )->method( 'checkServiceAttributes' )
76
-			->will( $this->returnValue( [] ) );
75
+		$this->stub->expects($this->once())->method('checkServiceAttributes')
76
+			->will($this->returnValue([]));
77 77
 
78
-		$this->assertEquals( [], $this->object->checkServiceAttributes( 'payment', -1, [] ) );
78
+		$this->assertEquals([], $this->object->checkServiceAttributes('payment', -1, []));
79 79
 	}
80 80
 
81 81
 
82 82
 	public function testGetContext()
83 83
 	{
84
-		$result = $this->access( 'getContext' )->invokeArgs( $this->object, [] );
84
+		$result = $this->access('getContext')->invokeArgs($this->object, []);
85 85
 
86
-		$this->assertInstanceOf( '\Aimeos\MShop\Context\Item\Iface', $result );
86
+		$this->assertInstanceOf('\Aimeos\MShop\Context\Item\Iface', $result);
87 87
 	}
88 88
 
89 89
 
90
-	protected function access( $name )
90
+	protected function access($name)
91 91
 	{
92
-		$class = new \ReflectionClass( '\Aimeos\Controller\Frontend\Service\Decorator\Base' );
93
-		$method = $class->getMethod( $name );
94
-		$method->setAccessible( true );
92
+		$class = new \ReflectionClass('\Aimeos\Controller\Frontend\Service\Decorator\Base');
93
+		$method = $class->getMethod($name);
94
+		$method->setAccessible(true);
95 95
 
96 96
 		return $method;
97 97
 	}
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/Stock/Decorator/BaseTest.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -20,90 +20,90 @@
 block discarded – undo
20 20
 	{
21 21
 		$this->context = \TestHelperFrontend::getContext();
22 22
 
23
-		$this->stub = $this->getMockBuilder( '\Aimeos\Controller\Frontend\Stock\Standard' )
23
+		$this->stub = $this->getMockBuilder('\Aimeos\Controller\Frontend\Stock\Standard')
24 24
 			->disableOriginalConstructor()
25 25
 			->getMock();
26 26
 
27
-		$this->object = $this->getMockBuilder( '\Aimeos\Controller\Frontend\Stock\Decorator\Base' )
28
-			->setConstructorArgs( [$this->stub, $this->context] )
27
+		$this->object = $this->getMockBuilder('\Aimeos\Controller\Frontend\Stock\Decorator\Base')
28
+			->setConstructorArgs([$this->stub, $this->context])
29 29
 			->getMockForAbstractClass();
30 30
 	}
31 31
 
32 32
 
33 33
 	protected function tearDown()
34 34
 	{
35
-		unset( $this->context, $this->object, $this->stub );
35
+		unset($this->context, $this->object, $this->stub);
36 36
 	}
37 37
 
38 38
 
39 39
 	public function testAddFilterCodes()
40 40
 	{
41
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'stock' )->createSearch();
41
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'stock')->createSearch();
42 42
 
43
-		$this->stub->expects( $this->once() )->method( 'addFilterCodes' )
44
-			->will( $this->returnArgument( 0 ) );
43
+		$this->stub->expects($this->once())->method('addFilterCodes')
44
+			->will($this->returnArgument(0));
45 45
 
46
-		$this->assertInstanceOf( '\Aimeos\MW\Criteria\Iface', $this->object->addFilterCodes( $search, [] ) );
46
+		$this->assertInstanceOf('\Aimeos\MW\Criteria\Iface', $this->object->addFilterCodes($search, []));
47 47
 	}
48 48
 
49 49
 
50 50
 	public function testAddFilterTypes()
51 51
 	{
52
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'stock' )->createSearch();
52
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'stock')->createSearch();
53 53
 
54
-		$this->stub->expects( $this->once() )->method( 'addFilterTypes' )
55
-			->will( $this->returnArgument( 0 ) );
54
+		$this->stub->expects($this->once())->method('addFilterTypes')
55
+			->will($this->returnArgument(0));
56 56
 
57
-		$this->assertInstanceOf( '\Aimeos\MW\Criteria\Iface', $this->object->addFilterTypes( $search, [] ) );
57
+		$this->assertInstanceOf('\Aimeos\MW\Criteria\Iface', $this->object->addFilterTypes($search, []));
58 58
 	}
59 59
 
60 60
 
61 61
 	public function testCreateFilter()
62 62
 	{
63
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'stock' )->createSearch();
63
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'stock')->createSearch();
64 64
 
65
-		$this->stub->expects( $this->once() )->method( 'createFilter' )
66
-			->will( $this->returnValue( $search ) );
65
+		$this->stub->expects($this->once())->method('createFilter')
66
+			->will($this->returnValue($search));
67 67
 
68
-		$this->assertInstanceOf( '\Aimeos\MW\Criteria\Iface', $this->object->createFilter() );
68
+		$this->assertInstanceOf('\Aimeos\MW\Criteria\Iface', $this->object->createFilter());
69 69
 	}
70 70
 
71 71
 
72 72
 	public function testGetItem()
73 73
 	{
74
-		$item = \Aimeos\MShop\Factory::createManager( $this->context, 'stock' )->createItem();
74
+		$item = \Aimeos\MShop\Factory::createManager($this->context, 'stock')->createItem();
75 75
 
76
-		$this->stub->expects( $this->once() )->method( 'getItem' )
77
-			->will( $this->returnValue( $item ) );
76
+		$this->stub->expects($this->once())->method('getItem')
77
+			->will($this->returnValue($item));
78 78
 
79
-		$this->assertInstanceOf( '\Aimeos\MShop\Stock\Item\Iface', $this->object->getItem( -1 ) );
79
+		$this->assertInstanceOf('\Aimeos\MShop\Stock\Item\Iface', $this->object->getItem( -1 ));
80 80
 	}
81 81
 
82 82
 
83 83
 	public function testSearchItems()
84 84
 	{
85
-		$filter = \Aimeos\MShop\Factory::createManager( $this->context, 'stock' )->createSearch();
85
+		$filter = \Aimeos\MShop\Factory::createManager($this->context, 'stock')->createSearch();
86 86
 
87
-		$this->stub->expects( $this->once() )->method( 'searchItems' )
88
-			->will( $this->returnValue( [] ) );
87
+		$this->stub->expects($this->once())->method('searchItems')
88
+			->will($this->returnValue([]));
89 89
 
90
-		$this->assertEquals( [], $this->object->searchItems( $filter ) );
90
+		$this->assertEquals([], $this->object->searchItems($filter));
91 91
 	}
92 92
 
93 93
 
94 94
 	public function testGetContext()
95 95
 	{
96
-		$result = $this->access( 'getContext' )->invokeArgs( $this->object, [] );
96
+		$result = $this->access('getContext')->invokeArgs($this->object, []);
97 97
 
98
-		$this->assertInstanceOf( '\Aimeos\MShop\Context\Item\Iface', $result );
98
+		$this->assertInstanceOf('\Aimeos\MShop\Context\Item\Iface', $result);
99 99
 	}
100 100
 
101 101
 
102
-	protected function access( $name )
102
+	protected function access($name)
103 103
 	{
104
-		$class = new \ReflectionClass( '\Aimeos\Controller\Frontend\Stock\Decorator\Base' );
105
-		$method = $class->getMethod( $name );
106
-		$method->setAccessible( true );
104
+		$class = new \ReflectionClass('\Aimeos\Controller\Frontend\Stock\Decorator\Base');
105
+		$method = $class->getMethod($name);
106
+		$method->setAccessible(true);
107 107
 
108 108
 		return $method;
109 109
 	}
Please login to merge, or discard this patch.
frontend/tests/Controller/Frontend/Product/Decorator/BaseTest.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -20,121 +20,121 @@
 block discarded – undo
20 20
 	{
21 21
 		$this->context = \TestHelperFrontend::getContext();
22 22
 
23
-		$this->stub = $this->getMockBuilder( '\Aimeos\Controller\Frontend\Product\Standard' )
23
+		$this->stub = $this->getMockBuilder('\Aimeos\Controller\Frontend\Product\Standard')
24 24
 			->disableOriginalConstructor()
25 25
 			->getMock();
26 26
 
27
-		$this->object = $this->getMockBuilder( '\Aimeos\Controller\Frontend\Product\Decorator\Base' )
28
-			->setConstructorArgs( [$this->stub, $this->context] )
27
+		$this->object = $this->getMockBuilder('\Aimeos\Controller\Frontend\Product\Decorator\Base')
28
+			->setConstructorArgs([$this->stub, $this->context])
29 29
 			->getMockForAbstractClass();
30 30
 	}
31 31
 
32 32
 
33 33
 	protected function tearDown()
34 34
 	{
35
-		unset( $this->context, $this->object, $this->stub );
35
+		unset($this->context, $this->object, $this->stub);
36 36
 	}
37 37
 
38 38
 
39 39
 	public function testAddFilterAttribute()
40 40
 	{
41
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'index' )->createSearch();
41
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'index')->createSearch();
42 42
 
43
-		$this->stub->expects( $this->once() )->method( 'addFilterAttribute' )
44
-			->will( $this->returnArgument( 0 ) );
43
+		$this->stub->expects($this->once())->method('addFilterAttribute')
44
+			->will($this->returnArgument(0));
45 45
 
46
-		$this->assertInstanceOf( '\Aimeos\MW\Criteria\Iface', $this->object->addFilterAttribute( $search, [], [], [] ) );
46
+		$this->assertInstanceOf('\Aimeos\MW\Criteria\Iface', $this->object->addFilterAttribute($search, [], [], []));
47 47
 	}
48 48
 
49 49
 
50 50
 	public function testAddFilterCategory()
51 51
 	{
52
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'index' )->createSearch();
52
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'index')->createSearch();
53 53
 
54
-		$this->stub->expects( $this->once() )->method( 'addFilterCategory' )
55
-			->will( $this->returnArgument( 0 ) );
54
+		$this->stub->expects($this->once())->method('addFilterCategory')
55
+			->will($this->returnArgument(0));
56 56
 
57
-		$this->assertInstanceOf( '\Aimeos\MW\Criteria\Iface', $this->object->addFilterCategory( $search, -1 ) );
57
+		$this->assertInstanceOf('\Aimeos\MW\Criteria\Iface', $this->object->addFilterCategory($search, -1));
58 58
 	}
59 59
 
60 60
 
61 61
 	public function testAddFilterText()
62 62
 	{
63
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'index' )->createSearch();
63
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'index')->createSearch();
64 64
 
65
-		$this->stub->expects( $this->once() )->method( 'addFilterText' )
66
-			->will( $this->returnArgument( 0 ) );
65
+		$this->stub->expects($this->once())->method('addFilterText')
66
+			->will($this->returnArgument(0));
67 67
 
68
-		$this->assertInstanceOf( '\Aimeos\MW\Criteria\Iface', $this->object->addFilterText( $search, 'test' ) );
68
+		$this->assertInstanceOf('\Aimeos\MW\Criteria\Iface', $this->object->addFilterText($search, 'test'));
69 69
 	}
70 70
 
71 71
 
72 72
 	public function testAggregate()
73 73
 	{
74
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'index' )->createSearch();
74
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'index')->createSearch();
75 75
 
76
-		$this->stub->expects( $this->once() )->method( 'aggregate' )
77
-			->will( $this->returnValue( [] ) );
76
+		$this->stub->expects($this->once())->method('aggregate')
77
+			->will($this->returnValue([]));
78 78
 
79
-		$this->assertEquals( [], $this->object->aggregate( $search, 'test' ) );
79
+		$this->assertEquals([], $this->object->aggregate($search, 'test'));
80 80
 	}
81 81
 
82 82
 
83 83
 	public function testCreateFilter()
84 84
 	{
85
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'index' )->createSearch();
85
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'index')->createSearch();
86 86
 
87
-		$this->stub->expects( $this->once() )->method( 'createFilter' )
88
-			->will( $this->returnValue( $search ) );
87
+		$this->stub->expects($this->once())->method('createFilter')
88
+			->will($this->returnValue($search));
89 89
 
90
-		$this->assertInstanceOf( '\Aimeos\MW\Criteria\Iface', $this->object->createFilter() );
90
+		$this->assertInstanceOf('\Aimeos\MW\Criteria\Iface', $this->object->createFilter());
91 91
 	}
92 92
 
93 93
 
94 94
 	public function testGetItem()
95 95
 	{
96
-		$prodItem = \Aimeos\MShop\Factory::createManager( $this->context, 'index' )->createItem();
96
+		$prodItem = \Aimeos\MShop\Factory::createManager($this->context, 'index')->createItem();
97 97
 
98
-		$this->stub->expects( $this->once() )->method( 'getItem' )
99
-			->will( $this->returnValue( $prodItem ) );
98
+		$this->stub->expects($this->once())->method('getItem')
99
+			->will($this->returnValue($prodItem));
100 100
 
101
-		$this->assertInstanceOf( '\Aimeos\MShop\Product\Item\Iface', $this->object->getItem( -1 ) );
101
+		$this->assertInstanceOf('\Aimeos\MShop\Product\Item\Iface', $this->object->getItem( -1 ));
102 102
 	}
103 103
 
104 104
 
105 105
 	public function testGetItems()
106 106
 	{
107
-		$this->stub->expects( $this->once() )->method( 'getItems' )
108
-			->will( $this->returnValue( [] ) );
107
+		$this->stub->expects($this->once())->method('getItems')
108
+			->will($this->returnValue([]));
109 109
 
110
-		$this->assertEquals( [], $this->object->getItems( [-1] ) );
110
+		$this->assertEquals([], $this->object->getItems([-1]));
111 111
 	}
112 112
 
113 113
 
114 114
 	public function testSearchItems()
115 115
 	{
116
-		$search = \Aimeos\MShop\Factory::createManager( $this->context, 'index' )->createSearch();
116
+		$search = \Aimeos\MShop\Factory::createManager($this->context, 'index')->createSearch();
117 117
 
118
-		$this->stub->expects( $this->once() )->method( 'searchItems' )
119
-			->will( $this->returnValue( [] ) );
118
+		$this->stub->expects($this->once())->method('searchItems')
119
+			->will($this->returnValue([]));
120 120
 
121
-		$this->assertEquals( [], $this->object->searchItems( $search ) );
121
+		$this->assertEquals([], $this->object->searchItems($search));
122 122
 	}
123 123
 
124 124
 
125 125
 	public function testGetContext()
126 126
 	{
127
-		$result = $this->access( 'getContext' )->invokeArgs( $this->object, [] );
127
+		$result = $this->access('getContext')->invokeArgs($this->object, []);
128 128
 
129
-		$this->assertInstanceOf( '\Aimeos\MShop\Context\Item\Iface', $result );
129
+		$this->assertInstanceOf('\Aimeos\MShop\Context\Item\Iface', $result);
130 130
 	}
131 131
 
132 132
 
133
-	protected function access( $name )
133
+	protected function access($name)
134 134
 	{
135
-		$class = new \ReflectionClass( '\Aimeos\Controller\Frontend\Product\Decorator\Base' );
136
-		$method = $class->getMethod( $name );
137
-		$method->setAccessible( true );
135
+		$class = new \ReflectionClass('\Aimeos\Controller\Frontend\Product\Decorator\Base');
136
+		$method = $class->getMethod($name);
137
+		$method->setAccessible(true);
138 138
 
139 139
 		return $method;
140 140
 	}
Please login to merge, or discard this patch.