Passed
Push — 2018.10 ( 27b425...540ebf )
by Aimeos
02:32
created
lib/custom/tests/MShop/Customer/Manager/Lists/Typo3Test.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	public function testGetItem()
55 55
 	{
56 56
 		$search = $this->object->createSearch();
57
-		$search->setSlice(0, 1);
57
+		$search->setSlice( 0, 1 );
58 58
 		$results = $this->object->searchItems( $search );
59 59
 
60 60
 		if( ( $item = reset( $results ) ) === false ) {
@@ -68,14 +68,14 @@  discard block
 block discarded – undo
68 68
 	public function testSaveUpdateDeleteItem()
69 69
 	{
70 70
 		$search = $this->object->createSearch();
71
-		$search->setSlice(0, 1);
71
+		$search->setSlice( 0, 1 );
72 72
 		$items = $this->object->searchItems( $search );
73 73
 
74 74
 		if( ( $item = reset( $items ) ) === false ) {
75 75
 			throw new \RuntimeException( 'No item found' );
76 76
 		}
77 77
 
78
-		$item->setId(null);
78
+		$item->setId( null );
79 79
 		$item->setDomain( 'unittest' );
80 80
 		$resultSaved = $this->object->saveItem( $item );
81 81
 		$itemSaved = $this->object->getItem( $item->getId() );
@@ -100,12 +100,12 @@  discard block
 block discarded – undo
100 100
 		$this->assertEquals( $item->getDateEnd(), $itemSaved->getDateEnd() );
101 101
 		$this->assertEquals( $item->getPosition(), $itemSaved->getPosition() );
102 102
 		$this->assertEquals( $this->editor, $itemSaved->getEditor() );
103
-		$this->assertStringStartsWith(date('Y-m-d', time()), $itemSaved->getTimeCreated());
104
-		$this->assertStringStartsWith(date('Y-m-d', time()), $itemSaved->getTimeModified());
103
+		$this->assertStringStartsWith( date( 'Y-m-d', time() ), $itemSaved->getTimeCreated() );
104
+		$this->assertStringStartsWith( date( 'Y-m-d', time() ), $itemSaved->getTimeModified() );
105 105
 
106 106
 		$this->assertEquals( $this->editor, $itemSaved->getEditor() );
107 107
 		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated() );
108
-		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified() );
108
+		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified() );
109 109
 
110 110
 		$this->assertTrue( $itemUpd->getType() !== null );
111 111
 		$this->assertEquals( $itemExp->getId(), $itemUpd->getId() );
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 		$this->assertInstanceOf( '\Aimeos\MShop\Common\Item\Iface', $resultSaved );
126 126
 		$this->assertInstanceOf( '\Aimeos\MShop\Common\Item\Iface', $resultUpd );
127 127
 
128
-		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
128
+		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
129 129
 		$this->object->getItem( $itemSaved->getId() );
130 130
 	}
131 131
 
@@ -252,12 +252,12 @@  discard block
 block discarded – undo
252 252
 		$expr[] = $search->compare( '==', 'customer.lists.type.editor', $this->editor );
253 253
 
254 254
 		$search->setConditions( $search->combine( '&&', $expr ) );
255
-		$search->setSlice(0, 1);
255
+		$search->setSlice( 0, 1 );
256 256
 		$results = $this->object->searchItems( $search, [], $total );
257 257
 		$this->assertEquals( 1, count( $results ) );
258 258
 		$this->assertEquals( 2, $total );
259 259
 
260
-		foreach($results as $itemId => $item) {
260
+		foreach( $results as $itemId => $item ) {
261 261
 			$this->assertEquals( $itemId, $item->getId() );
262 262
 		}
263 263
 	}
@@ -267,29 +267,29 @@  discard block
 block discarded – undo
267 267
 	{
268 268
 		$search = $this->object->createSearch();
269 269
 		$search->setConditions( $search->compare( '==', 'customer.lists.editor', $this->editor ) );
270
-		$this->assertEquals( 4, count( $this->object->searchItems($search) ) );
270
+		$this->assertEquals( 4, count( $this->object->searchItems( $search ) ) );
271 271
 	}
272 272
 
273 273
 
274 274
 	public function testSearchItemsBaseCriteria()
275 275
 	{
276
-		$search = $this->object->createSearch(true);
276
+		$search = $this->object->createSearch( true );
277 277
 		$conditions = array(
278 278
 			$search->compare( '==', 'customer.lists.editor', $this->editor ),
279 279
 			$search->getConditions()
280 280
 		);
281 281
 		$search->setConditions( $search->combine( '&&', $conditions ) );
282
-		$this->assertEquals( 4, count( $this->object->searchItems($search) ) );
282
+		$this->assertEquals( 4, count( $this->object->searchItems( $search ) ) );
283 283
 	}
284 284
 
285 285
 
286 286
 	public function testGetSubManager()
287 287
 	{
288
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type') );
289
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Typo3') );
288
+		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager( 'type' ) );
289
+		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager( 'type', 'Typo3' ) );
290 290
 
291
-		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
292
-		$this->object->getSubManager('unknown');
291
+		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
292
+		$this->object->getSubManager( 'unknown' );
293 293
 	}
294 294
 
295 295
 
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Lists/Type/Typo3Test.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
 	public function testGetItem()
44 44
 	{
45 45
 		$search = $this->object->createSearch();
46
-		$search->setSlice(0, 1);
47
-		$results = $this->object->searchItems($search);
46
+		$search->setSlice( 0, 1 );
47
+		$results = $this->object->searchItems( $search );
48 48
 
49
-		if( ( $expected = reset($results) ) === false ) {
49
+		if( ( $expected = reset( $results ) ) === false ) {
50 50
 			throw new \RuntimeException( 'No list type item found' );
51 51
 		}
52 52
 
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
 	public function testSaveUpdateDeleteItem()
58 58
 	{
59 59
 		$search = $this->object->createSearch();
60
-		$search->setSlice(0, 1);
61
-		$results = $this->object->searchItems($search);
60
+		$search->setSlice( 0, 1 );
61
+		$results = $this->object->searchItems( $search );
62 62
 
63
-		if( ( $item = reset($results) ) === false ) {
63
+		if( ( $item = reset( $results ) ) === false ) {
64 64
 			throw new \RuntimeException( 'No type item found' );
65 65
 		}
66 66
 
67
-		$item->setId(null);
67
+		$item->setId( null );
68 68
 		$item->setCode( 'unitTestInit' );
69 69
 		$resultSaved = $this->object->saveItem( $item );
70 70
 		$itemSaved = $this->object->getItem( $item->getId() );
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 		$this->assertInstanceOf( '\Aimeos\MShop\Common\Item\Iface', $resultSaved );
104 104
 		$this->assertInstanceOf( '\Aimeos\MShop\Common\Item\Iface', $resultUpd );
105 105
 
106
-		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
106
+		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
107 107
 		$this->object->getItem( $itemSaved->getId() );
108 108
 	}
109 109
 
@@ -126,13 +126,13 @@  discard block
 block discarded – undo
126 126
 		$expr[] = $search->compare( '==', 'customer.lists.type.editor', $this->editor );
127 127
 
128 128
 		$search->setConditions( $search->combine( '&&', $expr ) );
129
-		$search->setSlice(0, 1);
129
+		$search->setSlice( 0, 1 );
130 130
 
131 131
 		$results = $this->object->searchItems( $search, [], $total );
132 132
 		$this->assertEquals( 1, count( $results ) );
133 133
 		$this->assertEquals( 1, $total );
134 134
 
135
-		foreach($results as $itemId => $item) {
135
+		foreach( $results as $itemId => $item ) {
136 136
 			$this->assertEquals( $itemId, $item->getId() );
137 137
 		}
138 138
 	}
Please login to merge, or discard this patch.
lib/custom/src/MW/Cache/Typo3.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@
 block discarded – undo
166 166
 			foreach( $this->object->getByTag( $this->prefix . $tag ) as $key => $value )
167 167
 			{
168 168
 				if( strncmp( $key, $this->prefix, $len ) === 0 ) {
169
-					$result[ substr( $key, $len ) ] = $value;
169
+					$result[substr( $key, $len )] = $value;
170 170
 				} else {
171 171
 					$result[$key] = $value;
172 172
 				}
Please login to merge, or discard this patch.
lib/custom/src/MShop/Customer/Item/Typo3.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 	 */
37 37
 	public function __construct( \Aimeos\MShop\Common\Item\Address\Iface $address,
38 38
 		array $values = [], array $listItems = [], array $refItems = [], $salt = null,
39
-		\Aimeos\MShop\Common\Item\Helper\Password\Iface $helper = null, array $addresses = [], array $propItems = [])
39
+		\Aimeos\MShop\Common\Item\Helper\Password\Iface $helper = null, array $addresses = [], array $propItems = [] )
40 40
 	{
41 41
 		parent::__construct( $address, $values, $listItems, $refItems, $salt, $helper, $addresses, $propItems );
42 42
 
Please login to merge, or discard this patch.
lib/custom/setup/default/schema/customer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 return array(
10 10
 	'table' => array(
11 11
 
12
-		'fe_users_address' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
12
+		'fe_users_address' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
13 13
 
14 14
 			$table = $schema->createTable( 'fe_users_address' );
15 15
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 			$table->addColumn( 'pos', 'smallint', [] );
41 41
 			$table->addColumn( 'mtime', 'datetime', [] );
42 42
 			$table->addColumn( 'ctime', 'datetime', [] );
43
-			$table->addColumn( 'editor', 'string', array('length' => 255 ) );
43
+			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
44 44
 
45 45
 			$table->setPrimaryKey( array( 'id' ), 'pk_t3feuad_id' );
46 46
 			$table->addIndex( array( 'parentid' ), 'idx_t3feuad_pid' );
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 			return $schema;
55 55
 		},
56 56
 
57
-		'fe_users_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
57
+		'fe_users_list_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
58 58
 
59 59
 			$table = $schema->createTable( 'fe_users_list_type' );
60 60
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 			return $schema;
79 79
 		},
80 80
 
81
-		'fe_users_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
81
+		'fe_users_list' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
82 82
 
83 83
 			$table = $schema->createTable( 'fe_users_list' );
84 84
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 			return $schema;
112 112
 		},
113 113
 
114
-		'fe_users_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
114
+		'fe_users_property_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
115 115
 
116 116
 			$table = $schema->createTable( 'fe_users_property_type' );
117 117
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 			return $schema;
136 136
 		},
137 137
 
138
-		'fe_users_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
138
+		'fe_users_property' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
139 139
 
140 140
 			$table = $schema->createTable( 'fe_users_property' );
141 141
 
Please login to merge, or discard this patch.
lib/custom/setup/unittest/data/customer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * @copyright Aimeos (aimeos.org), 2014-2018
7 7
  */
8 8
 
9
-return array (
9
+return array(
10 10
 	'customer/address' => array(
11 11
 		array( 'parentid' => 'customer/UTC001', 'company' => 'ABC', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr', 'firstname' => 'Our', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'longitude' => '10.0', 'latitude' => '50.0', 'flag' => 0, 'pos' => '0' ),
12 12
 		array( 'parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'longitude' => '10.5', 'latitude' => '51.0', 'flag' => 0, 'pos' => '1' ),
Please login to merge, or discard this patch.
lib/custom/setup/unittest/data/customer-list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
  * @copyright Aimeos (aimeos.org), 2014-2018
7 7
  */
8 8
 
9
-return array (
10
-	'customer/lists/type' => array (
9
+return array(
10
+	'customer/lists/type' => array(
11 11
 		'customer/group/default' => array( 'domain' => 'customer/group', 'code' => 'default', 'label' => 'Standard', 'status' => 1 ),
12 12
 		'order/download' => array( 'domain' => 'order', 'code' => 'download', 'label' => 'Download', 'status' => 1 ),
13 13
 		'product/favorite' => array( 'domain' => 'product', 'code' => 'favorite', 'label' => 'Favorite', 'status' => 1 ),
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 		'text/default' => array( 'domain' => 'text', 'code' => 'default', 'label' => 'Standard', 'status' => 1 ),
16 16
 	),
17 17
 
18
-	'customer/lists' => array (
18
+	'customer/lists' => array(
19 19
 		array( 'parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/information', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 1, 'status' => 1 ),
20 20
 		array( 'parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/notify', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 2, 'status' => 1 ),
21 21
 		array( 'parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/newsletter', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 3, 'status' => 1 ),
Please login to merge, or discard this patch.