Completed
Push — master ( 0bf26f...6d8b68 )
by Aimeos
02:09
created
admin/jsonadm/tests/bootstrap.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@
 block discarded – undo
7 7
 
8 8
 
9 9
 error_reporting( -1 );
10
-ini_set( 'display_errors', '1' );
10
+ini_set('display_errors', '1');
11 11
 
12
-date_default_timezone_set( 'UTC' );
12
+date_default_timezone_set('UTC');
13 13
 
14 14
 // Set locale settings to reasonable defaults
15
-setlocale( LC_ALL, 'en_US.UTF-8' );
16
-setlocale( LC_NUMERIC, 'POSIX' );
17
-setlocale( LC_CTYPE, 'en_US.UTF-8' );
18
-setlocale( LC_TIME, 'POSIX' );
15
+setlocale(LC_ALL, 'en_US.UTF-8');
16
+setlocale(LC_NUMERIC, 'POSIX');
17
+setlocale(LC_CTYPE, 'en_US.UTF-8');
18
+setlocale(LC_TIME, 'POSIX');
19 19
 
20 20
 require_once 'TestHelperJadm.php';
21 21
 \TestHelperJadm::bootstrap();
Please login to merge, or discard this patch.
admin/jsonadm/src/Admin/JsonAdm/Text/Standard.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -107,17 +107,17 @@
 block discarded – undo
107 107
 	 * @param array $include List of resource types that should be fetched
108 108
 	 * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface
109 109
 	 */
110
-	protected function getListItems( array $items, array $include )
110
+	protected function getListItems(array $items, array $include)
111 111
 	{
112
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'text/lists' );
112
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'text/lists');
113 113
 
114 114
 		$search = $manager->createSearch();
115 115
 		$expr = array(
116
-			$search->compare( '==', 'text.lists.parentid', array_keys( $items ) ),
117
-			$search->compare( '==', 'text.lists.domain', $include ),
116
+			$search->compare('==', 'text.lists.parentid', array_keys($items)),
117
+			$search->compare('==', 'text.lists.domain', $include),
118 118
 		);
119
-		$search->setConditions( $search->combine( '&&', $expr ) );
119
+		$search->setConditions($search->combine('&&', $expr));
120 120
 
121
-		return $manager->searchItems( $search );
121
+		return $manager->searchItems($search);
122 122
 	}
123 123
 }
Please login to merge, or discard this patch.
admin/jsonadm/src/Admin/JsonAdm/Price/Standard.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -107,17 +107,17 @@
 block discarded – undo
107 107
 	 * @param array $include List of resource types that should be fetched
108 108
 	 * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface
109 109
 	 */
110
-	protected function getListItems( array $items, array $include )
110
+	protected function getListItems(array $items, array $include)
111 111
 	{
112
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'price/lists' );
112
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'price/lists');
113 113
 
114 114
 		$search = $manager->createSearch();
115 115
 		$expr = array(
116
-			$search->compare( '==', 'price.lists.parentid', array_keys( $items ) ),
117
-			$search->compare( '==', 'price.lists.domain', $include ),
116
+			$search->compare('==', 'price.lists.parentid', array_keys($items)),
117
+			$search->compare('==', 'price.lists.domain', $include),
118 118
 		);
119
-		$search->setConditions( $search->combine( '&&', $expr ) );
119
+		$search->setConditions($search->combine('&&', $expr));
120 120
 
121
-		return $manager->searchItems( $search );
121
+		return $manager->searchItems($search);
122 122
 	}
123 123
 }
Please login to merge, or discard this patch.
admin/jsonadm/src/Admin/JsonAdm/Attribute/Standard.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -107,17 +107,17 @@
 block discarded – undo
107 107
 	 * @param array $include List of resource types that should be fetched
108 108
 	 * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface
109 109
 	 */
110
-	protected function getListItems( array $items, array $include )
110
+	protected function getListItems(array $items, array $include)
111 111
 	{
112
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'attribute/lists' );
112
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'attribute/lists');
113 113
 
114 114
 		$search = $manager->createSearch();
115 115
 		$expr = array(
116
-			$search->compare( '==', 'attribute.lists.parentid', array_keys( $items ) ),
117
-			$search->compare( '==', 'attribute.lists.domain', $include ),
116
+			$search->compare('==', 'attribute.lists.parentid', array_keys($items)),
117
+			$search->compare('==', 'attribute.lists.domain', $include),
118 118
 		);
119
-		$search->setConditions( $search->combine( '&&', $expr ) );
119
+		$search->setConditions($search->combine('&&', $expr));
120 120
 
121
-		return $manager->searchItems( $search );
121
+		return $manager->searchItems($search);
122 122
 	}
123 123
 }
Please login to merge, or discard this patch.
admin/jsonadm/src/Admin/JsonAdm/Service/Standard.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -107,17 +107,17 @@
 block discarded – undo
107 107
 	 * @param array $include List of resource types that should be fetched
108 108
 	 * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface
109 109
 	 */
110
-	protected function getListItems( array $items, array $include )
110
+	protected function getListItems(array $items, array $include)
111 111
 	{
112
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'service/lists' );
112
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'service/lists');
113 113
 
114 114
 		$search = $manager->createSearch();
115 115
 		$expr = array(
116
-			$search->compare( '==', 'service.lists.parentid', array_keys( $items ) ),
117
-			$search->compare( '==', 'service.lists.domain', $include ),
116
+			$search->compare('==', 'service.lists.parentid', array_keys($items)),
117
+			$search->compare('==', 'service.lists.domain', $include),
118 118
 		);
119
-		$search->setConditions( $search->combine( '&&', $expr ) );
119
+		$search->setConditions($search->combine('&&', $expr));
120 120
 
121
-		return $manager->searchItems( $search );
121
+		return $manager->searchItems($search);
122 122
 	}
123 123
 }
Please login to merge, or discard this patch.
admin/jsonadm/src/Admin/JsonAdm/Media/Standard.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -107,17 +107,17 @@
 block discarded – undo
107 107
 	 * @param array $include List of resource types that should be fetched
108 108
 	 * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface
109 109
 	 */
110
-	protected function getListItems( array $items, array $include )
110
+	protected function getListItems(array $items, array $include)
111 111
 	{
112
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'media/lists' );
112
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'media/lists');
113 113
 
114 114
 		$search = $manager->createSearch();
115 115
 		$expr = array(
116
-			$search->compare( '==', 'media.lists.parentid', array_keys( $items ) ),
117
-			$search->compare( '==', 'media.lists.domain', $include ),
116
+			$search->compare('==', 'media.lists.parentid', array_keys($items)),
117
+			$search->compare('==', 'media.lists.domain', $include),
118 118
 		);
119
-		$search->setConditions( $search->combine( '&&', $expr ) );
119
+		$search->setConditions($search->combine('&&', $expr));
120 120
 
121
-		return $manager->searchItems( $search );
121
+		return $manager->searchItems($search);
122 122
 	}
123 123
 }
Please login to merge, or discard this patch.
admin/jsonadm/tests/Admin/JsonAdm/Common/Decorator/BaseTest.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -21,88 +21,88 @@
 block discarded – undo
21 21
 		$context = \TestHelperJadm::getContext();
22 22
 		$this->view = $context->getView();
23 23
 
24
-		$this->stub = $this->getMockBuilder( '\\Aimeos\\Admin\\JsonAdm\\Standard' )
25
-			->setConstructorArgs( array( $context, $this->view, [], 'attribute' ) )
24
+		$this->stub = $this->getMockBuilder('\\Aimeos\\Admin\\JsonAdm\\Standard')
25
+			->setConstructorArgs(array($context, $this->view, [], 'attribute'))
26 26
 			->getMock();
27 27
 
28
-		$this->object = $this->getMockBuilder( '\\Aimeos\\Admin\\JsonAdm\\Common\\Decorator\Base' )
29
-			->setConstructorArgs( [$this->stub, $context, $this->view, [], ''] )
28
+		$this->object = $this->getMockBuilder('\\Aimeos\\Admin\\JsonAdm\\Common\\Decorator\Base')
29
+			->setConstructorArgs([$this->stub, $context, $this->view, [], ''])
30 30
 			->getMockForAbstractClass();
31 31
 	}
32 32
 
33 33
 
34 34
 	protected function tearDown()
35 35
 	{
36
-		unset( $this->object, $this->stub, $this->view );
36
+		unset($this->object, $this->stub, $this->view);
37 37
 	}
38 38
 
39 39
 
40 40
 	public function testDelete()
41 41
 	{
42
-		$this->stub->expects( $this->once() )->method( 'delete' )->will( $this->returnArgument( 1 ) );
42
+		$this->stub->expects($this->once())->method('delete')->will($this->returnArgument(1));
43 43
 		$response = $this->view->response();
44 44
 
45
-		$this->assertSame( $response, $this->object->delete( $this->view->request(), $response ) );
45
+		$this->assertSame($response, $this->object->delete($this->view->request(), $response));
46 46
 	}
47 47
 
48 48
 
49 49
 	public function testGet()
50 50
 	{
51
-		$this->stub->expects( $this->once() )->method( 'get' )->will( $this->returnArgument( 1 ) );
51
+		$this->stub->expects($this->once())->method('get')->will($this->returnArgument(1));
52 52
 		$response = $this->view->response();
53 53
 
54
-		$this->assertSame( $response, $this->object->get( $this->view->request(), $response ) );
54
+		$this->assertSame($response, $this->object->get($this->view->request(), $response));
55 55
 	}
56 56
 
57 57
 
58 58
 	public function testPatch()
59 59
 	{
60
-		$this->stub->expects( $this->once() )->method( 'patch' )->will( $this->returnArgument( 1 ) );
60
+		$this->stub->expects($this->once())->method('patch')->will($this->returnArgument(1));
61 61
 		$response = $this->view->response();
62 62
 
63
-		$this->assertSame( $response, $this->object->patch( $this->view->request(), $response ) );
63
+		$this->assertSame($response, $this->object->patch($this->view->request(), $response));
64 64
 	}
65 65
 
66 66
 
67 67
 	public function testPost()
68 68
 	{
69
-		$this->stub->expects( $this->once() )->method( 'post' )->will( $this->returnArgument( 1 ) );
69
+		$this->stub->expects($this->once())->method('post')->will($this->returnArgument(1));
70 70
 		$response = $this->view->response();
71 71
 
72
-		$this->assertSame( $response, $this->object->post( $this->view->request(), $response ) );
72
+		$this->assertSame($response, $this->object->post($this->view->request(), $response));
73 73
 	}
74 74
 
75 75
 
76 76
 	public function testPut()
77 77
 	{
78
-		$this->stub->expects( $this->once() )->method( 'put' )->will( $this->returnArgument( 1 ) );
78
+		$this->stub->expects($this->once())->method('put')->will($this->returnArgument(1));
79 79
 		$response = $this->view->response();
80 80
 
81
-		$this->assertSame( $response, $this->object->put( $this->view->request(), $response ) );
81
+		$this->assertSame($response, $this->object->put($this->view->request(), $response));
82 82
 	}
83 83
 
84 84
 
85 85
 	public function testOptions()
86 86
 	{
87
-		$this->stub->expects( $this->once() )->method( 'options' )->will( $this->returnArgument( 1 ) );
87
+		$this->stub->expects($this->once())->method('options')->will($this->returnArgument(1));
88 88
 		$response = $this->view->response();
89 89
 
90
-		$this->assertSame( $response, $this->object->options( $this->view->request(), $response ) );
90
+		$this->assertSame($response, $this->object->options($this->view->request(), $response));
91 91
 	}
92 92
 
93 93
 
94 94
 	public function testGetClient()
95 95
 	{
96
-		$result = $this->access( 'getClient' )->invokeArgs( $this->object, [] );
97
-		$this->assertSame( $this->stub, $result );
96
+		$result = $this->access('getClient')->invokeArgs($this->object, []);
97
+		$this->assertSame($this->stub, $result);
98 98
 	}
99 99
 
100 100
 
101
-	protected function access( $name )
101
+	protected function access($name)
102 102
 	{
103
-		$class = new \ReflectionClass( '\Aimeos\Admin\JsonAdm\Common\Decorator\Base' );
104
-		$method = $class->getMethod( $name );
105
-		$method->setAccessible( true );
103
+		$class = new \ReflectionClass('\Aimeos\Admin\JsonAdm\Common\Decorator\Base');
104
+		$method = $class->getMethod($name);
105
+		$method->setAccessible(true);
106 106
 
107 107
 		return $method;
108 108
 	}
Please login to merge, or discard this patch.
admin/jsonadm/src/Admin/JsonAdm/Product/Standard.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -107,20 +107,20 @@  discard block
 block discarded – undo
107 107
 	 * @param array $include List of resource types that should be fetched
108 108
 	 * @return array List of items implementing \Aimeos\MShop\Common\Item\Iface
109 109
 	 */
110
-	protected function getChildItems( array $items, array $include )
110
+	protected function getChildItems(array $items, array $include)
111 111
 	{
112 112
 		$list = [];
113
-		$prodIds = array_keys( $items );
114
-		$include = array_intersect( $include, array( 'product/property' ) );
113
+		$prodIds = array_keys($items);
114
+		$include = array_intersect($include, array('product/property'));
115 115
 
116
-		foreach( $include as $type )
116
+		foreach ($include as $type)
117 117
 		{
118
-			$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), $type );
118
+			$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), $type);
119 119
 
120 120
 			$search = $manager->createSearch();
121
-			$search->setConditions( $search->compare( '==', str_replace( '/', '.', $type ) . '.parentid', $prodIds ) );
121
+			$search->setConditions($search->compare('==', str_replace('/', '.', $type) . '.parentid', $prodIds));
122 122
 
123
-			$list = array_merge( $list, $manager->searchItems( $search ) );
123
+			$list = array_merge($list, $manager->searchItems($search));
124 124
 		}
125 125
 
126 126
 		return $list;
@@ -134,17 +134,17 @@  discard block
 block discarded – undo
134 134
 	 * @param array $include List of resource types that should be fetched
135 135
 	 * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface
136 136
 	 */
137
-	protected function getListItems( array $items, array $include )
137
+	protected function getListItems(array $items, array $include)
138 138
 	{
139
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'product/lists' );
139
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'product/lists');
140 140
 
141 141
 		$search = $manager->createSearch();
142 142
 		$expr = array(
143
-			$search->compare( '==', 'product.lists.parentid', array_keys( $items ) ),
144
-			$search->compare( '==', 'product.lists.domain', $include ),
143
+			$search->compare('==', 'product.lists.parentid', array_keys($items)),
144
+			$search->compare('==', 'product.lists.domain', $include),
145 145
 		);
146
-		$search->setConditions( $search->combine( '&&', $expr ) );
146
+		$search->setConditions($search->combine('&&', $expr));
147 147
 
148
-		return $manager->searchItems( $search );
148
+		return $manager->searchItems($search);
149 149
 	}
150 150
 }
Please login to merge, or discard this patch.
admin/jsonadm/src/Admin/JsonAdm/Customer/Standard.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -107,20 +107,20 @@  discard block
 block discarded – undo
107 107
 	 * @param array $include List of resource types that should be fetched
108 108
 	 * @return array List of items implementing \Aimeos\MShop\Common\Item\Iface
109 109
 	 */
110
-	protected function getChildItems( array $items, array $include )
110
+	protected function getChildItems(array $items, array $include)
111 111
 	{
112 112
 		$list = [];
113
-		$refIds = array_keys( $items );
114
-		$include = array_intersect( $include, array( 'customer/address' ) );
113
+		$refIds = array_keys($items);
114
+		$include = array_intersect($include, array('customer/address'));
115 115
 
116
-		foreach( $include as $type )
116
+		foreach ($include as $type)
117 117
 		{
118
-			$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), $type );
118
+			$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), $type);
119 119
 
120 120
 			$search = $manager->createSearch();
121
-			$search->setConditions( $search->compare( '==', str_replace( '/', '.', $type ) . '.parentid', $refIds ) );
121
+			$search->setConditions($search->compare('==', str_replace('/', '.', $type) . '.parentid', $refIds));
122 122
 
123
-			$list = array_merge( $list, $manager->searchItems( $search ) );
123
+			$list = array_merge($list, $manager->searchItems($search));
124 124
 		}
125 125
 
126 126
 		return $list;
@@ -134,17 +134,17 @@  discard block
 block discarded – undo
134 134
 	 * @param array $include List of resource types that should be fetched
135 135
 	 * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface
136 136
 	 */
137
-	protected function getListItems( array $items, array $include )
137
+	protected function getListItems(array $items, array $include)
138 138
 	{
139
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'customer/lists' );
139
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'customer/lists');
140 140
 
141 141
 		$search = $manager->createSearch();
142 142
 		$expr = array(
143
-			$search->compare( '==', 'customer.lists.parentid', array_keys( $items ) ),
144
-			$search->compare( '==', 'customer.lists.domain', $include ),
143
+			$search->compare('==', 'customer.lists.parentid', array_keys($items)),
144
+			$search->compare('==', 'customer.lists.domain', $include),
145 145
 		);
146
-		$search->setConditions( $search->combine( '&&', $expr ) );
146
+		$search->setConditions($search->combine('&&', $expr));
147 147
 
148
-		return $manager->searchItems( $search );
148
+		return $manager->searchItems($search);
149 149
 	}
150 150
 }
Please login to merge, or discard this patch.