Completed
Push — master ( b3d94f...a399c1 )
by Aimeos
02:20
created
lib/custom/src/MShop/Customer/Manager/Property/Laravel.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		'customer.property.id' => array(
25 25
 			'code' => 'customer.property.id',
26 26
 			'internalcode' => 'lvupr."id"',
27
-			'internaldeps'=>array( 'LEFT JOIN "users_property" AS lvupr ON ( lvupr."parentid" = lvu."id" )' ),
27
+			'internaldeps'=>array('LEFT JOIN "users_property" AS lvupr ON ( lvupr."parentid" = lvu."id" )'),
28 28
 			'label' => 'Property ID',
29 29
 			'type' => 'integer',
30 30
 			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
@@ -99,14 +99,14 @@  discard block
 block discarded – undo
99 99
 	 *
100 100
 	 * @param integer[] $siteids List of IDs for sites whose entries should be deleted
101 101
 	 */
102
-	public function cleanup( array $siteids )
102
+	public function cleanup(array $siteids)
103 103
 	{
104 104
 		$path = 'mshop/customer/manager/property/submanagers';
105
-		foreach( $this->getContext()->getConfig()->get( $path, [] ) as $domain ) {
106
-			$this->getObject()->getSubManager( $domain )->cleanup( $siteids );
105
+		foreach ($this->getContext()->getConfig()->get($path, []) as $domain) {
106
+			$this->getObject()->getSubManager($domain)->cleanup($siteids);
107 107
 		}
108 108
 
109
-		$this->cleanupBase( $siteids, 'mshop/customer/manager/property/laravel/delete' );
109
+		$this->cleanupBase($siteids, 'mshop/customer/manager/property/laravel/delete');
110 110
 	}
111 111
 
112 112
 
@@ -116,11 +116,11 @@  discard block
 block discarded – undo
116 116
 	 * @param boolean $withsub Return also attributes of sub-managers if true
117 117
 	 * @return array Returns a list of attribtes implementing \Aimeos\MW\Criteria\Attribute\Iface
118 118
 	 */
119
-	public function getSearchAttributes( $withsub = true )
119
+	public function getSearchAttributes($withsub = true)
120 120
 	{
121 121
 		$path = 'mshop/customer/manager/property/submanagers';
122 122
 
123
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, [], $withsub );
123
+		return $this->getSearchAttributesBase($this->searchConfig, $path, [], $withsub);
124 124
 	}
125 125
 
126 126
 
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
 	 * configuration (or Default) if null
133 133
 	 * @return \Aimeos\MShop\Common\Manager\Iface Manager for different extensions, e.g property types, property lists etc.
134 134
 	 */
135
-	public function getSubManager( $manager, $name = null )
135
+	public function getSubManager($manager, $name = null)
136 136
 	{
137
-		return $this->getSubManagerBase( 'customer', 'property/' . $manager, ( $name === null ? 'Laravel' : $name ) );
137
+		return $this->getSubManagerBase('customer', 'property/'.$manager, ($name === null ? 'Laravel' : $name));
138 138
 	}
139 139
 
140 140
 
Please login to merge, or discard this patch.
lib/custom/setup/unittest/data/customer-property.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@
 block discarded – undo
5 5
  * @copyright Aimeos (aimeos.org), 2018
6 6
  */
7 7
 
8
-return array (
8
+return array(
9 9
 	'customer/property/type' => array(
10
-		'customer/property/type/newsletter' => array( 'domain' => 'customer', 'code' => 'newsletter', 'label' => 'Newsletter', 'status' => 1 ),
10
+		'customer/property/type/newsletter' => array('domain' => 'customer', 'code' => 'newsletter', 'label' => 'Newsletter', 'status' => 1),
11 11
 	),
12 12
 
13 13
 	'customer/property' => array(
14
-		'customer/property/UTC001/newsletter' => array( 'parentid' => 'customer/UTC001', 'type' => 'newsletter', 'langid' => null, 'value' => '1' ),
14
+		'customer/property/UTC001/newsletter' => array('parentid' => 'customer/UTC001', 'type' => 'newsletter', 'langid' => null, 'value' => '1'),
15 15
 	),
16 16
 );
17 17
\ No newline at end of file
Please login to merge, or discard this patch.
lib/custom/setup/unittest/data/customer-list.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -5,19 +5,19 @@
 block discarded – undo
5 5
  * @copyright Aimeos (aimeos.org), 2014-2018
6 6
  */
7 7
 
8
-return array (
9
-	'customer/lists/type' => array (
10
-		'customer/group/default' => array( 'domain' => 'customer/group', 'code' => 'default', 'label' => 'Standard', 'status' => 1 ),
11
-		'order/download' => array( 'domain' => 'order', 'code' => 'download', 'label' => 'Download', 'status' => 1 ),
12
-		'product/favorite' => array( 'domain' => 'product', 'code' => 'favorite', 'label' => 'Favorite', 'status' => 1 ),
13
-		'product/watch' => array( 'domain' => 'product', 'code' => 'watch', 'label' => 'Watch list', 'status' => 1 ),
14
-		'text/default' => array( 'domain' => 'text', 'code' => 'default', 'label' => 'Standard', 'status' => 1 ),
8
+return array(
9
+	'customer/lists/type' => array(
10
+		'customer/group/default' => array('domain' => 'customer/group', 'code' => 'default', 'label' => 'Standard', 'status' => 1),
11
+		'order/download' => array('domain' => 'order', 'code' => 'download', 'label' => 'Download', 'status' => 1),
12
+		'product/favorite' => array('domain' => 'product', 'code' => 'favorite', 'label' => 'Favorite', 'status' => 1),
13
+		'product/watch' => array('domain' => 'product', 'code' => 'watch', 'label' => 'Watch list', 'status' => 1),
14
+		'text/default' => array('domain' => 'text', 'code' => 'default', 'label' => 'Standard', 'status' => 1),
15 15
 	),
16 16
 
17
-	'customer/lists' => array (
18
-		array( 'parentid' => 'customer/UTC003', 'type' => '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 ),
19
-		array( 'parentid' => 'customer/UTC003', 'type' => '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 ),
20
-		array( 'parentid' => 'customer/UTC003', 'type' => '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 ),
21
-		array( 'parentid' => 'customer/UTC001', 'type' => '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 ),
17
+	'customer/lists' => array(
18
+		array('parentid' => 'customer/UTC003', 'type' => '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),
19
+		array('parentid' => 'customer/UTC003', 'type' => '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),
20
+		array('parentid' => 'customer/UTC003', 'type' => '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),
21
+		array('parentid' => 'customer/UTC001', 'type' => '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),
22 22
 	),
23 23
 );
24 24
\ No newline at end of file
Please login to merge, or discard this patch.
lib/custom/setup/default/schema/customer.php 1 patch
Spacing   +161 added lines, -161 removed lines patch added patch discarded remove patch
@@ -8,201 +8,201 @@
 block discarded – undo
8 8
 
9 9
 return array(
10 10
 	'table' => array(
11
-		'users' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
12
-
13
-			$table = $schema->createTable( 'users' );
14
-
15
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
16
-			$table->addColumn( 'superuser', 'smallint', array( 'default' => 0 ) );
17
-			$table->addColumn( 'siteid', 'integer', array( 'notnull' => false ) );
18
-			$table->addColumn( 'label', 'string', array( 'length' => 255, 'default' => '' ) );
19
-			$table->addColumn( 'name', 'string', array( 'length' => 255 ) );
20
-			$table->addColumn( 'remember_token', 'string', array( 'length' => 100, 'notnull' => false ) );
21
-			$table->addColumn( 'salutation', 'string', array( 'length' => 8, 'default' => '' ) );
22
-			$table->addColumn( 'company', 'string', array( 'length' => 100, 'default' => '' ) );
23
-			$table->addColumn( 'vatid', 'string', array( 'length' => 32, 'default' => '' ) );
24
-			$table->addColumn( 'title', 'string', array( 'length' => 64, 'default' => '' ) );
25
-			$table->addColumn( 'firstname', 'string', array( 'length' => 64, 'default' => '' ) );
26
-			$table->addColumn( 'lastname', 'string', array( 'length' => 64, 'default' => '' ) );
27
-			$table->addColumn( 'address1', 'string', array( 'length' => 200, 'default' => '' ) );
28
-			$table->addColumn( 'address2', 'string', array( 'length' => 200, 'default' => '' ) );
29
-			$table->addColumn( 'address3', 'string', array( 'length' => 200, 'default' => '' ) );
30
-			$table->addColumn( 'postal', 'string', array( 'length' => 16, 'default' => '' ) );
31
-			$table->addColumn( 'city', 'string', array( 'length' => 200, 'default' => '' ) );
32
-			$table->addColumn( 'state', 'string', array( 'length' => 200, 'default' => '' ) );
33
-			$table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) );
34
-			$table->addColumn( 'countryid', 'string', array( 'length' => 2, 'notnull' => false, 'fixed' => true ) );
35
-			$table->addColumn( 'telephone', 'string', array( 'length' => 32, 'default' => '' ) );
36
-			$table->addColumn( 'telefax', 'string', array( 'length' => 32, 'default' => '' ) );
37
-			$table->addColumn( 'website', 'string', array( 'length' => 255, 'default' => '' ) );
38
-			$table->addColumn( 'email', 'string', array( 'length' => 255 ) );
39
-			$table->addColumn( 'password', 'string', array( 'length' => 255 ) );
40
-			$table->addColumn( 'longitude', 'float', array( 'notnull' => false ) );
41
-			$table->addColumn( 'latitude', 'float', array( 'notnull' => false ) );
42
-			$table->addColumn( 'birthday', 'date', array( 'notnull' => false ) );
43
-			$table->addColumn( 'vdate', 'date', array( 'notnull' => false ) );
44
-			$table->addColumn( 'status', 'smallint', array( 'default' => 1 ) );
45
-			$table->addColumn( 'updated_at', 'datetime', [] );
46
-			$table->addColumn( 'created_at', 'datetime', [] );
47
-			$table->addColumn( 'editor', 'string', array('length' => 255, 'default' => '' ) );
48
-
49
-			$table->setPrimaryKey( array( 'id' ), 'pk_lvusr_id' );
50
-			$table->addUniqueIndex( array( 'email' ), 'unq_lvusr_email' );
51
-			$table->addIndex( array( 'langid' ), 'idx_lvusr_langid' );
52
-			$table->addIndex( array( 'lastname', 'firstname' ), 'idx_lvusr_last_first' );
53
-			$table->addIndex( array( 'postal', 'address1' ), 'idx_lvusr_post_addr1' );
54
-			$table->addIndex( array( 'postal', 'city' ), 'idx_lvusr_post_city' );
55
-			$table->addIndex( array( 'lastname' ), 'idx_lvusr_lastname' );
56
-			$table->addIndex( array( 'address1' ), 'idx_lvusr_address1' );
57
-			$table->addIndex( array( 'city' ), 'idx_lvusr_city' );
11
+		'users' => function(\Doctrine\DBAL\Schema\Schema $schema) {
12
+
13
+			$table = $schema->createTable('users');
14
+
15
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
16
+			$table->addColumn('superuser', 'smallint', array('default' => 0));
17
+			$table->addColumn('siteid', 'integer', array('notnull' => false));
18
+			$table->addColumn('label', 'string', array('length' => 255, 'default' => ''));
19
+			$table->addColumn('name', 'string', array('length' => 255));
20
+			$table->addColumn('remember_token', 'string', array('length' => 100, 'notnull' => false));
21
+			$table->addColumn('salutation', 'string', array('length' => 8, 'default' => ''));
22
+			$table->addColumn('company', 'string', array('length' => 100, 'default' => ''));
23
+			$table->addColumn('vatid', 'string', array('length' => 32, 'default' => ''));
24
+			$table->addColumn('title', 'string', array('length' => 64, 'default' => ''));
25
+			$table->addColumn('firstname', 'string', array('length' => 64, 'default' => ''));
26
+			$table->addColumn('lastname', 'string', array('length' => 64, 'default' => ''));
27
+			$table->addColumn('address1', 'string', array('length' => 200, 'default' => ''));
28
+			$table->addColumn('address2', 'string', array('length' => 200, 'default' => ''));
29
+			$table->addColumn('address3', 'string', array('length' => 200, 'default' => ''));
30
+			$table->addColumn('postal', 'string', array('length' => 16, 'default' => ''));
31
+			$table->addColumn('city', 'string', array('length' => 200, 'default' => ''));
32
+			$table->addColumn('state', 'string', array('length' => 200, 'default' => ''));
33
+			$table->addColumn('langid', 'string', array('length' => 5, 'notnull' => false));
34
+			$table->addColumn('countryid', 'string', array('length' => 2, 'notnull' => false, 'fixed' => true));
35
+			$table->addColumn('telephone', 'string', array('length' => 32, 'default' => ''));
36
+			$table->addColumn('telefax', 'string', array('length' => 32, 'default' => ''));
37
+			$table->addColumn('website', 'string', array('length' => 255, 'default' => ''));
38
+			$table->addColumn('email', 'string', array('length' => 255));
39
+			$table->addColumn('password', 'string', array('length' => 255));
40
+			$table->addColumn('longitude', 'float', array('notnull' => false));
41
+			$table->addColumn('latitude', 'float', array('notnull' => false));
42
+			$table->addColumn('birthday', 'date', array('notnull' => false));
43
+			$table->addColumn('vdate', 'date', array('notnull' => false));
44
+			$table->addColumn('status', 'smallint', array('default' => 1));
45
+			$table->addColumn('updated_at', 'datetime', []);
46
+			$table->addColumn('created_at', 'datetime', []);
47
+			$table->addColumn('editor', 'string', array('length' => 255, 'default' => ''));
48
+
49
+			$table->setPrimaryKey(array('id'), 'pk_lvusr_id');
50
+			$table->addUniqueIndex(array('email'), 'unq_lvusr_email');
51
+			$table->addIndex(array('langid'), 'idx_lvusr_langid');
52
+			$table->addIndex(array('lastname', 'firstname'), 'idx_lvusr_last_first');
53
+			$table->addIndex(array('postal', 'address1'), 'idx_lvusr_post_addr1');
54
+			$table->addIndex(array('postal', 'city'), 'idx_lvusr_post_city');
55
+			$table->addIndex(array('lastname'), 'idx_lvusr_lastname');
56
+			$table->addIndex(array('address1'), 'idx_lvusr_address1');
57
+			$table->addIndex(array('city'), 'idx_lvusr_city');
58 58
 
59 59
 			return $schema;
60 60
 		},
61 61
 
62
-		'users_address' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
63
-
64
-			$table = $schema->createTable( 'users_address' );
65
-
66
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
67
-			$table->addColumn( 'siteid', 'integer', [] );
68
-			$table->addColumn( 'parentid', 'integer', [] );
69
-			$table->addColumn( 'pos', 'smallint', [] );
70
-			$table->addColumn( 'company', 'string', array( 'length' => 100 ) );
71
-			$table->addColumn( 'vatid', 'string', array( 'length' => 32 ) );
72
-			$table->addColumn( 'salutation', 'string', array( 'length' => 8 ) );
73
-			$table->addColumn( 'title', 'string', array( 'length' => 64 ) );
74
-			$table->addColumn( 'firstname', 'string', array( 'length' => 64 ) );
75
-			$table->addColumn( 'lastname', 'string', array( 'length' => 64 ) );
76
-			$table->addColumn( 'address1', 'string', array( 'length' => 200 ) );
77
-			$table->addColumn( 'address2', 'string', array( 'length' => 200 ) );
78
-			$table->addColumn( 'address3', 'string', array( 'length' => 200 ) );
79
-			$table->addColumn( 'postal', 'string', array( 'length' => 16 ) );
80
-			$table->addColumn( 'city', 'string', array( 'length' => 200 ) );
81
-			$table->addColumn( 'state', 'string', array( 'length' => 200 ) );
82
-			$table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) );
83
-			$table->addColumn( 'countryid', 'string', array( 'length' => 2, 'notnull' => false, 'fixed' => true ) );
84
-			$table->addColumn( 'telephone', 'string', array( 'length' => 32 ) );
85
-			$table->addColumn( 'email', 'string', array( 'length' => 255 ) );
86
-			$table->addColumn( 'telefax', 'string', array( 'length' => 255 ) );
87
-			$table->addColumn( 'website', 'string', array( 'length' => 255 ) );
88
-			$table->addColumn( 'longitude', 'float', array( 'notnull' => false ) );
89
-			$table->addColumn( 'latitude', 'float', array( 'notnull' => false ) );
90
-			$table->addColumn( 'mtime', 'datetime', [] );
91
-			$table->addColumn( 'ctime', 'datetime', [] );
92
-			$table->addColumn( 'editor', 'string', array('length' => 255 ) );
93
-
94
-			$table->setPrimaryKey( array( 'id' ), 'pk_lvuad_id' );
95
-			$table->addIndex( array( 'parentid' ), 'idx_lvuad_pid' );
96
-			$table->addIndex( array( 'lastname', 'firstname' ), 'idx_lvuad_last_first' );
97
-			$table->addIndex( array( 'postal', 'address1' ), 'idx_lvuad_post_addr1' );
98
-			$table->addIndex( array( 'postal', 'city' ), 'idx_lvuad_post_city' );
99
-			$table->addIndex( array( 'address1' ), 'idx_lvuad_address1' );
100
-			$table->addIndex( array( 'city' ), 'idx_lvuad_city' );
101
-			$table->addIndex( array( 'email' ), 'idx_lvuad_email' );
102
-
103
-			$table->addForeignKeyConstraint( 'users', array( 'parentid' ), array( 'id' ),
104
-				array( 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE' ), 'fk_lvuad_pid' );
62
+		'users_address' => function(\Doctrine\DBAL\Schema\Schema $schema) {
63
+
64
+			$table = $schema->createTable('users_address');
65
+
66
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
67
+			$table->addColumn('siteid', 'integer', []);
68
+			$table->addColumn('parentid', 'integer', []);
69
+			$table->addColumn('pos', 'smallint', []);
70
+			$table->addColumn('company', 'string', array('length' => 100));
71
+			$table->addColumn('vatid', 'string', array('length' => 32));
72
+			$table->addColumn('salutation', 'string', array('length' => 8));
73
+			$table->addColumn('title', 'string', array('length' => 64));
74
+			$table->addColumn('firstname', 'string', array('length' => 64));
75
+			$table->addColumn('lastname', 'string', array('length' => 64));
76
+			$table->addColumn('address1', 'string', array('length' => 200));
77
+			$table->addColumn('address2', 'string', array('length' => 200));
78
+			$table->addColumn('address3', 'string', array('length' => 200));
79
+			$table->addColumn('postal', 'string', array('length' => 16));
80
+			$table->addColumn('city', 'string', array('length' => 200));
81
+			$table->addColumn('state', 'string', array('length' => 200));
82
+			$table->addColumn('langid', 'string', array('length' => 5, 'notnull' => false));
83
+			$table->addColumn('countryid', 'string', array('length' => 2, 'notnull' => false, 'fixed' => true));
84
+			$table->addColumn('telephone', 'string', array('length' => 32));
85
+			$table->addColumn('email', 'string', array('length' => 255));
86
+			$table->addColumn('telefax', 'string', array('length' => 255));
87
+			$table->addColumn('website', 'string', array('length' => 255));
88
+			$table->addColumn('longitude', 'float', array('notnull' => false));
89
+			$table->addColumn('latitude', 'float', array('notnull' => false));
90
+			$table->addColumn('mtime', 'datetime', []);
91
+			$table->addColumn('ctime', 'datetime', []);
92
+			$table->addColumn('editor', 'string', array('length' => 255));
93
+
94
+			$table->setPrimaryKey(array('id'), 'pk_lvuad_id');
95
+			$table->addIndex(array('parentid'), 'idx_lvuad_pid');
96
+			$table->addIndex(array('lastname', 'firstname'), 'idx_lvuad_last_first');
97
+			$table->addIndex(array('postal', 'address1'), 'idx_lvuad_post_addr1');
98
+			$table->addIndex(array('postal', 'city'), 'idx_lvuad_post_city');
99
+			$table->addIndex(array('address1'), 'idx_lvuad_address1');
100
+			$table->addIndex(array('city'), 'idx_lvuad_city');
101
+			$table->addIndex(array('email'), 'idx_lvuad_email');
102
+
103
+			$table->addForeignKeyConstraint('users', array('parentid'), array('id'),
104
+				array('onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'), 'fk_lvuad_pid');
105 105
 
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
-			$table = $schema->createTable( 'users_list_type' );
111
+			$table = $schema->createTable('users_list_type');
112 112
 
113
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
114
-			$table->addColumn( 'siteid', 'integer', [] );
115
-			$table->addColumn( 'domain', 'string', array( 'length' => 32 ) );
116
-			$table->addColumn( 'code', 'string', array( 'length' => 32 ) );
117
-			$table->addColumn( 'label', 'string', array( 'length' => 255 ) );
118
-			$table->addColumn( 'pos', 'integer', ['default' => 0] );
119
-			$table->addColumn( 'status', 'smallint', [] );
120
-			$table->addColumn( 'mtime', 'datetime', [] );
121
-			$table->addColumn( 'ctime', 'datetime', [] );
122
-			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
113
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
114
+			$table->addColumn('siteid', 'integer', []);
115
+			$table->addColumn('domain', 'string', array('length' => 32));
116
+			$table->addColumn('code', 'string', array('length' => 32));
117
+			$table->addColumn('label', 'string', array('length' => 255));
118
+			$table->addColumn('pos', 'integer', ['default' => 0]);
119
+			$table->addColumn('status', 'smallint', []);
120
+			$table->addColumn('mtime', 'datetime', []);
121
+			$table->addColumn('ctime', 'datetime', []);
122
+			$table->addColumn('editor', 'string', array('length' => 255));
123 123
 
124
-			$table->setPrimaryKey( array( 'id' ), 'pk_lvulity_id' );
125
-			$table->addUniqueIndex( array( 'siteid', 'domain', 'code' ), 'unq_lvulity_sid_dom_code' );
126
-			$table->addIndex( array( 'siteid', 'status', 'pos' ), 'idx_lvulity_sid_status_pos' );
127
-			$table->addIndex( array( 'siteid', 'label' ), 'idx_lvulity_sid_label' );
128
-			$table->addIndex( array( 'siteid', 'code' ), 'idx_lvulity_sid_code' );
124
+			$table->setPrimaryKey(array('id'), 'pk_lvulity_id');
125
+			$table->addUniqueIndex(array('siteid', 'domain', 'code'), 'unq_lvulity_sid_dom_code');
126
+			$table->addIndex(array('siteid', 'status', 'pos'), 'idx_lvulity_sid_status_pos');
127
+			$table->addIndex(array('siteid', 'label'), 'idx_lvulity_sid_label');
128
+			$table->addIndex(array('siteid', 'code'), 'idx_lvulity_sid_code');
129 129
 
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
-			$table = $schema->createTable( 'users_list' );
135
+			$table = $schema->createTable('users_list');
136 136
 
137
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
138
-			$table->addColumn( 'parentid', 'integer', [] );
139
-			$table->addColumn( 'siteid', 'integer', [] );
140
-			$table->addColumn( 'type', 'string', array( 'length' => 32 ) );
141
-			$table->addColumn( 'domain', 'string', array( 'length' => 32 ) );
142
-			$table->addColumn( 'refid', 'string', array( 'length' => 32 ) );
143
-			$table->addColumn( 'start', 'datetime', array( 'notnull' => false ) );
144
-			$table->addColumn( 'end', 'datetime', array( 'notnull' => false ) );
145
-			$table->addColumn( 'config', 'text', array( 'length' => 0xffff ) );
146
-			$table->addColumn( 'pos', 'integer', [] );
147
-			$table->addColumn( 'status', 'smallint', [] );
148
-			$table->addColumn( 'mtime', 'datetime', [] );
149
-			$table->addColumn( 'ctime', 'datetime', [] );
150
-			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
137
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
138
+			$table->addColumn('parentid', 'integer', []);
139
+			$table->addColumn('siteid', 'integer', []);
140
+			$table->addColumn('type', 'string', array('length' => 32));
141
+			$table->addColumn('domain', 'string', array('length' => 32));
142
+			$table->addColumn('refid', 'string', array('length' => 32));
143
+			$table->addColumn('start', 'datetime', array('notnull' => false));
144
+			$table->addColumn('end', 'datetime', array('notnull' => false));
145
+			$table->addColumn('config', 'text', array('length' => 0xffff));
146
+			$table->addColumn('pos', 'integer', []);
147
+			$table->addColumn('status', 'smallint', []);
148
+			$table->addColumn('mtime', 'datetime', []);
149
+			$table->addColumn('ctime', 'datetime', []);
150
+			$table->addColumn('editor', 'string', array('length' => 255));
151 151
 
152
-			$table->setPrimaryKey( array( 'id' ), 'pk_lvuli_id' );
153
-			$table->addUniqueIndex( array( 'parentid', 'siteid', 'domain', 'type', 'refid' ), 'unq_lvuli_pid_sid_dm_ty_rid' );
154
-			$table->addIndex( array( 'parentid' ), 'fk_lvuli_pid' );
152
+			$table->setPrimaryKey(array('id'), 'pk_lvuli_id');
153
+			$table->addUniqueIndex(array('parentid', 'siteid', 'domain', 'type', 'refid'), 'unq_lvuli_pid_sid_dm_ty_rid');
154
+			$table->addIndex(array('parentid'), 'fk_lvuli_pid');
155 155
 
156
-			$table->addForeignKeyConstraint( 'users', array( 'parentid' ), array( 'id' ),
157
-				array( 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE' ), 'fk_lvuli_pid' );
156
+			$table->addForeignKeyConstraint('users', array('parentid'), array('id'),
157
+				array('onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'), 'fk_lvuli_pid');
158 158
 
159 159
 			return $schema;
160 160
 		},
161 161
 
162
-		'users_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
162
+		'users_property_type' => function(\Doctrine\DBAL\Schema\Schema $schema) {
163 163
 
164
-			$table = $schema->createTable( 'users_property_type' );
164
+			$table = $schema->createTable('users_property_type');
165 165
 
166
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
167
-			$table->addColumn( 'siteid', 'integer', [] );
168
-			$table->addColumn( 'domain', 'string', array( 'length' => 32 ) );
169
-			$table->addColumn( 'code', 'string', array( 'length' => 32 ) );
170
-			$table->addColumn( 'label', 'string', array( 'length' => 255 ) );
171
-			$table->addColumn( 'pos', 'integer', ['default' => 0] );
172
-			$table->addColumn( 'status', 'smallint', [] );
173
-			$table->addColumn( 'mtime', 'datetime', [] );
174
-			$table->addColumn( 'ctime', 'datetime', [] );
175
-			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
166
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
167
+			$table->addColumn('siteid', 'integer', []);
168
+			$table->addColumn('domain', 'string', array('length' => 32));
169
+			$table->addColumn('code', 'string', array('length' => 32));
170
+			$table->addColumn('label', 'string', array('length' => 255));
171
+			$table->addColumn('pos', 'integer', ['default' => 0]);
172
+			$table->addColumn('status', 'smallint', []);
173
+			$table->addColumn('mtime', 'datetime', []);
174
+			$table->addColumn('ctime', 'datetime', []);
175
+			$table->addColumn('editor', 'string', array('length' => 255));
176 176
 
177
-			$table->setPrimaryKey( array( 'id' ), 'pk_lvuprty_id' );
178
-			$table->addUniqueIndex( array( 'siteid', 'domain', 'code' ), 'unq_lvuprty_sid_dom_code' );
179
-			$table->addIndex( array( 'siteid', 'status', 'pos' ), 'idx_lvuprty_sid_status_pos' );
180
-			$table->addIndex( array( 'siteid', 'label' ), 'idx_lvuprty_sid_label' );
181
-			$table->addIndex( array( 'siteid', 'code' ), 'idx_lvuprty_sid_code' );
177
+			$table->setPrimaryKey(array('id'), 'pk_lvuprty_id');
178
+			$table->addUniqueIndex(array('siteid', 'domain', 'code'), 'unq_lvuprty_sid_dom_code');
179
+			$table->addIndex(array('siteid', 'status', 'pos'), 'idx_lvuprty_sid_status_pos');
180
+			$table->addIndex(array('siteid', 'label'), 'idx_lvuprty_sid_label');
181
+			$table->addIndex(array('siteid', 'code'), 'idx_lvuprty_sid_code');
182 182
 
183 183
 			return $schema;
184 184
 		},
185 185
 
186
-		'users_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
186
+		'users_property' => function(\Doctrine\DBAL\Schema\Schema $schema) {
187 187
 
188
-			$table = $schema->createTable( 'users_property' );
188
+			$table = $schema->createTable('users_property');
189 189
 
190
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
191
-			$table->addColumn( 'siteid', 'integer', [] );
192
-			$table->addColumn( 'parentid', 'integer', [] );
193
-			$table->addColumn( 'type', 'string', array( 'length' => 32 ) );
194
-			$table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) );
195
-			$table->addColumn( 'value', 'string', array( 'length' => 255 ) );
196
-			$table->addColumn( 'mtime', 'datetime', [] );
197
-			$table->addColumn( 'ctime', 'datetime', [] );
198
-			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
190
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
191
+			$table->addColumn('siteid', 'integer', []);
192
+			$table->addColumn('parentid', 'integer', []);
193
+			$table->addColumn('type', 'string', array('length' => 32));
194
+			$table->addColumn('langid', 'string', array('length' => 5, 'notnull' => false));
195
+			$table->addColumn('value', 'string', array('length' => 255));
196
+			$table->addColumn('mtime', 'datetime', []);
197
+			$table->addColumn('ctime', 'datetime', []);
198
+			$table->addColumn('editor', 'string', array('length' => 255));
199 199
 
200
-			$table->setPrimaryKey( array( 'id' ), 'pk_lvupr_id' );
201
-			$table->addUniqueIndex( array( 'parentid', 'siteid', 'type', 'langid', 'value' ), 'unq_lvupr_sid_ty_lid_value' );
202
-			$table->addIndex( array( 'parentid' ), 'fk_lvupr_pid' );
200
+			$table->setPrimaryKey(array('id'), 'pk_lvupr_id');
201
+			$table->addUniqueIndex(array('parentid', 'siteid', 'type', 'langid', 'value'), 'unq_lvupr_sid_ty_lid_value');
202
+			$table->addIndex(array('parentid'), 'fk_lvupr_pid');
203 203
 
204
-			$table->addForeignKeyConstraint( 'users', array( 'parentid' ), array( 'id' ),
205
-				array( 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE' ), 'fk_lvupr_pid' );
204
+			$table->addForeignKeyConstraint('users', array('parentid'), array('id'),
205
+				array('onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'), 'fk_lvupr_pid');
206 206
 
207 207
 			return $schema;
208 208
 		},
Please login to merge, or discard this patch.
lib/custom/setup/TypesMigrateColumnsLaravel.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -57,25 +57,25 @@
 block discarded – undo
57 57
 	 */
58 58
 	public function migrate()
59 59
 	{
60
-		$this->msg( sprintf( 'Add new type columns for Laravel' ), 0 );
61
-		$this->status( '' );
60
+		$this->msg(sprintf('Add new type columns for Laravel'), 0);
61
+		$this->status('');
62 62
 
63
-		foreach( $this->tables as $rname => $list ) {
64
-			$this->addColumn( $rname, $list );
63
+		foreach ($this->tables as $rname => $list) {
64
+			$this->addColumn($rname, $list);
65 65
 		}
66 66
 
67
-		$this->msg( sprintf( 'Drop old unique indexes for Laravel' ), 0 );
68
-		$this->status( '' );
67
+		$this->msg(sprintf('Drop old unique indexes for Laravel'), 0);
68
+		$this->status('');
69 69
 
70
-		foreach( $this->constraints as $rname => $list ) {
71
-			$this->dropIndex( $rname, $list );
70
+		foreach ($this->constraints as $rname => $list) {
71
+			$this->dropIndex($rname, $list);
72 72
 		}
73 73
 
74
-		$this->msg( sprintf( 'Migrate typeid to type for Laravel' ), 0 );
75
-		$this->status( '' );
74
+		$this->msg(sprintf('Migrate typeid to type for Laravel'), 0);
75
+		$this->status('');
76 76
 
77
-		foreach( $this->migrations as $rname => $list ) {
78
-			$this->migrateData( $rname, $list );
77
+		foreach ($this->migrations as $rname => $list) {
78
+			$this->migrateData($rname, $list);
79 79
 		}
80 80
 	}
81 81
 }
82 82
\ No newline at end of file
Please login to merge, or discard this patch.
lib/custom/tests/TestHelper.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -47,6 +47,9 @@
 block discarded – undo
47 47
 	}
48 48
 
49 49
 
50
+	/**
51
+	 * @param string $site
52
+	 */
50 53
 	private static function createContext( $site )
51 54
 	{
52 55
 		$ctx = new \Aimeos\MShop\Context\Item\Standard();
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@  discard block
 block discarded – undo
18 18
 
19 19
 		$includepaths = $aimeos->getIncludePaths();
20 20
 		$includepaths[] = get_include_path();
21
-		set_include_path( implode( PATH_SEPARATOR, $includepaths ) );
21
+		set_include_path(implode(PATH_SEPARATOR, $includepaths));
22 22
 	}
23 23
 
24 24
 
25
-	public static function getContext( $site = 'unittest' )
25
+	public static function getContext($site = 'unittest')
26 26
 	{
27
-		if( !isset( self::$context[$site] ) ) {
28
-			self::$context[$site] = self::createContext( $site );
27
+		if (!isset(self::$context[$site])) {
28
+			self::$context[$site] = self::createContext($site);
29 29
 		}
30 30
 
31 31
 		return clone self::$context[$site];
@@ -34,54 +34,54 @@  discard block
 block discarded – undo
34 34
 
35 35
 	private static function getAimeos()
36 36
 	{
37
-		if( !isset( self::$aimeos ) )
37
+		if (!isset(self::$aimeos))
38 38
 		{
39 39
 			require_once 'Bootstrap.php';
40
-			spl_autoload_register( 'Aimeos\\Bootstrap::autoload' );
40
+			spl_autoload_register('Aimeos\\Bootstrap::autoload');
41 41
 
42
-			$extdir = dirname( dirname( dirname( __DIR__ ) ) );
43
-			self::$aimeos = new \Aimeos\Bootstrap( array( $extdir ), false );
42
+			$extdir = dirname(dirname(dirname(__DIR__)));
43
+			self::$aimeos = new \Aimeos\Bootstrap(array($extdir), false);
44 44
 		}
45 45
 
46 46
 		return self::$aimeos;
47 47
 	}
48 48
 
49 49
 
50
-	private static function createContext( $site )
50
+	private static function createContext($site)
51 51
 	{
52 52
 		$ctx = new \Aimeos\MShop\Context\Item\Standard();
53 53
 		$aimeos = self::getAimeos();
54 54
 
55 55
 
56
-		$paths = $aimeos->getConfigPaths( 'mysql' );
57
-		$paths[] = __DIR__ . DIRECTORY_SEPARATOR . 'config';
56
+		$paths = $aimeos->getConfigPaths('mysql');
57
+		$paths[] = __DIR__.DIRECTORY_SEPARATOR.'config';
58 58
 
59
-		$conf = new \Aimeos\MW\Config\PHPArray( [], $paths );
60
-		$ctx->setConfig( $conf );
59
+		$conf = new \Aimeos\MW\Config\PHPArray([], $paths);
60
+		$ctx->setConfig($conf);
61 61
 
62 62
 
63
-		$dbm = new \Aimeos\MW\DB\Manager\PDO( $conf );
64
-		$ctx->setDatabaseManager( $dbm );
63
+		$dbm = new \Aimeos\MW\DB\Manager\PDO($conf);
64
+		$ctx->setDatabaseManager($dbm);
65 65
 
66 66
 
67
-		$logger = new \Aimeos\MW\Logger\File( $site . '.log', \Aimeos\MW\Logger\Base::DEBUG );
68
-		$ctx->setLogger( $logger );
67
+		$logger = new \Aimeos\MW\Logger\File($site.'.log', \Aimeos\MW\Logger\Base::DEBUG);
68
+		$ctx->setLogger($logger);
69 69
 
70 70
 
71
-		$i18n = new \Aimeos\MW\Translation\None( 'de' );
72
-		$ctx->setI18n( array( 'de' => $i18n ) );
71
+		$i18n = new \Aimeos\MW\Translation\None('de');
72
+		$ctx->setI18n(array('de' => $i18n));
73 73
 
74 74
 
75 75
 		$session = new \Aimeos\MW\Session\None();
76
-		$ctx->setSession( $session );
76
+		$ctx->setSession($session);
77 77
 
78 78
 
79
-		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::create( $ctx );
80
-		$localeItem = $localeManager->bootstrap( $site, '', '', false );
79
+		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::create($ctx);
80
+		$localeItem = $localeManager->bootstrap($site, '', '', false);
81 81
 
82
-		$ctx->setLocale( $localeItem );
82
+		$ctx->setLocale($localeItem);
83 83
 
84
-		$ctx->setEditor( 'ai-laravel:unittest' );
84
+		$ctx->setEditor('ai-laravel:unittest');
85 85
 
86 86
 		return $ctx;
87 87
 	}
Please login to merge, or discard this patch.
lib/custom/setup/unittest/CustomerAddLaravelTestData.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	 */
22 22
 	public function getPreDependencies()
23 23
 	{
24
-		return array( 'TablesAddLaravelTestData' );
24
+		return array('TablesAddLaravelTestData');
25 25
 	}
26 26
 
27 27
 
@@ -30,34 +30,34 @@  discard block
 block discarded – undo
30 30
 	 */
31 31
 	public function migrate()
32 32
 	{
33
-		\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\MShop\\Context\\Item\\Iface', $this->additional );
33
+		\Aimeos\MW\Common\Base::checkClass('\\Aimeos\\MShop\\Context\\Item\\Iface', $this->additional);
34 34
 
35
-		$this->msg( 'Adding Laravel customer test data', 0 );
36
-		$this->additional->setEditor( 'ai-laravel:unittest' );
35
+		$this->msg('Adding Laravel customer test data', 0);
36
+		$this->additional->setEditor('ai-laravel:unittest');
37 37
 
38 38
 		$parentIds = [];
39 39
 		$ds = DIRECTORY_SEPARATOR;
40
-		$path = __DIR__ . $ds . 'data' . $ds . 'customer.php';
40
+		$path = __DIR__.$ds.'data'.$ds.'customer.php';
41 41
 
42
-		if( ( $testdata = include( $path ) ) == false ){
43
-			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for customer domain', $path ) );
42
+		if (($testdata = include($path)) == false) {
43
+			throw new \Aimeos\MShop\Exception(sprintf('No file "%1$s" found for customer domain', $path));
44 44
 		}
45 45
 
46 46
 
47
-		$customerManager = \Aimeos\MShop\Customer\Manager\Factory::create( $this->additional, 'Laravel' );
48
-		$customerAddressManager = $customerManager->getSubManager( 'address', 'Laravel' );
47
+		$customerManager = \Aimeos\MShop\Customer\Manager\Factory::create($this->additional, 'Laravel');
48
+		$customerAddressManager = $customerManager->getSubManager('address', 'Laravel');
49 49
 
50
-		$this->cleanupCustomerData( $customerManager, $customerAddressManager );
50
+		$this->cleanupCustomerData($customerManager, $customerAddressManager);
51 51
 
52 52
 		$this->conn->begin();
53 53
 
54
-		$parentIds = $this->addCustomerData( $testdata, $customerManager, $customerAddressManager->createItem() );
55
-		$this->addCustomerAddressData( $testdata, $customerAddressManager, $parentIds );
54
+		$parentIds = $this->addCustomerData($testdata, $customerManager, $customerAddressManager->createItem());
55
+		$this->addCustomerAddressData($testdata, $customerAddressManager, $parentIds);
56 56
 
57 57
 		$this->conn->commit();
58 58
 
59 59
 
60
-		$this->status( 'done' );
60
+		$this->status('done');
61 61
 	}
62 62
 
63 63
 
@@ -67,17 +67,17 @@  discard block
 block discarded – undo
67 67
 	 * @param \Aimeos\MShop\Common\Manager\Iface $customerManager Customer manager
68 68
 	 * @param \Aimeos\MShop\Common\Manager\Iface $customerAddressManager Customer address manager
69 69
 	 */
70
-	protected function cleanupCustomerData( \Aimeos\MShop\Common\Manager\Iface $customerManager, \Aimeos\MShop\Common\Manager\Iface $customerAddressManager )
70
+	protected function cleanupCustomerData(\Aimeos\MShop\Common\Manager\Iface $customerManager, \Aimeos\MShop\Common\Manager\Iface $customerAddressManager)
71 71
 	{
72 72
 		$search = $customerManager->createSearch();
73
-		$search->setConditions( $search->compare( '=~', 'customer.code', 'UTC00' ) );
74
-		$customerItems = $customerManager->searchItems( $search );
73
+		$search->setConditions($search->compare('=~', 'customer.code', 'UTC00'));
74
+		$customerItems = $customerManager->searchItems($search);
75 75
 
76 76
 		$search = $customerAddressManager->createSearch();
77
-		$search->setConditions( $search->compare( '=~', 'customer.address.email', 'unitCustomer' ) );
78
-		$addressItems = $customerAddressManager->searchItems( $search );
77
+		$search->setConditions($search->compare('=~', 'customer.address.email', 'unitCustomer'));
78
+		$addressItems = $customerAddressManager->searchItems($search);
79 79
 
80
-		$customerAddressManager->deleteItems( array_keys( $addressItems ) );
81
-		$customerManager->deleteItems( array_keys( $customerItems ) );
80
+		$customerAddressManager->deleteItems(array_keys($addressItems));
81
+		$customerManager->deleteItems(array_keys($customerItems));
82 82
 	}
83 83
 }
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Lists/LaravelTest.php 1 patch
Spacing   +139 added lines, -139 removed lines patch added patch discarded remove patch
@@ -18,43 +18,43 @@  discard block
 block discarded – undo
18 18
 	{
19 19
 		$this->context = \TestHelper::getContext();
20 20
 		$this->editor = $this->context->getEditor();
21
-		$manager = \Aimeos\MShop\Customer\Manager\Factory::create( $this->context, 'Laravel' );
22
-		$this->object = $manager->getSubManager( 'lists', 'Laravel' );
21
+		$manager = \Aimeos\MShop\Customer\Manager\Factory::create($this->context, 'Laravel');
22
+		$this->object = $manager->getSubManager('lists', 'Laravel');
23 23
 	}
24 24
 
25 25
 
26 26
 	protected function tearDown()
27 27
 	{
28
-		unset( $this->object, $this->context );
28
+		unset($this->object, $this->context);
29 29
 	}
30 30
 
31 31
 
32 32
 	public function testCleanup()
33 33
 	{
34
-		$this->object->cleanup( array( -1 ) );
34
+		$this->object->cleanup(array( -1 ));
35 35
 	}
36 36
 
37 37
 
38 38
 	public function testAggregate()
39 39
 	{
40
-		$search = $this->object->createSearch( true );
40
+		$search = $this->object->createSearch(true);
41 41
 		$expr = array(
42 42
 			$search->getConditions(),
43
-			$search->compare( '==', 'customer.lists.editor', 'ai-laravel:unittest' ),
43
+			$search->compare('==', 'customer.lists.editor', 'ai-laravel:unittest'),
44 44
 		);
45
-		$search->setConditions( $search->combine( '&&', $expr ) );
45
+		$search->setConditions($search->combine('&&', $expr));
46 46
 
47
-		$result = $this->object->aggregate( $search, 'customer.lists.domain' );
47
+		$result = $this->object->aggregate($search, 'customer.lists.domain');
48 48
 
49
-		$this->assertEquals( 1, count( $result ) );
50
-		$this->assertArrayHasKey( 'text', $result );
51
-		$this->assertEquals( 4, $result['text'] );
49
+		$this->assertEquals(1, count($result));
50
+		$this->assertArrayHasKey('text', $result);
51
+		$this->assertEquals(4, $result['text']);
52 52
 	}
53 53
 
54 54
 
55 55
 	public function testCreateItem()
56 56
 	{
57
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $this->object->createItem() );
57
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $this->object->createItem());
58 58
 	}
59 59
 
60 60
 
@@ -62,13 +62,13 @@  discard block
 block discarded – undo
62 62
 	{
63 63
 		$search = $this->object->createSearch();
64 64
 		$search->setSlice(0, 1);
65
-		$results = $this->object->searchItems( $search );
65
+		$results = $this->object->searchItems($search);
66 66
 
67
-		if( ( $item = reset( $results ) ) === false ) {
68
-			throw new \RuntimeException( 'No item found' );
67
+		if (($item = reset($results)) === false) {
68
+			throw new \RuntimeException('No item found');
69 69
 		}
70 70
 
71
-		$this->assertEquals( $item, $this->object->getItem( $item->getId() ) );
71
+		$this->assertEquals($item, $this->object->getItem($item->getId()));
72 72
 	}
73 73
 
74 74
 
@@ -76,145 +76,145 @@  discard block
 block discarded – undo
76 76
 	{
77 77
 		$search = $this->object->createSearch();
78 78
 		$search->setSlice(0, 1);
79
-		$items = $this->object->searchItems( $search );
79
+		$items = $this->object->searchItems($search);
80 80
 
81
-		if( ( $item = reset( $items ) ) === false ) {
82
-			throw new \RuntimeException( 'No item found' );
81
+		if (($item = reset($items)) === false) {
82
+			throw new \RuntimeException('No item found');
83 83
 		}
84 84
 
85
-		$item->setId( null );
86
-		$item->setDomain( 'unittest' );
87
-		$resultSaved = $this->object->saveItem( $item );
88
-		$itemSaved = $this->object->getItem( $item->getId() );
85
+		$item->setId(null);
86
+		$item->setDomain('unittest');
87
+		$resultSaved = $this->object->saveItem($item);
88
+		$itemSaved = $this->object->getItem($item->getId());
89 89
 
90 90
 		$itemExp = clone $itemSaved;
91
-		$itemExp->setDomain( 'unittest2' );
92
-		$resultUpd = $this->object->saveItem( $itemExp );
93
-		$itemUpd = $this->object->getItem( $itemExp->getId() );
94
-
95
-		$this->object->deleteItem( $itemSaved->getId() );
96
-
97
-
98
-		$this->assertTrue( $item->getId() !== null );
99
-		$this->assertEquals( $item->getId(), $itemSaved->getId() );
100
-		$this->assertEquals( $item->getSiteId(), $itemSaved->getSiteId() );
101
-		$this->assertEquals( $item->getParentId(), $itemSaved->getParentId() );
102
-		$this->assertEquals( $item->getType(), $itemSaved->getType() );
103
-		$this->assertEquals( $item->getRefId(), $itemSaved->getRefId() );
104
-		$this->assertEquals( $item->getDomain(), $itemSaved->getDomain() );
105
-		$this->assertEquals( $item->getDateStart(), $itemSaved->getDateStart() );
106
-		$this->assertEquals( $item->getDateEnd(), $itemSaved->getDateEnd() );
107
-		$this->assertEquals( $item->getPosition(), $itemSaved->getPosition() );
108
-		$this->assertEquals( $this->editor, $itemSaved->getEditor() );
91
+		$itemExp->setDomain('unittest2');
92
+		$resultUpd = $this->object->saveItem($itemExp);
93
+		$itemUpd = $this->object->getItem($itemExp->getId());
94
+
95
+		$this->object->deleteItem($itemSaved->getId());
96
+
97
+
98
+		$this->assertTrue($item->getId() !== null);
99
+		$this->assertEquals($item->getId(), $itemSaved->getId());
100
+		$this->assertEquals($item->getSiteId(), $itemSaved->getSiteId());
101
+		$this->assertEquals($item->getParentId(), $itemSaved->getParentId());
102
+		$this->assertEquals($item->getType(), $itemSaved->getType());
103
+		$this->assertEquals($item->getRefId(), $itemSaved->getRefId());
104
+		$this->assertEquals($item->getDomain(), $itemSaved->getDomain());
105
+		$this->assertEquals($item->getDateStart(), $itemSaved->getDateStart());
106
+		$this->assertEquals($item->getDateEnd(), $itemSaved->getDateEnd());
107
+		$this->assertEquals($item->getPosition(), $itemSaved->getPosition());
108
+		$this->assertEquals($this->editor, $itemSaved->getEditor());
109 109
 		$this->assertStringStartsWith(date('Y-m-d', time()), $itemSaved->getTimeCreated());
110 110
 		$this->assertStringStartsWith(date('Y-m-d', time()), $itemSaved->getTimeModified());
111 111
 
112
-		$this->assertEquals( $this->editor, $itemSaved->getEditor() );
113
-		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated() );
114
-		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified() );
112
+		$this->assertEquals($this->editor, $itemSaved->getEditor());
113
+		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated());
114
+		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified());
115 115
 
116
-		$this->assertEquals( $itemExp->getId(), $itemUpd->getId() );
117
-		$this->assertEquals( $itemExp->getSiteId(), $itemUpd->getSiteId() );
118
-		$this->assertEquals( $itemExp->getParentId(), $itemUpd->getParentId() );
119
-		$this->assertEquals( $itemExp->getType(), $itemUpd->getType() );
120
-		$this->assertEquals( $itemExp->getRefId(), $itemUpd->getRefId() );
121
-		$this->assertEquals( $itemExp->getDomain(), $itemUpd->getDomain() );
122
-		$this->assertEquals( $itemExp->getDateStart(), $itemUpd->getDateStart() );
123
-		$this->assertEquals( $itemExp->getDateEnd(), $itemUpd->getDateEnd() );
124
-		$this->assertEquals( $itemExp->getPosition(), $itemUpd->getPosition() );
116
+		$this->assertEquals($itemExp->getId(), $itemUpd->getId());
117
+		$this->assertEquals($itemExp->getSiteId(), $itemUpd->getSiteId());
118
+		$this->assertEquals($itemExp->getParentId(), $itemUpd->getParentId());
119
+		$this->assertEquals($itemExp->getType(), $itemUpd->getType());
120
+		$this->assertEquals($itemExp->getRefId(), $itemUpd->getRefId());
121
+		$this->assertEquals($itemExp->getDomain(), $itemUpd->getDomain());
122
+		$this->assertEquals($itemExp->getDateStart(), $itemUpd->getDateStart());
123
+		$this->assertEquals($itemExp->getDateEnd(), $itemUpd->getDateEnd());
124
+		$this->assertEquals($itemExp->getPosition(), $itemUpd->getPosition());
125 125
 
126
-		$this->assertEquals( $this->editor, $itemUpd->getEditor() );
127
-		$this->assertEquals( $itemExp->getTimeCreated(), $itemUpd->getTimeCreated() );
128
-		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemUpd->getTimeModified() );
126
+		$this->assertEquals($this->editor, $itemUpd->getEditor());
127
+		$this->assertEquals($itemExp->getTimeCreated(), $itemUpd->getTimeCreated());
128
+		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemUpd->getTimeModified());
129 129
 
130
-		$this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultSaved );
131
-		$this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultUpd );
130
+		$this->assertInstanceOf(\Aimeos\MShop\Common\Item\Iface::class, $resultSaved);
131
+		$this->assertInstanceOf(\Aimeos\MShop\Common\Item\Iface::class, $resultUpd);
132 132
 
133 133
 		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
134
-		$this->object->getItem( $itemSaved->getId() );
134
+		$this->object->getItem($itemSaved->getId());
135 135
 	}
136 136
 
137 137
 
138 138
 	public function testMoveItemLastToFront()
139 139
 	{
140 140
 		$listItems = $this->getListItems();
141
-		$this->assertGreaterThan( 1, count( $listItems ) );
141
+		$this->assertGreaterThan(1, count($listItems));
142 142
 
143
-		if( ( $first = reset( $listItems ) ) === false ) {
144
-			throw new \RuntimeException( 'No first customer list item' );
143
+		if (($first = reset($listItems)) === false) {
144
+			throw new \RuntimeException('No first customer list item');
145 145
 		}
146 146
 
147
-		if( ( $last = end( $listItems ) ) === false ) {
148
-			throw new \RuntimeException( 'No last customer list item' );
147
+		if (($last = end($listItems)) === false) {
148
+			throw new \RuntimeException('No last customer list item');
149 149
 		}
150 150
 
151
-		$this->object->moveItem( $last->getId(), $first->getId() );
151
+		$this->object->moveItem($last->getId(), $first->getId());
152 152
 
153
-		$newFirst = $this->object->getItem( $last->getId() );
154
-		$newSecond = $this->object->getItem( $first->getId() );
153
+		$newFirst = $this->object->getItem($last->getId());
154
+		$newSecond = $this->object->getItem($first->getId());
155 155
 
156
-		$this->object->moveItem( $last->getId() );
156
+		$this->object->moveItem($last->getId());
157 157
 
158
-		$this->assertEquals( 1, $newFirst->getPosition() );
159
-		$this->assertEquals( 2, $newSecond->getPosition() );
158
+		$this->assertEquals(1, $newFirst->getPosition());
159
+		$this->assertEquals(2, $newSecond->getPosition());
160 160
 	}
161 161
 
162 162
 
163 163
 	public function testMoveItemFirstToLast()
164 164
 	{
165 165
 		$listItems = $this->getListItems();
166
-		$this->assertGreaterThan( 1, count( $listItems ) );
166
+		$this->assertGreaterThan(1, count($listItems));
167 167
 
168
-		if( ( $first = reset( $listItems ) ) === false ) {
169
-			throw new \RuntimeException( 'No first customer list item' );
168
+		if (($first = reset($listItems)) === false) {
169
+			throw new \RuntimeException('No first customer list item');
170 170
 		}
171 171
 
172
-		if( ( $second = next( $listItems ) ) === false ) {
173
-			throw new \RuntimeException( 'No second customer list item' );
172
+		if (($second = next($listItems)) === false) {
173
+			throw new \RuntimeException('No second customer list item');
174 174
 		}
175 175
 
176
-		if( ( $last = end( $listItems ) ) === false ) {
177
-			throw new \RuntimeException( 'No last customer list item' );
176
+		if (($last = end($listItems)) === false) {
177
+			throw new \RuntimeException('No last customer list item');
178 178
 		}
179 179
 
180
-		$this->object->moveItem( $first->getId() );
180
+		$this->object->moveItem($first->getId());
181 181
 
182
-		$newBefore = $this->object->getItem( $last->getId() );
183
-		$newLast = $this->object->getItem( $first->getId() );
182
+		$newBefore = $this->object->getItem($last->getId());
183
+		$newLast = $this->object->getItem($first->getId());
184 184
 
185
-		$this->object->moveItem( $first->getId(), $second->getId() );
185
+		$this->object->moveItem($first->getId(), $second->getId());
186 186
 
187
-		$this->assertEquals( $last->getPosition() - 1, $newBefore->getPosition() );
188
-		$this->assertEquals( $last->getPosition(), $newLast->getPosition() );
187
+		$this->assertEquals($last->getPosition() - 1, $newBefore->getPosition());
188
+		$this->assertEquals($last->getPosition(), $newLast->getPosition());
189 189
 	}
190 190
 
191 191
 
192 192
 	public function testMoveItemFirstUp()
193 193
 	{
194 194
 		$listItems = $this->getListItems();
195
-		$this->assertGreaterThan( 1, count( $listItems ) );
195
+		$this->assertGreaterThan(1, count($listItems));
196 196
 
197
-		if( ( $first = reset( $listItems ) ) === false ) {
198
-			throw new \RuntimeException( 'No first customer list item' );
197
+		if (($first = reset($listItems)) === false) {
198
+			throw new \RuntimeException('No first customer list item');
199 199
 		}
200 200
 
201
-		if( ( $second = next( $listItems ) ) === false ) {
202
-			throw new \RuntimeException( 'No second customer list item' );
201
+		if (($second = next($listItems)) === false) {
202
+			throw new \RuntimeException('No second customer list item');
203 203
 		}
204 204
 
205
-		if( ( $last = end( $listItems ) ) === false ) {
206
-			throw new \RuntimeException( 'No last customer list item' );
205
+		if (($last = end($listItems)) === false) {
206
+			throw new \RuntimeException('No last customer list item');
207 207
 		}
208 208
 
209
-		$this->object->moveItem( $first->getId(), $last->getId() );
209
+		$this->object->moveItem($first->getId(), $last->getId());
210 210
 
211
-		$newLast = $this->object->getItem( $last->getId() );
212
-		$newUp = $this->object->getItem( $first->getId() );
211
+		$newLast = $this->object->getItem($last->getId());
212
+		$newUp = $this->object->getItem($first->getId());
213 213
 
214
-		$this->object->moveItem( $first->getId(), $second->getId() );
214
+		$this->object->moveItem($first->getId(), $second->getId());
215 215
 
216
-		$this->assertEquals( $last->getPosition() - 1, $newUp->getPosition() );
217
-		$this->assertEquals( $last->getPosition(), $newLast->getPosition() );
216
+		$this->assertEquals($last->getPosition() - 1, $newUp->getPosition());
217
+		$this->assertEquals($last->getPosition(), $newLast->getPosition());
218 218
 	}
219 219
 
220 220
 
@@ -224,29 +224,29 @@  discard block
 block discarded – undo
224 224
 		$search = $this->object->createSearch();
225 225
 
226 226
 		$expr = [];
227
-		$expr[] = $search->compare( '!=', 'customer.lists.id', null );
228
-		$expr[] = $search->compare( '!=', 'customer.lists.siteid', null );
229
-		$expr[] = $search->compare( '>', 'customer.lists.parentid', 0 );
230
-		$expr[] = $search->compare( '==', 'customer.lists.domain', 'text' );
231
-		$expr[] = $search->compare( '==', 'customer.lists.type', 'default' );
232
-		$expr[] = $search->compare( '>', 'customer.lists.refid', '' );
233
-		$expr[] = $search->compare( '==', 'customer.lists.datestart', '2010-01-01 00:00:00' );
234
-		$expr[] = $search->compare( '==', 'customer.lists.dateend', '2100-01-01 00:00:00' );
235
-		$expr[] = $search->compare( '!=', 'customer.lists.config', null );
236
-		$expr[] = $search->compare( '>', 'customer.lists.position', 1 );
237
-		$expr[] = $search->compare( '==', 'customer.lists.status', 1 );
238
-		$expr[] = $search->compare( '>=', 'customer.lists.mtime', '1970-01-01 00:00:00' );
239
-		$expr[] = $search->compare( '>=', 'customer.lists.ctime', '1970-01-01 00:00:00' );
240
-		$expr[] = $search->compare( '==', 'customer.lists.editor', $this->editor );
241
-
242
-		$search->setConditions( $search->combine( '&&', $expr ) );
227
+		$expr[] = $search->compare('!=', 'customer.lists.id', null);
228
+		$expr[] = $search->compare('!=', 'customer.lists.siteid', null);
229
+		$expr[] = $search->compare('>', 'customer.lists.parentid', 0);
230
+		$expr[] = $search->compare('==', 'customer.lists.domain', 'text');
231
+		$expr[] = $search->compare('==', 'customer.lists.type', 'default');
232
+		$expr[] = $search->compare('>', 'customer.lists.refid', '');
233
+		$expr[] = $search->compare('==', 'customer.lists.datestart', '2010-01-01 00:00:00');
234
+		$expr[] = $search->compare('==', 'customer.lists.dateend', '2100-01-01 00:00:00');
235
+		$expr[] = $search->compare('!=', 'customer.lists.config', null);
236
+		$expr[] = $search->compare('>', 'customer.lists.position', 1);
237
+		$expr[] = $search->compare('==', 'customer.lists.status', 1);
238
+		$expr[] = $search->compare('>=', 'customer.lists.mtime', '1970-01-01 00:00:00');
239
+		$expr[] = $search->compare('>=', 'customer.lists.ctime', '1970-01-01 00:00:00');
240
+		$expr[] = $search->compare('==', 'customer.lists.editor', $this->editor);
241
+
242
+		$search->setConditions($search->combine('&&', $expr));
243 243
 		$search->setSlice(0, 1);
244
-		$results = $this->object->searchItems( $search, [], $total );
245
-		$this->assertEquals( 1, count( $results ) );
246
-		$this->assertEquals( 2, $total );
244
+		$results = $this->object->searchItems($search, [], $total);
245
+		$this->assertEquals(1, count($results));
246
+		$this->assertEquals(2, $total);
247 247
 
248
-		foreach($results as $itemId => $item) {
249
-			$this->assertEquals( $itemId, $item->getId() );
248
+		foreach ($results as $itemId => $item) {
249
+			$this->assertEquals($itemId, $item->getId());
250 250
 		}
251 251
 	}
252 252
 
@@ -254,8 +254,8 @@  discard block
 block discarded – undo
254 254
 	public function testSearchItemsNoCriteria()
255 255
 	{
256 256
 		$search = $this->object->createSearch();
257
-		$search->setConditions( $search->compare( '==', 'customer.lists.editor', $this->editor ) );
258
-		$this->assertEquals( 4, count( $this->object->searchItems($search) ) );
257
+		$search->setConditions($search->compare('==', 'customer.lists.editor', $this->editor));
258
+		$this->assertEquals(4, count($this->object->searchItems($search)));
259 259
 	}
260 260
 
261 261
 
@@ -263,48 +263,48 @@  discard block
 block discarded – undo
263 263
 	{
264 264
 		$search = $this->object->createSearch(true);
265 265
 		$conditions = array(
266
-			$search->compare( '==', 'customer.lists.editor', $this->editor ),
266
+			$search->compare('==', 'customer.lists.editor', $this->editor),
267 267
 			$search->getConditions()
268 268
 		);
269
-		$search->setConditions( $search->combine( '&&', $conditions ) );
270
-		$this->assertEquals( 4, count( $this->object->searchItems($search) ) );
269
+		$search->setConditions($search->combine('&&', $conditions));
270
+		$this->assertEquals(4, count($this->object->searchItems($search)));
271 271
 	}
272 272
 
273 273
 
274 274
 	public function testGetSubManager()
275 275
 	{
276
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type') );
277
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Standard') );
276
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type'));
277
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Standard'));
278 278
 
279
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
280
-		$this->object->getSubManager( 'unknown' );
279
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
280
+		$this->object->getSubManager('unknown');
281 281
 	}
282 282
 
283 283
 
284 284
 	protected function getListItems()
285 285
 	{
286
-		$manager = \Aimeos\MShop\Customer\Manager\Factory::create( $this->context, 'Laravel' );
286
+		$manager = \Aimeos\MShop\Customer\Manager\Factory::create($this->context, 'Laravel');
287 287
 
288 288
 		$search = $manager->createSearch();
289
-		$search->setConditions( $search->compare( '==', 'customer.code', 'UTC003' ) );
290
-		$search->setSlice( 0, 1 );
289
+		$search->setConditions($search->compare('==', 'customer.code', 'UTC003'));
290
+		$search->setSlice(0, 1);
291 291
 
292
-		$results = $manager->searchItems( $search );
292
+		$results = $manager->searchItems($search);
293 293
 
294
-		if( ( $item = reset( $results ) ) === false ) {
295
-			throw new \RuntimeException( 'No customer item found' );
294
+		if (($item = reset($results)) === false) {
295
+			throw new \RuntimeException('No customer item found');
296 296
 		}
297 297
 
298 298
 		$search = $this->object->createSearch();
299 299
 		$expr = array(
300
-			$search->compare( '==', 'customer.lists.parentid', $item->getId() ),
301
-			$search->compare( '==', 'customer.lists.domain', 'text' ),
302
-			$search->compare( '==', 'customer.lists.editor', $this->editor ),
303
-			$search->compare( '==', 'customer.lists.type', 'default' ),
300
+			$search->compare('==', 'customer.lists.parentid', $item->getId()),
301
+			$search->compare('==', 'customer.lists.domain', 'text'),
302
+			$search->compare('==', 'customer.lists.editor', $this->editor),
303
+			$search->compare('==', 'customer.lists.type', 'default'),
304 304
 		);
305
-		$search->setConditions( $search->combine( '&&', $expr ) );
306
-		$search->setSortations( array( $search->sort( '+', 'customer.lists.position' ) ) );
305
+		$search->setConditions($search->combine('&&', $expr));
306
+		$search->setSortations(array($search->sort('+', 'customer.lists.position')));
307 307
 
308
-		return $this->object->searchItems( $search );
308
+		return $this->object->searchItems($search);
309 309
 	}
310 310
 }
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Lists/Type/LaravelTest.php 1 patch
Spacing   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -16,29 +16,29 @@  discard block
 block discarded – undo
16 16
 	protected function setUp()
17 17
 	{
18 18
 		$this->editor = \TestHelper::getContext()->getEditor();
19
-		$manager = \Aimeos\MShop\Customer\Manager\Factory::create( \TestHelper::getContext(), 'Laravel' );
19
+		$manager = \Aimeos\MShop\Customer\Manager\Factory::create(\TestHelper::getContext(), 'Laravel');
20 20
 
21
-		$listManager = $manager->getSubManager( 'lists', 'Laravel' );
22
-		$this->object = $listManager->getSubManager( 'type', 'Laravel' );
21
+		$listManager = $manager->getSubManager('lists', 'Laravel');
22
+		$this->object = $listManager->getSubManager('type', 'Laravel');
23 23
 	}
24 24
 
25 25
 
26 26
 	protected function tearDown()
27 27
 	{
28
-		unset( $this->object );
28
+		unset($this->object);
29 29
 	}
30 30
 
31 31
 
32 32
 	public function testCleanup()
33 33
 	{
34
-		$this->object->cleanup( array( -1 ) );
34
+		$this->object->cleanup(array( -1 ));
35 35
 	}
36 36
 
37 37
 
38 38
 	public function testCreateItem()
39 39
 	{
40 40
 		$item = $this->object->createItem();
41
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Item\\Type\\Iface', $item );
41
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Item\\Type\\Iface', $item);
42 42
 	}
43 43
 
44 44
 
@@ -48,18 +48,18 @@  discard block
 block discarded – undo
48 48
 		$search->setSlice(0, 1);
49 49
 		$results = $this->object->searchItems($search);
50 50
 
51
-		if( ( $expected = reset($results) ) === false ) {
52
-			throw new \RuntimeException( 'No list type item found' );
51
+		if (($expected = reset($results)) === false) {
52
+			throw new \RuntimeException('No list type item found');
53 53
 		}
54 54
 
55
-		$this->assertEquals( $expected, $this->object->getItem( $expected->getId() ) );
55
+		$this->assertEquals($expected, $this->object->getItem($expected->getId()));
56 56
 	}
57 57
 
58 58
 
59 59
 	public function testGetSubManager()
60 60
 	{
61
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
62
-		$this->object->getSubManager( 'unknown' );
61
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
62
+		$this->object->getSubManager('unknown');
63 63
 	}
64 64
 
65 65
 
@@ -69,51 +69,51 @@  discard block
 block discarded – undo
69 69
 		$search->setSlice(0, 1);
70 70
 		$results = $this->object->searchItems($search);
71 71
 
72
-		if( ( $item = reset($results) ) === false ) {
73
-			throw new \RuntimeException( 'No type item found' );
72
+		if (($item = reset($results)) === false) {
73
+			throw new \RuntimeException('No type item found');
74 74
 		}
75 75
 
76 76
 		$item->setId(null);
77
-		$item->setCode( 'unitTestInit' );
78
-		$resultSaved = $this->object->saveItem( $item );
79
-		$itemSaved = $this->object->getItem( $item->getId() );
77
+		$item->setCode('unitTestInit');
78
+		$resultSaved = $this->object->saveItem($item);
79
+		$itemSaved = $this->object->getItem($item->getId());
80 80
 
81 81
 		$itemExp = clone $itemSaved;
82
-		$itemExp->setCode( 'unitTestSave' );
83
-		$resultUpd = $this->object->saveItem( $itemExp );
84
-		$itemUpd = $this->object->getItem( $itemExp->getId() );
82
+		$itemExp->setCode('unitTestSave');
83
+		$resultUpd = $this->object->saveItem($itemExp);
84
+		$itemUpd = $this->object->getItem($itemExp->getId());
85 85
 
86
-		$this->object->deleteItem( $itemSaved->getId() );
86
+		$this->object->deleteItem($itemSaved->getId());
87 87
 
88 88
 
89
-		$this->assertTrue( $item->getId() !== null );
90
-		$this->assertEquals( $item->getId(), $itemSaved->getId() );
91
-		$this->assertEquals( $item->getSiteId(), $itemSaved->getSiteId() );
92
-		$this->assertEquals( $item->getCode(), $itemSaved->getCode() );
93
-		$this->assertEquals( $item->getDomain(), $itemSaved->getDomain() );
94
-		$this->assertEquals( $item->getLabel(), $itemSaved->getLabel() );
95
-		$this->assertEquals( $item->getStatus(), $itemSaved->getStatus() );
89
+		$this->assertTrue($item->getId() !== null);
90
+		$this->assertEquals($item->getId(), $itemSaved->getId());
91
+		$this->assertEquals($item->getSiteId(), $itemSaved->getSiteId());
92
+		$this->assertEquals($item->getCode(), $itemSaved->getCode());
93
+		$this->assertEquals($item->getDomain(), $itemSaved->getDomain());
94
+		$this->assertEquals($item->getLabel(), $itemSaved->getLabel());
95
+		$this->assertEquals($item->getStatus(), $itemSaved->getStatus());
96 96
 
97
-		$this->assertEquals( $this->editor, $itemSaved->getEditor() );
98
-		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated() );
99
-		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified() );
97
+		$this->assertEquals($this->editor, $itemSaved->getEditor());
98
+		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated());
99
+		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified());
100 100
 
101
-		$this->assertEquals( $itemExp->getId(), $itemUpd->getId() );
102
-		$this->assertEquals( $itemExp->getSiteId(), $itemUpd->getSiteId() );
103
-		$this->assertEquals( $itemExp->getCode(), $itemUpd->getCode() );
104
-		$this->assertEquals( $itemExp->getDomain(), $itemUpd->getDomain() );
105
-		$this->assertEquals( $itemExp->getLabel(), $itemUpd->getLabel() );
106
-		$this->assertEquals( $itemExp->getStatus(), $itemUpd->getStatus() );
101
+		$this->assertEquals($itemExp->getId(), $itemUpd->getId());
102
+		$this->assertEquals($itemExp->getSiteId(), $itemUpd->getSiteId());
103
+		$this->assertEquals($itemExp->getCode(), $itemUpd->getCode());
104
+		$this->assertEquals($itemExp->getDomain(), $itemUpd->getDomain());
105
+		$this->assertEquals($itemExp->getLabel(), $itemUpd->getLabel());
106
+		$this->assertEquals($itemExp->getStatus(), $itemUpd->getStatus());
107 107
 
108
-		$this->assertEquals( $this->editor, $itemUpd->getEditor() );
109
-		$this->assertEquals( $itemExp->getTimeCreated(), $itemUpd->getTimeCreated() );
110
-		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemUpd->getTimeModified() );
108
+		$this->assertEquals($this->editor, $itemUpd->getEditor());
109
+		$this->assertEquals($itemExp->getTimeCreated(), $itemUpd->getTimeCreated());
110
+		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemUpd->getTimeModified());
111 111
 
112
-		$this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultSaved );
113
-		$this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultUpd );
112
+		$this->assertInstanceOf(\Aimeos\MShop\Common\Item\Iface::class, $resultSaved);
113
+		$this->assertInstanceOf(\Aimeos\MShop\Common\Item\Iface::class, $resultUpd);
114 114
 
115 115
 		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
116
-		$this->object->getItem( $itemSaved->getId() );
116
+		$this->object->getItem($itemSaved->getId());
117 117
 	}
118 118
 
119 119
 
@@ -123,26 +123,26 @@  discard block
 block discarded – undo
123 123
 		$search = $this->object->createSearch();
124 124
 
125 125
 		$expr = [];
126
-		$expr[] = $search->compare( '!=', 'customer.lists.type.id', 0 );
127
-		$expr[] = $search->compare( '!=', 'customer.lists.type.siteid', null );
128
-		$expr[] = $search->compare( '==', 'customer.lists.type.code', 'default' );
129
-		$expr[] = $search->compare( '==', 'customer.lists.type.domain', 'text' );
130
-		$expr[] = $search->compare( '==', 'customer.lists.type.label', 'Standard' );
131
-		$expr[] = $search->compare( '>=', 'customer.lists.type.position', 0 );
132
-		$expr[] = $search->compare( '==', 'customer.lists.type.status', 1 );
133
-		$expr[] = $search->compare( '>=', 'customer.lists.type.mtime', '1970-01-01 00:00:00' );
134
-		$expr[] = $search->compare( '>=', 'customer.lists.type.ctime', '1970-01-01 00:00:00' );
135
-		$expr[] = $search->compare( '==', 'customer.lists.type.editor', $this->editor );
136
-
137
-		$search->setConditions( $search->combine( '&&', $expr ) );
126
+		$expr[] = $search->compare('!=', 'customer.lists.type.id', 0);
127
+		$expr[] = $search->compare('!=', 'customer.lists.type.siteid', null);
128
+		$expr[] = $search->compare('==', 'customer.lists.type.code', 'default');
129
+		$expr[] = $search->compare('==', 'customer.lists.type.domain', 'text');
130
+		$expr[] = $search->compare('==', 'customer.lists.type.label', 'Standard');
131
+		$expr[] = $search->compare('>=', 'customer.lists.type.position', 0);
132
+		$expr[] = $search->compare('==', 'customer.lists.type.status', 1);
133
+		$expr[] = $search->compare('>=', 'customer.lists.type.mtime', '1970-01-01 00:00:00');
134
+		$expr[] = $search->compare('>=', 'customer.lists.type.ctime', '1970-01-01 00:00:00');
135
+		$expr[] = $search->compare('==', 'customer.lists.type.editor', $this->editor);
136
+
137
+		$search->setConditions($search->combine('&&', $expr));
138 138
 		$search->setSlice(0, 1);
139 139
 
140
-		$results = $this->object->searchItems( $search, [], $total );
141
-		$this->assertEquals( 1, count( $results ) );
142
-		$this->assertEquals( 1, $total );
140
+		$results = $this->object->searchItems($search, [], $total);
141
+		$this->assertEquals(1, count($results));
142
+		$this->assertEquals(1, $total);
143 143
 
144
-		foreach($results as $itemId => $item) {
145
-			$this->assertEquals( $itemId, $item->getId() );
144
+		foreach ($results as $itemId => $item) {
145
+			$this->assertEquals($itemId, $item->getId());
146 146
 		}
147 147
 	}
148 148
 
Please login to merge, or discard this patch.