Completed
Push — master ( 2617dd...bacbe2 )
by Aimeos
01:43
created
lib/custom/src/MShop/Customer/Manager/Lists/Ezpublish.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 		'customer.lists.id'=> array(
26 26
 			'code'=>'customer.lists.id',
27 27
 			'internalcode'=>'ezuli."id"',
28
-			'internaldeps' => array( 'LEFT JOIN "ezuser_list" AS ezuli ON ( ezu."id" = ezuli."parentid" )' ),
28
+			'internaldeps' => array('LEFT JOIN "ezuser_list" AS ezuli ON ( ezu."id" = ezuli."parentid" )'),
29 29
 			'label'=>'Customer list ID',
30 30
 			'type'=> 'integer',
31 31
 			'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_INT,
@@ -132,14 +132,14 @@  discard block
 block discarded – undo
132 132
 	 *
133 133
 	 * @param array $siteids List of IDs for sites whose entries should be deleted
134 134
 	 */
135
-	public function cleanup( array $siteids )
135
+	public function cleanup(array $siteids)
136 136
 	{
137 137
 		$path = 'mshop/customer/manager/lists/submanagers';
138
-		foreach( $this->getContext()->getConfig()->get( $path, [] ) as $domain ) {
139
-			$this->getObject()->getSubManager( $domain )->cleanup( $siteids );
138
+		foreach ($this->getContext()->getConfig()->get($path, []) as $domain) {
139
+			$this->getObject()->getSubManager($domain)->cleanup($siteids);
140 140
 		}
141 141
 
142
-		$this->cleanupBase( $siteids, $this->getConfigPath() . 'delete' );
142
+		$this->cleanupBase($siteids, $this->getConfigPath().'delete');
143 143
 	}
144 144
 
145 145
 
@@ -149,11 +149,11 @@  discard block
 block discarded – undo
149 149
 	 * @param boolean $withsub Return also attributes of sub-managers if true
150 150
 	 * @return array Returns a list of attribtes implementing \Aimeos\MW\Criteria\Attribute\Iface
151 151
 	 */
152
-	public function getSearchAttributes( $withsub = true )
152
+	public function getSearchAttributes($withsub = true)
153 153
 	{
154 154
 		$path = 'mshop/customer/manager/lists/submanagers';
155 155
 
156
-		return $this->getSearchAttributesBase( $this->getSearchConfig(), $path, [], $withsub );
156
+		return $this->getSearchAttributesBase($this->getSearchConfig(), $path, [], $withsub);
157 157
 	}
158 158
 
159 159
 
@@ -164,9 +164,9 @@  discard block
 block discarded – undo
164 164
 	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
165 165
 	 * @return mixed Manager for different extensions, e.g stock, tags, locations, etc.
166 166
 	 */
167
-	public function getSubManager( $manager, $name = null )
167
+	public function getSubManager($manager, $name = null)
168 168
 	{
169
-		return $this->getSubManagerBase( 'customer', 'lists/' . $manager, ( $name === null ? 'Ezpublish' : $name ) );
169
+		return $this->getSubManagerBase('customer', 'lists/'.$manager, ($name === null ? 'Ezpublish' : $name));
170 170
 	}
171 171
 
172 172
 
@@ -176,15 +176,15 @@  discard block
 block discarded – undo
176 176
 	 * @param \Aimeos\MShop\Common\Item\Lists\Iface $item List item object which should be saved
177 177
 	 * @param boolean $fetch True if the new ID should be returned in the item
178 178
 	 */
179
-	public function saveItem( \Aimeos\MShop\Common\Item\Iface $item, $fetch = true )
179
+	public function saveItem(\Aimeos\MShop\Common\Item\Iface $item, $fetch = true)
180 180
 	{
181
-		self::checkClass( '\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $item );
181
+		self::checkClass('\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $item);
182 182
 
183
-		if( $item->getDomain() === 'customer/group' ) {
184
-			throw new \Aimeos\MShop\Customer\Exception( sprintf( 'Adding groups to customers is not supported, please use the eZ Publish backend' ) );
183
+		if ($item->getDomain() === 'customer/group') {
184
+			throw new \Aimeos\MShop\Customer\Exception(sprintf('Adding groups to customers is not supported, please use the eZ Publish backend'));
185 185
 		}
186 186
 
187
-		parent::saveItem( $item, $fetch );
187
+		parent::saveItem($item, $fetch);
188 188
 	}
189 189
 
190 190
 
Please login to merge, or discard this patch.
lib/custom/src/MShop/Customer/Manager/Lists/Type/Ezpublish.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
 	 *
96 96
 	 * @param array $siteids List of IDs for sites whose entries should be deleted
97 97
 	 */
98
-	public function cleanup( array $siteids )
98
+	public function cleanup(array $siteids)
99 99
 	{
100 100
 		$path = 'mshop/customer/manager/lists/type/submanagers';
101
-		foreach( $this->getContext()->getConfig()->get( $path, [] ) as $domain ) {
102
-			$this->getObject()->getSubManager( $domain )->cleanup( $siteids );
101
+		foreach ($this->getContext()->getConfig()->get($path, []) as $domain) {
102
+			$this->getObject()->getSubManager($domain)->cleanup($siteids);
103 103
 		}
104 104
 
105
-		$this->cleanupBase( $siteids, $this->getConfigPath() . 'delete' );
105
+		$this->cleanupBase($siteids, $this->getConfigPath().'delete');
106 106
 	}
107 107
 
108 108
 
@@ -112,11 +112,11 @@  discard block
 block discarded – undo
112 112
 	 * @param boolean $withsub Return also attributes of sub-managers if true
113 113
 	 * @return array Returns a list of attribtes implementing \Aimeos\MW\Criteria\Attribute\Iface
114 114
 	 */
115
-	public function getSearchAttributes( $withsub = true )
115
+	public function getSearchAttributes($withsub = true)
116 116
 	{
117 117
 		$path = 'mshop/customer/manager/lists/type/submanagers';
118 118
 
119
-		return $this->getSearchAttributesBase( $this->getSearchConfig(), $path, [], $withsub );
119
+		return $this->getSearchAttributesBase($this->getSearchConfig(), $path, [], $withsub);
120 120
 	}
121 121
 
122 122
 
@@ -127,9 +127,9 @@  discard block
 block discarded – undo
127 127
 	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
128 128
 	 * @return mixed Manager for different extensions, e.g stock, tags, locations, etc.
129 129
 	 */
130
-	public function getSubManager( $manager, $name = null )
130
+	public function getSubManager($manager, $name = null)
131 131
 	{
132
-		return $this->getSubManagerBase( 'customer', 'lists/type/' . $manager, ( $name === null ? 'Ezpublish' : $name ) );
132
+		return $this->getSubManagerBase('customer', 'lists/type/'.$manager, ($name === null ? 'Ezpublish' : $name));
133 133
 	}
134 134
 
135 135
 
Please login to merge, or discard this patch.
lib/custom/src/MShop/Customer/Manager/Property/Ezpublish.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -98,14 +98,14 @@  discard block
 block discarded – undo
98 98
 	 *
99 99
 	 * @param integer[] $siteids List of IDs for sites whose entries should be deleted
100 100
 	 */
101
-	public function cleanup( array $siteids )
101
+	public function cleanup(array $siteids)
102 102
 	{
103 103
 		$path = 'mshop/customer/manager/property/submanagers';
104
-		foreach( $this->getContext()->getConfig()->get( $path, [] ) as $domain ) {
105
-			$this->getObject()->getSubManager( $domain )->cleanup( $siteids );
104
+		foreach ($this->getContext()->getConfig()->get($path, []) as $domain) {
105
+			$this->getObject()->getSubManager($domain)->cleanup($siteids);
106 106
 		}
107 107
 
108
-		$this->cleanupBase( $siteids, 'mshop/customer/manager/property/ezpublish/delete' );
108
+		$this->cleanupBase($siteids, 'mshop/customer/manager/property/ezpublish/delete');
109 109
 	}
110 110
 
111 111
 
@@ -115,11 +115,11 @@  discard block
 block discarded – undo
115 115
 	 * @param boolean $withsub Return also attributes of sub-managers if true
116 116
 	 * @return array Returns a list of attribtes implementing \Aimeos\MW\Criteria\Attribute\Iface
117 117
 	 */
118
-	public function getSearchAttributes( $withsub = true )
118
+	public function getSearchAttributes($withsub = true)
119 119
 	{
120 120
 		$path = 'mshop/customer/manager/property/submanagers';
121 121
 
122
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, [], $withsub );
122
+		return $this->getSearchAttributesBase($this->searchConfig, $path, [], $withsub);
123 123
 	}
124 124
 
125 125
 
@@ -131,9 +131,9 @@  discard block
 block discarded – undo
131 131
 	 * configuration (or Default) if null
132 132
 	 * @return \Aimeos\MShop\Common\Manager\Iface Manager for different extensions, e.g property types, property lists etc.
133 133
 	 */
134
-	public function getSubManager( $manager, $name = null )
134
+	public function getSubManager($manager, $name = null)
135 135
 	{
136
-		return $this->getSubManagerBase( 'customer', 'property/' . $manager, ( $name === null ? 'Ezpublish' : $name ) );
136
+		return $this->getSubManagerBase('customer', 'property/'.$manager, ($name === null ? 'Ezpublish' : $name));
137 137
 	}
138 138
 
139 139
 
Please login to merge, or discard this patch.
lib/custom/src/MShop/Customer/Manager/Property/Type/Ezpublish.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -104,14 +104,14 @@  discard block
 block discarded – undo
104 104
 	 *
105 105
 	 * @param array $siteids List of IDs for sites whose entries should be deleted
106 106
 	 */
107
-	public function cleanup( array $siteids )
107
+	public function cleanup(array $siteids)
108 108
 	{
109 109
 		$path = 'mshop/customer/manager/property/type/submanagers';
110
-		foreach( $this->getContext()->getConfig()->get( $path, [] ) as $domain ) {
111
-			$this->getObject()->getSubManager( $domain )->cleanup( $siteids );
110
+		foreach ($this->getContext()->getConfig()->get($path, []) as $domain) {
111
+			$this->getObject()->getSubManager($domain)->cleanup($siteids);
112 112
 		}
113 113
 
114
-		$this->cleanupBase( $siteids, 'mshop/customer/manager/property/type/ezpublish/delete' );
114
+		$this->cleanupBase($siteids, 'mshop/customer/manager/property/type/ezpublish/delete');
115 115
 	}
116 116
 
117 117
 
@@ -121,11 +121,11 @@  discard block
 block discarded – undo
121 121
 	 * @param boolean $withsub Return also attributes of sub-managers if true
122 122
 	 * @return array Returns a list of attribtes implementing \Aimeos\MW\Criteria\Attribute\Iface
123 123
 	 */
124
-	public function getSearchAttributes( $withsub = true )
124
+	public function getSearchAttributes($withsub = true)
125 125
 	{
126 126
 		$path = 'mshop/customer/manager/property/type/submanagers';
127 127
 
128
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, [], $withsub );
128
+		return $this->getSearchAttributesBase($this->searchConfig, $path, [], $withsub);
129 129
 	}
130 130
 
131 131
 
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
 	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
137 137
 	 * @return \Aimeos\MShop\Common\Manager\Iface Manager for different extensions, e.g types, lists etc.
138 138
 	 */
139
-	public function getSubManager( $manager, $name = null )
139
+	public function getSubManager($manager, $name = null)
140 140
 	{
141
-		return $this->getSubManagerBase( 'customer', 'property/type/' . $manager, ( $name === null ? 'Ezpublish' : $name ) );
141
+		return $this->getSubManagerBase('customer', 'property/type/'.$manager, ($name === null ? 'Ezpublish' : $name));
142 142
 	}
143 143
 
144 144
 
Please login to merge, or discard this patch.
lib/custom/setup/default/schema/customer.php 1 patch
Spacing   +120 added lines, -120 removed lines patch added patch discarded remove patch
@@ -8,163 +8,163 @@
 block discarded – undo
8 8
 
9 9
 return array(
10 10
 	'table' => array(
11
-		'ezuser' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
11
+		'ezuser' => function(\Doctrine\DBAL\Schema\Schema $schema) {
12 12
 
13
-			$table = $schema->createTable( 'ezuser' );
13
+			$table = $schema->createTable('ezuser');
14 14
 
15
-			$table->addColumn( 'contentobject_id', 'integer', [] );
16
-			$table->addColumn( 'email', 'string', array( 'length' => 150 ) );
17
-			$table->addColumn( 'login', 'string', array( 'length' => 150 ) );
18
-			$table->addColumn( 'login_normalized', 'string', array( 'length' => 150 ) );
19
-			$table->addColumn( 'password_hash', 'string', array( 'length' => 50 ) );
20
-			$table->addColumn( 'password_hash_type', 'integer', array( 'default' => 1 ) );
15
+			$table->addColumn('contentobject_id', 'integer', []);
16
+			$table->addColumn('email', 'string', array('length' => 150));
17
+			$table->addColumn('login', 'string', array('length' => 150));
18
+			$table->addColumn('login_normalized', 'string', array('length' => 150));
19
+			$table->addColumn('password_hash', 'string', array('length' => 50));
20
+			$table->addColumn('password_hash_type', 'integer', array('default' => 1));
21 21
 
22
-			$table->setPrimaryKey( array( 'contentobject_id' ) );
23
-			$table->addUniqueIndex( array( 'login_normalized' ), 'ezuser_login' );
22
+			$table->setPrimaryKey(array('contentobject_id'));
23
+			$table->addUniqueIndex(array('login_normalized'), 'ezuser_login');
24 24
 
25 25
 			return $schema;
26 26
 		},
27 27
 
28
-		'ezuser_address' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
29
-
30
-			$table = $schema->createTable( 'ezuser_address' );
31
-
32
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
33
-			$table->addColumn( 'siteid', 'integer', [] );
34
-			$table->addColumn( 'parentid', 'integer', [] );
35
-			$table->addColumn( 'company', 'string', array( 'length' => 100 ) );
36
-			$table->addColumn( 'vatid', 'string', array( 'length' => 32 ) );
37
-			$table->addColumn( 'salutation', 'string', array( 'length' => 8 ) );
38
-			$table->addColumn( 'title', 'string', array( 'length' => 64 ) );
39
-			$table->addColumn( 'firstname', 'string', array( 'length' => 64 ) );
40
-			$table->addColumn( 'lastname', 'string', array( 'length' => 64 ) );
41
-			$table->addColumn( 'address1', 'string', array( 'length' => 255 ) );
42
-			$table->addColumn( 'address2', 'string', array( 'length' => 255 ) );
43
-			$table->addColumn( 'address3', 'string', array( 'length' => 255 ) );
44
-			$table->addColumn( 'postal', 'string', array( 'length' => 16 ) );
45
-			$table->addColumn( 'city', 'string', array( 'length' => 255 ) );
46
-			$table->addColumn( 'state', 'string', array( 'length' => 255 ) );
47
-			$table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) );
48
-			$table->addColumn( 'countryid', 'string', array( 'length' => 2, 'notnull' => false, 'fixed' => true ) );
49
-			$table->addColumn( 'telephone', 'string', array( 'length' => 32 ) );
50
-			$table->addColumn( 'email', 'string', array( 'length' => 255 ) );
51
-			$table->addColumn( 'telefax', 'string', array( 'length' => 255 ) );
52
-			$table->addColumn( 'website', 'string', array( 'length' => 255 ) );
53
-			$table->addColumn( 'pos', 'smallint', [] );
54
-			$table->addColumn( 'mtime', 'datetime', [] );
55
-			$table->addColumn( 'ctime', 'datetime', [] );
56
-			$table->addColumn( 'editor', 'string', array('length' => 255 ) );
57
-
58
-			$table->setPrimaryKey( array( 'id' ), 'pk_ezpad_id' );
59
-			$table->addIndex( array( 'lastname', 'firstname' ), 'idx_ezpad_ln_fn' );
60
-			$table->addIndex( array( 'address1', 'address2' ), 'idx_ezpad_ad1_ad2' );
61
-			$table->addIndex( array( 'postal', 'city' ), 'idx_ezpad_post_ci' );
62
-			$table->addIndex( array( 'parentid' ), 'idx_ezpad_pid' );
63
-			$table->addIndex( array( 'city' ), 'idx_ezpad_city' );
64
-
65
-			$table->addForeignKeyConstraint( 'ezuser', array( 'parentid' ), array( 'contentobject_id' ),
66
-				array( 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE' ), 'fk_ezpad_pid' );
28
+		'ezuser_address' => function(\Doctrine\DBAL\Schema\Schema $schema) {
29
+
30
+			$table = $schema->createTable('ezuser_address');
31
+
32
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
33
+			$table->addColumn('siteid', 'integer', []);
34
+			$table->addColumn('parentid', 'integer', []);
35
+			$table->addColumn('company', 'string', array('length' => 100));
36
+			$table->addColumn('vatid', 'string', array('length' => 32));
37
+			$table->addColumn('salutation', 'string', array('length' => 8));
38
+			$table->addColumn('title', 'string', array('length' => 64));
39
+			$table->addColumn('firstname', 'string', array('length' => 64));
40
+			$table->addColumn('lastname', 'string', array('length' => 64));
41
+			$table->addColumn('address1', 'string', array('length' => 255));
42
+			$table->addColumn('address2', 'string', array('length' => 255));
43
+			$table->addColumn('address3', 'string', array('length' => 255));
44
+			$table->addColumn('postal', 'string', array('length' => 16));
45
+			$table->addColumn('city', 'string', array('length' => 255));
46
+			$table->addColumn('state', 'string', array('length' => 255));
47
+			$table->addColumn('langid', 'string', array('length' => 5, 'notnull' => false));
48
+			$table->addColumn('countryid', 'string', array('length' => 2, 'notnull' => false, 'fixed' => true));
49
+			$table->addColumn('telephone', 'string', array('length' => 32));
50
+			$table->addColumn('email', 'string', array('length' => 255));
51
+			$table->addColumn('telefax', 'string', array('length' => 255));
52
+			$table->addColumn('website', 'string', array('length' => 255));
53
+			$table->addColumn('pos', 'smallint', []);
54
+			$table->addColumn('mtime', 'datetime', []);
55
+			$table->addColumn('ctime', 'datetime', []);
56
+			$table->addColumn('editor', 'string', array('length' => 255));
57
+
58
+			$table->setPrimaryKey(array('id'), 'pk_ezpad_id');
59
+			$table->addIndex(array('lastname', 'firstname'), 'idx_ezpad_ln_fn');
60
+			$table->addIndex(array('address1', 'address2'), 'idx_ezpad_ad1_ad2');
61
+			$table->addIndex(array('postal', 'city'), 'idx_ezpad_post_ci');
62
+			$table->addIndex(array('parentid'), 'idx_ezpad_pid');
63
+			$table->addIndex(array('city'), 'idx_ezpad_city');
64
+
65
+			$table->addForeignKeyConstraint('ezuser', array('parentid'), array('contentobject_id'),
66
+				array('onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'), 'fk_ezpad_pid');
67 67
 
68 68
 			return $schema;
69 69
 		},
70 70
 
71
-		'ezuser_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
71
+		'ezuser_list_type' => function(\Doctrine\DBAL\Schema\Schema $schema) {
72 72
 
73
-			$table = $schema->createTable( 'ezuser_list_type' );
73
+			$table = $schema->createTable('ezuser_list_type');
74 74
 
75
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
76
-			$table->addColumn( 'siteid', 'integer', [] );
77
-			$table->addColumn( 'domain', 'string', array( 'length' => 32 ) );
78
-			$table->addColumn( 'code', 'string', array( 'length' => 32 ) );
79
-			$table->addColumn( 'label', 'string', array( 'length' => 255 ) );
80
-			$table->addColumn( 'pos', 'integer', ['default' => 0] );
81
-			$table->addColumn( 'status', 'smallint', [] );
82
-			$table->addColumn( 'mtime', 'datetime', [] );
83
-			$table->addColumn( 'ctime', 'datetime', [] );
84
-			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
75
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
76
+			$table->addColumn('siteid', 'integer', []);
77
+			$table->addColumn('domain', 'string', array('length' => 32));
78
+			$table->addColumn('code', 'string', array('length' => 32));
79
+			$table->addColumn('label', 'string', array('length' => 255));
80
+			$table->addColumn('pos', 'integer', ['default' => 0]);
81
+			$table->addColumn('status', 'smallint', []);
82
+			$table->addColumn('mtime', 'datetime', []);
83
+			$table->addColumn('ctime', 'datetime', []);
84
+			$table->addColumn('editor', 'string', array('length' => 255));
85 85
 
86
-			$table->setPrimaryKey( array( 'id' ), 'pk_ezplity_id' );
87
-			$table->addUniqueIndex( array( 'siteid', 'domain', 'code' ), 'unq_ezplity_sid_dom_code' );
88
-			$table->addIndex( array( 'siteid', 'status' ), 'idx_ezplity_sid_status' );
89
-			$table->addIndex( array( 'siteid', 'label' ), 'idx_ezplity_sid_label' );
90
-			$table->addIndex( array( 'siteid', 'code' ), 'idx_ezplity_sid_code' );
86
+			$table->setPrimaryKey(array('id'), 'pk_ezplity_id');
87
+			$table->addUniqueIndex(array('siteid', 'domain', 'code'), 'unq_ezplity_sid_dom_code');
88
+			$table->addIndex(array('siteid', 'status'), 'idx_ezplity_sid_status');
89
+			$table->addIndex(array('siteid', 'label'), 'idx_ezplity_sid_label');
90
+			$table->addIndex(array('siteid', 'code'), 'idx_ezplity_sid_code');
91 91
 
92 92
 			return $schema;
93 93
 		},
94 94
 
95
-		'ezuser_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
95
+		'ezuser_list' => function(\Doctrine\DBAL\Schema\Schema $schema) {
96 96
 
97
-			$table = $schema->createTable( 'ezuser_list' );
97
+			$table = $schema->createTable('ezuser_list');
98 98
 
99
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
100
-			$table->addColumn( 'parentid', 'integer', [] );
101
-			$table->addColumn( 'siteid', 'integer', [] );
102
-			$table->addColumn( 'type', 'string', array( 'length' => 32 ) );
103
-			$table->addColumn( 'domain', 'string', array( 'length' => 32 ) );
104
-			$table->addColumn( 'refid', 'string', array( 'length' => 32 ) );
105
-			$table->addColumn( 'start', 'datetime', array( 'notnull' => false ) );
106
-			$table->addColumn( 'end', 'datetime', array( 'notnull' => false ) );
107
-			$table->addColumn( 'config', 'text', array( 'length' => 0xffff ) );
108
-			$table->addColumn( 'pos', 'integer', [] );
109
-			$table->addColumn( 'status', 'smallint', [] );
110
-			$table->addColumn( 'mtime', 'datetime', [] );
111
-			$table->addColumn( 'ctime', 'datetime', [] );
112
-			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
99
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
100
+			$table->addColumn('parentid', 'integer', []);
101
+			$table->addColumn('siteid', 'integer', []);
102
+			$table->addColumn('type', 'string', array('length' => 32));
103
+			$table->addColumn('domain', 'string', array('length' => 32));
104
+			$table->addColumn('refid', 'string', array('length' => 32));
105
+			$table->addColumn('start', 'datetime', array('notnull' => false));
106
+			$table->addColumn('end', 'datetime', array('notnull' => false));
107
+			$table->addColumn('config', 'text', array('length' => 0xffff));
108
+			$table->addColumn('pos', 'integer', []);
109
+			$table->addColumn('status', 'smallint', []);
110
+			$table->addColumn('mtime', 'datetime', []);
111
+			$table->addColumn('ctime', 'datetime', []);
112
+			$table->addColumn('editor', 'string', array('length' => 255));
113 113
 
114
-			$table->setPrimaryKey( array( 'id' ), 'pk_ezpli_id' );
115
-			$table->addUniqueIndex( array( 'parentid', 'siteid', 'domain', 'type', 'refid' ), 'unq_ezpli_pid_sid_dm_ty_rid' );
116
-			$table->addIndex( array( 'parentid' ), 'fk_ezpli_pid' );
114
+			$table->setPrimaryKey(array('id'), 'pk_ezpli_id');
115
+			$table->addUniqueIndex(array('parentid', 'siteid', 'domain', 'type', 'refid'), 'unq_ezpli_pid_sid_dm_ty_rid');
116
+			$table->addIndex(array('parentid'), 'fk_ezpli_pid');
117 117
 
118
-			$table->addForeignKeyConstraint( 'ezuser', array( 'parentid' ), array( 'contentobject_id' ),
119
-				array( 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE' ), 'fk_ezpli_pid' );
118
+			$table->addForeignKeyConstraint('ezuser', array('parentid'), array('contentobject_id'),
119
+				array('onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'), 'fk_ezpli_pid');
120 120
 
121 121
 			return $schema;
122 122
 		},
123 123
 
124
-		'ezuser_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
124
+		'ezuser_property_type' => function(\Doctrine\DBAL\Schema\Schema $schema) {
125 125
 
126
-			$table = $schema->createTable( 'ezuser_property_type' );
126
+			$table = $schema->createTable('ezuser_property_type');
127 127
 
128
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
129
-			$table->addColumn( 'siteid', 'integer', [] );
130
-			$table->addColumn( 'domain', 'string', array( 'length' => 32 ) );
131
-			$table->addColumn( 'code', 'string', array( 'length' => 32 ) );
132
-			$table->addColumn( 'label', 'string', array( 'length' => 255 ) );
133
-			$table->addColumn( 'pos', 'integer', ['default' => 0] );
134
-			$table->addColumn( 'status', 'smallint', [] );
135
-			$table->addColumn( 'mtime', 'datetime', [] );
136
-			$table->addColumn( 'ctime', 'datetime', [] );
137
-			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
128
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
129
+			$table->addColumn('siteid', 'integer', []);
130
+			$table->addColumn('domain', 'string', array('length' => 32));
131
+			$table->addColumn('code', 'string', array('length' => 32));
132
+			$table->addColumn('label', 'string', array('length' => 255));
133
+			$table->addColumn('pos', 'integer', ['default' => 0]);
134
+			$table->addColumn('status', 'smallint', []);
135
+			$table->addColumn('mtime', 'datetime', []);
136
+			$table->addColumn('ctime', 'datetime', []);
137
+			$table->addColumn('editor', 'string', array('length' => 255));
138 138
 
139
-			$table->setPrimaryKey( array( 'id' ), 'pk_ezpprty_id' );
140
-			$table->addUniqueIndex( array( 'siteid', 'domain', 'code' ), 'unq_ezpprty_sid_dom_code' );
141
-			$table->addIndex( array( 'siteid', 'status', 'pos' ), 'idx_ezpprty_sid_status_pos' );
142
-			$table->addIndex( array( 'siteid', 'label' ), 'idx_ezpprty_sid_label' );
143
-			$table->addIndex( array( 'siteid', 'code' ), 'idx_ezpprty_sid_code' );
139
+			$table->setPrimaryKey(array('id'), 'pk_ezpprty_id');
140
+			$table->addUniqueIndex(array('siteid', 'domain', 'code'), 'unq_ezpprty_sid_dom_code');
141
+			$table->addIndex(array('siteid', 'status', 'pos'), 'idx_ezpprty_sid_status_pos');
142
+			$table->addIndex(array('siteid', 'label'), 'idx_ezpprty_sid_label');
143
+			$table->addIndex(array('siteid', 'code'), 'idx_ezpprty_sid_code');
144 144
 
145 145
 			return $schema;
146 146
 		},
147 147
 
148
-		'ezuser_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
148
+		'ezuser_property' => function(\Doctrine\DBAL\Schema\Schema $schema) {
149 149
 
150
-			$table = $schema->createTable( 'ezuser_property' );
150
+			$table = $schema->createTable('ezuser_property');
151 151
 
152
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
153
-			$table->addColumn( 'siteid', 'integer', [] );
154
-			$table->addColumn( 'parentid', 'integer', [] );
155
-			$table->addColumn( 'type', 'string', array( 'length' => 32 ) );
156
-			$table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) );
157
-			$table->addColumn( 'value', 'string', array( 'length' => 255 ) );
158
-			$table->addColumn( 'mtime', 'datetime', [] );
159
-			$table->addColumn( 'ctime', 'datetime', [] );
160
-			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
152
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
153
+			$table->addColumn('siteid', 'integer', []);
154
+			$table->addColumn('parentid', 'integer', []);
155
+			$table->addColumn('type', 'string', array('length' => 32));
156
+			$table->addColumn('langid', 'string', array('length' => 5, 'notnull' => false));
157
+			$table->addColumn('value', 'string', array('length' => 255));
158
+			$table->addColumn('mtime', 'datetime', []);
159
+			$table->addColumn('ctime', 'datetime', []);
160
+			$table->addColumn('editor', 'string', array('length' => 255));
161 161
 
162
-			$table->setPrimaryKey( array( 'id' ), 'pk_ezppr_id' );
163
-			$table->addUniqueIndex( array( 'parentid', 'siteid', 'type', 'langid', 'value' ), 'unq_ezppr_sid_ty_lid_value' );
164
-			$table->addIndex( array( 'parentid' ), 'fk_ezppr_pid' );
162
+			$table->setPrimaryKey(array('id'), 'pk_ezppr_id');
163
+			$table->addUniqueIndex(array('parentid', 'siteid', 'type', 'langid', 'value'), 'unq_ezppr_sid_ty_lid_value');
164
+			$table->addIndex(array('parentid'), 'fk_ezppr_pid');
165 165
 
166
-			$table->addForeignKeyConstraint( 'ezuser', array( 'parentid' ), array( 'contentobject_id' ),
167
-				array( 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE' ), 'fk_ezppr_pid' );
166
+			$table->addForeignKeyConstraint('ezuser', array('parentid'), array('contentobject_id'),
167
+				array('onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'), 'fk_ezppr_pid');
168 168
 
169 169
 			return $schema;
170 170
 		},
Please login to merge, or discard this patch.
lib/custom/setup/TypesMigrateColumnsEzpublish.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 FosUser' ), 0 );
61
-		$this->status( '' );
60
+		$this->msg(sprintf('Add new type columns for FosUser'), 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 FosUser' ), 0 );
68
-		$this->status( '' );
67
+		$this->msg(sprintf('Drop old unique indexes for FosUser'), 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 FosUser' ), 0 );
75
-		$this->status( '' );
74
+		$this->msg(sprintf('Migrate typeid to type for FosUser'), 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/MShop/Customer/Manager/Property/Type/EzpublishTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,39 +16,39 @@
 block discarded – undo
16 16
 
17 17
 	protected function setUp()
18 18
 	{
19
-		$manager = \Aimeos\MShop\Customer\Manager\Factory::create( \TestHelper::getContext(), 'Ezpublish' );
19
+		$manager = \Aimeos\MShop\Customer\Manager\Factory::create(\TestHelper::getContext(), 'Ezpublish');
20 20
 
21
-		$listManager = $manager->getSubManager( 'property', 'Ezpublish' );
22
-		$this->object = $listManager->getSubManager( 'type', 'Ezpublish' );
21
+		$listManager = $manager->getSubManager('property', 'Ezpublish');
22
+		$this->object = $listManager->getSubManager('type', 'Ezpublish');
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 testGetSearchAttributes()
39 39
 	{
40 40
 		$attributes = $this->object->getSearchAttributes();
41
-		$this->assertGreaterThan( 0, count( $attributes ) );
41
+		$this->assertGreaterThan(0, count($attributes));
42 42
 
43
-		foreach( $attributes as $attribute ) {
44
-			$this->assertInstanceOf( \Aimeos\MW\Criteria\Attribute\Iface::class, $attribute );
43
+		foreach ($attributes as $attribute) {
44
+			$this->assertInstanceOf(\Aimeos\MW\Criteria\Attribute\Iface::class, $attribute);
45 45
 		}
46 46
 	}
47 47
 
48 48
 
49 49
 	public function testGetSubManager()
50 50
 	{
51
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
52
-		$this->object->getSubManager( 'unknown' );
51
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
52
+		$this->object->getSubManager('unknown');
53 53
 	}
54 54
 }
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Property/EzpublishTest.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -16,47 +16,47 @@
 block discarded – undo
16 16
 
17 17
 	protected function setUp()
18 18
 	{
19
-		$manager = \Aimeos\MShop\Customer\Manager\Factory::create( \TestHelper::getContext(), 'Ezpublish' );
20
-		$this->object = $manager->getSubManager( 'property', 'Ezpublish' );
19
+		$manager = \Aimeos\MShop\Customer\Manager\Factory::create(\TestHelper::getContext(), 'Ezpublish');
20
+		$this->object = $manager->getSubManager('property', 'Ezpublish');
21 21
 	}
22 22
 
23 23
 
24 24
 	protected function tearDown()
25 25
 	{
26
-		unset( $this->object );
26
+		unset($this->object);
27 27
 	}
28 28
 
29 29
 
30 30
 	public function testCleanup()
31 31
 	{
32
-		$this->object->cleanup( array( -1 ) );
32
+		$this->object->cleanup(array( -1 ));
33 33
 	}
34 34
 
35 35
 
36 36
 	public function testGetSearchAttributes()
37 37
 	{
38 38
 		$attributes = $this->object->getSearchAttributes();
39
-		$this->assertGreaterThan( 0, count( $attributes ) );
39
+		$this->assertGreaterThan(0, count($attributes));
40 40
 
41
-		foreach( $attributes as $attribute ) {
42
-			$this->assertInstanceOf( \Aimeos\MW\Criteria\Attribute\Iface::class, $attribute );
41
+		foreach ($attributes as $attribute) {
42
+			$this->assertInstanceOf(\Aimeos\MW\Criteria\Attribute\Iface::class, $attribute);
43 43
 		}
44 44
 	}
45 45
 
46 46
 
47 47
 	public function testGetSubManager()
48 48
 	{
49
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type') );
50
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Standard') );
49
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type'));
50
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Standard'));
51 51
 
52
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
53
-		$this->object->getSubManager( 'unknown' );
52
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
53
+		$this->object->getSubManager('unknown');
54 54
 	}
55 55
 
56 56
 
57 57
 	public function testSaveItemInvalidItem()
58 58
 	{
59
-		$this->setExpectedException( \Aimeos\MW\Common\Exception::class );
60
-		$this->object->saveItem( new \Aimeos\MShop\Common\Item\Type\Standard( 'common.property.type.' ) );
59
+		$this->setExpectedException(\Aimeos\MW\Common\Exception::class);
60
+		$this->object->saveItem(new \Aimeos\MShop\Common\Item\Type\Standard('common.property.type.'));
61 61
 	}
62 62
 }
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Lists/Type/EzpublishTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,39 +16,39 @@
 block discarded – undo
16 16
 
17 17
 	protected function setUp()
18 18
 	{
19
-		$manager = \Aimeos\MShop\Customer\Manager\Factory::create( \TestHelper::getContext(), 'Ezpublish' );
19
+		$manager = \Aimeos\MShop\Customer\Manager\Factory::create(\TestHelper::getContext(), 'Ezpublish');
20 20
 
21
-		$listManager = $manager->getSubManager( 'lists', 'Ezpublish' );
22
-		$this->object = $listManager->getSubManager( 'type', 'Ezpublish' );
21
+		$listManager = $manager->getSubManager('lists', 'Ezpublish');
22
+		$this->object = $listManager->getSubManager('type', 'Ezpublish');
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 testGetSearchAttributes()
39 39
 	{
40 40
 		$attributes = $this->object->getSearchAttributes();
41
-		$this->assertGreaterThan( 0, count( $attributes ) );
41
+		$this->assertGreaterThan(0, count($attributes));
42 42
 
43
-		foreach( $attributes as $attribute ) {
44
-			$this->assertInstanceOf( \Aimeos\MW\Criteria\Attribute\Iface::class, $attribute );
43
+		foreach ($attributes as $attribute) {
44
+			$this->assertInstanceOf(\Aimeos\MW\Criteria\Attribute\Iface::class, $attribute);
45 45
 		}
46 46
 	}
47 47
 
48 48
 
49 49
 	public function testGetSubManager()
50 50
 	{
51
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
52
-		$this->object->getSubManager( 'unknown' );
51
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
52
+		$this->object->getSubManager('unknown');
53 53
 	}
54 54
 }
Please login to merge, or discard this patch.