Passed
Push — master ( c96436...55b833 )
by Aimeos
11:29 queued 44s
created
lib/custom/setup/CustomerRemoveSignedConstraints.php 1 patch
Braces   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -44,9 +44,12 @@  discard block
 block discarded – undo
44 44
 		$schema = $this->getSchema( 'db-customer' );
45 45
 		$sql = 'SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = \'users\' AND COLUMN_NAME = \'id\'';
46 46
 
47
-		try {
47
+		try
48
+		{
48 49
 			$type = $this->getValue( $sql, 'COLUMN_TYPE', 'db-customer' );
49
-		} catch( \Aimeos\MW\Setup\Exception $e ) {
50
+		}
51
+		catch( \Aimeos\MW\Setup\Exception $e )
52
+		{
50 53
 			$type = null;
51 54
 		}
52 55
 
@@ -62,8 +65,7 @@  discard block
 block discarded – undo
62 65
 			{
63 66
 				$this->execute( 'ALTER TABLE "users_address" DROP FOREIGN KEY "fk_lvuad_pid"', 'db-customer' );
64 67
 				$this->status( 'done' );
65
-			}
66
-			else
68
+			} else
67 69
 			{
68 70
 				$this->status( 'OK' );
69 71
 			}
@@ -75,8 +77,7 @@  discard block
 block discarded – undo
75 77
 			{
76 78
 				$this->execute( 'ALTER TABLE "users_list" DROP FOREIGN KEY "fk_lvuli_pid"', 'db-customer' );
77 79
 				$this->status( 'done' );
78
-			}
79
-			else
80
+			} else
80 81
 			{
81 82
 				$this->status( 'OK' );
82 83
 			}
@@ -88,8 +89,7 @@  discard block
 block discarded – undo
88 89
 			{
89 90
 				$this->execute( 'ALTER TABLE "users_property" DROP FOREIGN KEY "fk_lvupr_pid"', 'db-customer' );
90 91
 				$this->status( 'done' );
91
-			}
92
-			else
92
+			} else
93 93
 			{
94 94
 				$this->status( 'OK' );
95 95
 			}
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Lists/LaravelTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	public function testGetItem()
64 64
 	{
65 65
 		$search = $this->object->createSearch();
66
-		$search->setSlice(0, 1);
66
+		$search->setSlice( 0, 1 );
67 67
 		$results = $this->object->searchItems( $search );
68 68
 
69 69
 		if( ( $item = reset( $results ) ) === false ) {
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	public function testSaveUpdateDeleteItem()
78 78
 	{
79 79
 		$search = $this->object->createSearch();
80
-		$search->setSlice(0, 1);
80
+		$search->setSlice( 0, 1 );
81 81
 		$items = $this->object->searchItems( $search );
82 82
 
83 83
 		if( ( $item = reset( $items ) ) === false ) {
@@ -108,12 +108,12 @@  discard block
 block discarded – undo
108 108
 		$this->assertEquals( $item->getDateEnd(), $itemSaved->getDateEnd() );
109 109
 		$this->assertEquals( $item->getPosition(), $itemSaved->getPosition() );
110 110
 		$this->assertEquals( $this->editor, $itemSaved->getEditor() );
111
-		$this->assertStringStartsWith(date('Y-m-d', time()), $itemSaved->getTimeCreated());
112
-		$this->assertStringStartsWith(date('Y-m-d', time()), $itemSaved->getTimeModified());
111
+		$this->assertStringStartsWith( date( 'Y-m-d', time() ), $itemSaved->getTimeCreated() );
112
+		$this->assertStringStartsWith( date( 'Y-m-d', time() ), $itemSaved->getTimeModified() );
113 113
 
114 114
 		$this->assertEquals( $this->editor, $itemSaved->getEditor() );
115 115
 		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated() );
116
-		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified() );
116
+		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified() );
117 117
 
118 118
 		$this->assertEquals( $itemExp->getId(), $itemUpd->getId() );
119 119
 		$this->assertEquals( $itemExp->getSiteId(), $itemUpd->getSiteId() );
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 		$this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultSaved );
133 133
 		$this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultUpd );
134 134
 
135
-		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
135
+		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
136 136
 		$this->object->getItem( $itemSaved->getId() );
137 137
 	}
138 138
 
@@ -278,8 +278,8 @@  discard block
 block discarded – undo
278 278
 
279 279
 	public function testGetSubManager()
280 280
 	{
281
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type') );
282
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Standard') );
281
+		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager( 'type' ) );
282
+		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager( 'type', 'Standard' ) );
283 283
 
284 284
 		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
285 285
 		$this->object->getSubManager( 'unknown' );
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
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
 				'customer.address.telefax' => '055544332212', 'customer.address.website' => 'www.example.com',
76 76
 				'customer.address.longitude' => '10.5', 'customer.address.latitude' => '51.0',
77 77
 				'customer.address.position' => '0',
78
-			],[
78
+			], [
79 79
 				'customer.address.company' => 'Example company LLC', 'customer.address.vatid' => 'DE999999999',
80 80
 				'customer.address.salutation' => 'mr', 'customer.address.title' => 'Dr.',
81 81
 				'customer.address.firstname' => 'Good', 'customer.address.lastname' => 'Unittest',
Please login to merge, or discard this patch.
lib/custom/setup/CustomerRemoveLostUserDataLaravel.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
 			{
59 59
 				$this->execute( $stmt );
60 60
 				$this->status( 'done' );
61
-			}
62
-			else
61
+			} else
63 62
 			{
64 63
 				$this->status( 'OK' );
65 64
 			}
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/LaravelTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -216,13 +216,13 @@
 block discarded – undo
216 216
 		$expr[] = $search->compare( '==', 'customer.longitude', '10.0' );
217 217
 		$expr[] = $search->compare( '==', 'customer.latitude', '50.0' );
218 218
 
219
-		$param = ['text','default', 0];
219
+		$param = ['text', 'default', 0];
220 220
 		$expr[] = $search->compare( '==', $search->createFunction( 'customer:has', $param ), null );
221 221
 
222
-		$param = ['text','default', $listItem->getRefId()];
222
+		$param = ['text', 'default', $listItem->getRefId()];
223 223
 		$expr[] = $search->compare( '!=', $search->createFunction( 'customer:has', $param ), null );
224 224
 
225
-		$param = ['text','default'];
225
+		$param = ['text', 'default'];
226 226
 		$expr[] = $search->compare( '!=', $search->createFunction( 'customer:has', $param ), null );
227 227
 
228 228
 		$param = ['text'];
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Property/Type/LaravelTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 	protected function tearDown()
29 29
 	{
30
-		unset($this->object);
30
+		unset( $this->object );
31 31
 	}
32 32
 
33 33
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
 		$results = $this->object->searchItems( $search );
72 72
 
73
-		if( ($expected = reset($results) ) === false )
73
+		if( ( $expected = reset( $results ) ) === false )
74 74
 		{
75 75
 			throw new \RuntimeException( 'No property type item found.' );
76 76
 		}
@@ -92,13 +92,13 @@  discard block
 block discarded – undo
92 92
 	{
93 93
 		$search = $this->object->createSearch();
94 94
 		$search->setConditions( $search->compare( '==', 'customer.property.type.editor', $this->editor ) );
95
-		$results = $this->object->searchItems($search);
95
+		$results = $this->object->searchItems( $search );
96 96
 
97
-		if( ( $item = reset($results) ) === false ) {
97
+		if( ( $item = reset( $results ) ) === false ) {
98 98
 			throw new \RuntimeException( 'No type item found' );
99 99
 		}
100 100
 
101
-		$item->setId(null);
101
+		$item->setId( null );
102 102
 		$item->setCode( 'unitTestSave' );
103 103
 		$resultSaved = $this->object->saveItem( $item );
104 104
 		$itemSaved = $this->object->getItem( $item->getId() );
@@ -159,19 +159,19 @@  discard block
 block discarded – undo
159 159
 		$expr[] = $search->compare( '>=', 'customer.property.type.ctime', '1970-01-01 00:00:00' );
160 160
 		$expr[] = $search->compare( '==', 'customer.property.type.editor', $this->editor );
161 161
 
162
-		$search->setConditions( $search->combine('&&', $expr) );
162
+		$search->setConditions( $search->combine( '&&', $expr ) );
163 163
 		$results = $this->object->searchItems( $search, [], $total );
164 164
 		$this->assertEquals( 1, count( $results ) );
165 165
 
166 166
 
167 167
 		$search = $this->object->createSearch();
168 168
 		$conditions = array(
169
-			$search->compare( '=~', 'customer.property.type.code', 'newsletter'),
169
+			$search->compare( '=~', 'customer.property.type.code', 'newsletter' ),
170 170
 			$search->compare( '==', 'customer.property.type.editor', $this->editor )
171 171
 		);
172
-		$search->setConditions( $search->combine('&&', $conditions ) );
173
-		$search->setSlice(0, 1);
174
-		$items = $this->object->searchItems( $search, [], $total);
172
+		$search->setConditions( $search->combine( '&&', $conditions ) );
173
+		$search->setSlice( 0, 1 );
174
+		$items = $this->object->searchItems( $search, [], $total );
175 175
 
176 176
 		$this->assertEquals( 1, count( $items ) );
177 177
 		$this->assertEquals( 1, $total );
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 
185 185
 	public function testGetSubManager()
186 186
 	{
187
-		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
188
-		$this->object->getSubManager('unknown');
187
+		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
188
+		$this->object->getSubManager( 'unknown' );
189 189
 	}
190 190
 }
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Lists/Type/LaravelTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
 	public function testGetItem()
46 46
 	{
47 47
 		$search = $this->object->createSearch();
48
-		$search->setSlice(0, 1);
49
-		$results = $this->object->searchItems($search);
48
+		$search->setSlice( 0, 1 );
49
+		$results = $this->object->searchItems( $search );
50 50
 
51
-		if( ( $expected = reset($results) ) === false ) {
51
+		if( ( $expected = reset( $results ) ) === false ) {
52 52
 			throw new \RuntimeException( 'No list type item found' );
53 53
 		}
54 54
 
@@ -66,14 +66,14 @@  discard block
 block discarded – undo
66 66
 	public function testSaveUpdateDeleteItem()
67 67
 	{
68 68
 		$search = $this->object->createSearch();
69
-		$search->setSlice(0, 1);
70
-		$results = $this->object->searchItems($search);
69
+		$search->setSlice( 0, 1 );
70
+		$results = $this->object->searchItems( $search );
71 71
 
72
-		if( ( $item = reset($results) ) === false ) {
72
+		if( ( $item = reset( $results ) ) === false ) {
73 73
 			throw new \RuntimeException( 'No type item found' );
74 74
 		}
75 75
 
76
-		$item->setId(null);
76
+		$item->setId( null );
77 77
 		$item->setCode( 'unitTestInit' );
78 78
 		$resultSaved = $this->object->saveItem( $item );
79 79
 		$itemSaved = $this->object->getItem( $item->getId() );
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 		$this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultSaved );
113 113
 		$this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultUpd );
114 114
 
115
-		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
115
+		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
116 116
 		$this->object->getItem( $itemSaved->getId() );
117 117
 	}
118 118
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 		$expr[] = $search->compare( '==', 'customer.lists.type.editor', $this->editor );
136 136
 
137 137
 		$search->setConditions( $search->combine( '&&', $expr ) );
138
-		$search->setSlice(0, 1);
138
+		$search->setSlice( 0, 1 );
139 139
 
140 140
 		$results = $this->object->searchItems( $search, [], $total );
141 141
 		$this->assertEquals( 1, count( $results ) );
Please login to merge, or discard this patch.
lib/custom/setup/default/schema/customer.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 return array(
10 10
 	'table' => array(
11
-		'users' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
11
+		'users' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
12 12
 
13 13
 			$table = $schema->createTable( 'users' );
14 14
 
@@ -17,23 +17,23 @@  discard block
 block discarded – undo
17 17
 			$table->addColumn( 'siteid', 'integer', array( 'notnull' => false ) );
18 18
 			$table->addColumn( 'name', 'string', array( 'length' => 255 ) );
19 19
 			$table->addColumn( 'remember_token', 'string', array( 'length' => 100, 'notnull' => false ) );
20
-			$table->addColumn( 'salutation', 'string', array( 'length' => 8,  ) );
21
-			$table->addColumn( 'company', 'string', array( 'length' => 100,  ) );
22
-			$table->addColumn( 'vatid', 'string', array( 'length' => 32,  ) );
23
-			$table->addColumn( 'title', 'string', array( 'length' => 64,  ) );
24
-			$table->addColumn( 'firstname', 'string', array( 'length' => 64,  ) );
25
-			$table->addColumn( 'lastname', 'string', array( 'length' => 64,  ) );
26
-			$table->addColumn( 'address1', 'string', array( 'length' => 200,  ) );
27
-			$table->addColumn( 'address2', 'string', array( 'length' => 200,  ) );
28
-			$table->addColumn( 'address3', 'string', array( 'length' => 200,  ) );
29
-			$table->addColumn( 'postal', 'string', array( 'length' => 16,  ) );
30
-			$table->addColumn( 'city', 'string', array( 'length' => 200,  ) );
31
-			$table->addColumn( 'state', 'string', array( 'length' => 200,  ) );
20
+			$table->addColumn( 'salutation', 'string', array( 'length' => 8,) );
21
+			$table->addColumn( 'company', 'string', array( 'length' => 100,) );
22
+			$table->addColumn( 'vatid', 'string', array( 'length' => 32,) );
23
+			$table->addColumn( 'title', 'string', array( 'length' => 64,) );
24
+			$table->addColumn( 'firstname', 'string', array( 'length' => 64,) );
25
+			$table->addColumn( 'lastname', 'string', array( 'length' => 64,) );
26
+			$table->addColumn( 'address1', 'string', array( 'length' => 200,) );
27
+			$table->addColumn( 'address2', 'string', array( 'length' => 200,) );
28
+			$table->addColumn( 'address3', 'string', array( 'length' => 200,) );
29
+			$table->addColumn( 'postal', 'string', array( 'length' => 16,) );
30
+			$table->addColumn( 'city', 'string', array( 'length' => 200,) );
31
+			$table->addColumn( 'state', 'string', array( 'length' => 200,) );
32 32
 			$table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) );
33 33
 			$table->addColumn( 'countryid', 'string', array( 'length' => 2, 'notnull' => false ) );
34
-			$table->addColumn( 'telephone', 'string', array( 'length' => 32,  ) );
35
-			$table->addColumn( 'telefax', 'string', array( 'length' => 32,  ) );
36
-			$table->addColumn( 'website', 'string', array( 'length' => 255,  ) );
34
+			$table->addColumn( 'telephone', 'string', array( 'length' => 32,) );
35
+			$table->addColumn( 'telefax', 'string', array( 'length' => 32,) );
36
+			$table->addColumn( 'website', 'string', array( 'length' => 255,) );
37 37
 			$table->addColumn( 'email', 'string', array( 'length' => 255 ) );
38 38
 			$table->addColumn( 'password', 'string', array( 'length' => 255 ) );
39 39
 			$table->addColumn( 'longitude', 'float', array( 'notnull' => false ) );
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 			$table->addColumn( 'status', 'smallint', array( 'default' => 1 ) );
44 44
 			$table->addColumn( 'updated_at', 'datetime', [] );
45 45
 			$table->addColumn( 'created_at', 'datetime', [] );
46
-			$table->addColumn( 'editor', 'string', array('length' => 255,  ) );
46
+			$table->addColumn( 'editor', 'string', array( 'length' => 255,) );
47 47
 
48 48
 			$table->setPrimaryKey( array( 'id' ), 'pk_lvusr_id' );
49 49
 			$table->addUniqueIndex( array( 'email' ), 'unq_lvusr_email' );
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 			return $schema;
59 59
 		},
60 60
 
61
-		'users_address' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
61
+		'users_address' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
62 62
 
63 63
 			$table = $schema->createTable( 'users_address' );
64 64
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 			$table->addColumn( 'latitude', 'float', array( 'notnull' => false ) );
89 89
 			$table->addColumn( 'mtime', 'datetime', [] );
90 90
 			$table->addColumn( 'ctime', 'datetime', [] );
91
-			$table->addColumn( 'editor', 'string', array('length' => 255 ) );
91
+			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
92 92
 
93 93
 			$table->setPrimaryKey( array( 'id' ), 'pk_lvuad_id' );
94 94
 			$table->addIndex( array( 'parentid' ), 'idx_lvuad_pid' );
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 			return $schema;
106 106
 		},
107 107
 
108
-		'users_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
108
+		'users_list_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
109 109
 
110 110
 			$table = $schema->createTable( 'users_list_type' );
111 111
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 			return $schema;
130 130
 		},
131 131
 
132
-		'users_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
132
+		'users_list' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
133 133
 
134 134
 			$table = $schema->createTable( 'users_list' );
135 135
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 			return $schema;
161 161
 		},
162 162
 
163
-		'users_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
163
+		'users_property_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
164 164
 
165 165
 			$table = $schema->createTable( 'users_property_type' );
166 166
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 			return $schema;
185 185
 		},
186 186
 
187
-		'users_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
187
+		'users_property' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
188 188
 
189 189
 			$table = $schema->createTable( 'users_property' );
190 190
 
Please login to merge, or discard this patch.