Passed
Push — master ( dc3c70...c96436 )
by Aimeos
04:37
created
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   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -8,33 +8,33 @@  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
 
15 15
 			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true, 'unsigned' => true ) );
16 16
 			$table->addColumn( 'superuser', 'smallint', array( 'default' => 0 ) );
17 17
 			$table->addColumn( 'siteid', 'integer', array( 'notnull' => false ) );
18
-			$table->addColumn( 'label', 'string', array( 'length' => 255,  ) );
18
+			$table->addColumn( 'label', 'string', array( 'length' => 255,) );
19 19
 			$table->addColumn( 'name', 'string', array( 'length' => 255 ) );
20 20
 			$table->addColumn( 'remember_token', 'string', array( 'length' => 100, 'notnull' => false ) );
21
-			$table->addColumn( 'salutation', 'string', array( 'length' => 8,  ) );
22
-			$table->addColumn( 'company', 'string', array( 'length' => 100,  ) );
23
-			$table->addColumn( 'vatid', 'string', array( 'length' => 32,  ) );
24
-			$table->addColumn( 'title', 'string', array( 'length' => 64,  ) );
25
-			$table->addColumn( 'firstname', 'string', array( 'length' => 64,  ) );
26
-			$table->addColumn( 'lastname', 'string', array( 'length' => 64,  ) );
27
-			$table->addColumn( 'address1', 'string', array( 'length' => 200,  ) );
28
-			$table->addColumn( 'address2', 'string', array( 'length' => 200,  ) );
29
-			$table->addColumn( 'address3', 'string', array( 'length' => 200,  ) );
30
-			$table->addColumn( 'postal', 'string', array( 'length' => 16,  ) );
31
-			$table->addColumn( 'city', 'string', array( 'length' => 200,  ) );
32
-			$table->addColumn( 'state', 'string', array( 'length' => 200,  ) );
21
+			$table->addColumn( 'salutation', 'string', array( 'length' => 8,) );
22
+			$table->addColumn( 'company', 'string', array( 'length' => 100,) );
23
+			$table->addColumn( 'vatid', 'string', array( 'length' => 32,) );
24
+			$table->addColumn( 'title', 'string', array( 'length' => 64,) );
25
+			$table->addColumn( 'firstname', 'string', array( 'length' => 64,) );
26
+			$table->addColumn( 'lastname', 'string', array( 'length' => 64,) );
27
+			$table->addColumn( 'address1', 'string', array( 'length' => 200,) );
28
+			$table->addColumn( 'address2', 'string', array( 'length' => 200,) );
29
+			$table->addColumn( 'address3', 'string', array( 'length' => 200,) );
30
+			$table->addColumn( 'postal', 'string', array( 'length' => 16,) );
31
+			$table->addColumn( 'city', 'string', array( 'length' => 200,) );
32
+			$table->addColumn( 'state', 'string', array( 'length' => 200,) );
33 33
 			$table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) );
34 34
 			$table->addColumn( 'countryid', 'string', array( 'length' => 2, 'notnull' => false ) );
35
-			$table->addColumn( 'telephone', 'string', array( 'length' => 32,  ) );
36
-			$table->addColumn( 'telefax', 'string', array( 'length' => 32,  ) );
37
-			$table->addColumn( 'website', 'string', array( 'length' => 255,  ) );
35
+			$table->addColumn( 'telephone', 'string', array( 'length' => 32,) );
36
+			$table->addColumn( 'telefax', 'string', array( 'length' => 32,) );
37
+			$table->addColumn( 'website', 'string', array( 'length' => 255,) );
38 38
 			$table->addColumn( 'email', 'string', array( 'length' => 255 ) );
39 39
 			$table->addColumn( 'password', 'string', array( 'length' => 255 ) );
40 40
 			$table->addColumn( 'longitude', 'float', array( 'notnull' => false ) );
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 			$table->addColumn( 'status', 'smallint', array( 'default' => 1 ) );
45 45
 			$table->addColumn( 'updated_at', 'datetime', [] );
46 46
 			$table->addColumn( 'created_at', 'datetime', [] );
47
-			$table->addColumn( 'editor', 'string', array('length' => 255,  ) );
47
+			$table->addColumn( 'editor', 'string', array( 'length' => 255,) );
48 48
 
49 49
 			$table->setPrimaryKey( array( 'id' ), 'pk_lvusr_id' );
50 50
 			$table->addUniqueIndex( array( 'email' ), 'unq_lvusr_email' );
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 			return $schema;
60 60
 		},
61 61
 
62
-		'users_address' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
62
+		'users_address' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
63 63
 
64 64
 			$table = $schema->createTable( 'users_address' );
65 65
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 			$table->addColumn( 'latitude', 'float', array( 'notnull' => false ) );
90 90
 			$table->addColumn( 'mtime', 'datetime', [] );
91 91
 			$table->addColumn( 'ctime', 'datetime', [] );
92
-			$table->addColumn( 'editor', 'string', array('length' => 255 ) );
92
+			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
93 93
 
94 94
 			$table->setPrimaryKey( array( 'id' ), 'pk_lvuad_id' );
95 95
 			$table->addIndex( array( 'parentid' ), 'idx_lvuad_pid' );
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 			return $schema;
107 107
 		},
108 108
 
109
-		'users_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
109
+		'users_list_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
110 110
 
111 111
 			$table = $schema->createTable( 'users_list_type' );
112 112
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 			return $schema;
131 131
 		},
132 132
 
133
-		'users_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
133
+		'users_list' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
134 134
 
135 135
 			$table = $schema->createTable( 'users_list' );
136 136
 
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 			return $schema;
162 162
 		},
163 163
 
164
-		'users_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
164
+		'users_property_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
165 165
 
166 166
 			$table = $schema->createTable( 'users_property_type' );
167 167
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 			return $schema;
186 186
 		},
187 187
 
188
-		'users_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
188
+		'users_property' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
189 189
 
190 190
 			$table = $schema->createTable( 'users_property' );
191 191
 
Please login to merge, or discard this patch.