Passed
Branch master (f14386)
by Aimeos
05:09
created
lib/custom/src/MW/Filesystem/Laravel.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 * @param string $path Path to the directory
53 53
 	 * @return void
54 54
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
55
-	*/
55
+	 */
56 56
 	public function mkdir( $path )
57 57
 	{
58 58
 		try {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 * @param string $path Path to the directory
70 70
 	 * @return void
71 71
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
72
-	*/
72
+	 */
73 73
 	public function rmdir( $path )
74 74
 	{
75 75
 		try {
Please login to merge, or discard this patch.
Braces   +60 added lines, -24 removed lines patch added patch discarded remove patch
@@ -58,9 +58,12 @@  discard block
 block discarded – undo
58 58
 	*/
59 59
 	public function mkdir( $path )
60 60
 	{
61
-		try {
61
+		try
62
+		{
62 63
 			$this->fs->makeDirectory( $path );
63
-		} catch( \Exception $e ) {
64
+		}
65
+		catch( \Exception $e )
66
+		{
64 67
 			throw new Exception( $e->getMessage(), 0, $e );
65 68
 		}
66 69
 	}
@@ -75,9 +78,12 @@  discard block
 block discarded – undo
75 78
 	*/
76 79
 	public function rmdir( $path )
77 80
 	{
78
-		try {
81
+		try
82
+		{
79 83
 			$this->fs->deleteDirectory( $path );
80
-		} catch( \Exception $e ) {
84
+		}
85
+		catch( \Exception $e )
86
+		{
81 87
 			throw new Exception( $e->getMessage(), 0, $e );
82 88
 		}
83 89
 	}
@@ -94,9 +100,12 @@  discard block
 block discarded – undo
94 100
 	 */
95 101
 	public function scan( $path = null )
96 102
 	{
97
-		try {
103
+		try
104
+		{
98 105
 			return array_merge( $this->fs->directories( $path ), $this->fs->files( $path ) );
99
-		} catch( \Exception $e ) {
106
+		}
107
+		catch( \Exception $e )
108
+		{
100 109
 			throw new Exception( $e->getMessage(), 0, $e );
101 110
 		}
102 111
 	}
@@ -111,9 +120,12 @@  discard block
 block discarded – undo
111 120
 	 */
112 121
 	public function size( $path )
113 122
 	{
114
-		try {
123
+		try
124
+		{
115 125
 			return $this->fs->size( $path );
116
-		} catch( \Exception $e ) {
126
+		}
127
+		catch( \Exception $e )
128
+		{
117 129
 			throw new Exception( $e->getMessage(), 0, $e );
118 130
 		}
119 131
 	}
@@ -128,9 +140,12 @@  discard block
 block discarded – undo
128 140
 	 */
129 141
 	public function time( $path )
130 142
 	{
131
-		try {
143
+		try
144
+		{
132 145
 			return $this->fs->lastModified( $path );
133
-		} catch( \Exception $e ) {
146
+		}
147
+		catch( \Exception $e )
148
+		{
134 149
 			throw new Exception( $e->getMessage(), 0, $e );
135 150
 		}
136 151
 	}
@@ -145,9 +160,12 @@  discard block
 block discarded – undo
145 160
 	 */
146 161
 	public function rm( $path )
147 162
 	{
148
-		try {
163
+		try
164
+		{
149 165
 			$this->fs->delete( $path );
150
-		} catch( \Exception $e ) {
166
+		}
167
+		catch( \Exception $e )
168
+		{
151 169
 			throw new Exception( $e->getMessage(), 0, $e );
152 170
 		}
153 171
 	}
@@ -176,9 +194,12 @@  discard block
 block discarded – undo
176 194
 	 */
177 195
 	public function read( $path )
178 196
 	{
179
-		try {
197
+		try
198
+		{
180 199
 			return $this->fs->get( $path );
181
-		} catch( \Exception $e ) {
200
+		}
201
+		catch( \Exception $e )
202
+		{
182 203
 			throw new Exception( $e->getMessage(), 0, $e );
183 204
 		}
184 205
 	}
@@ -216,9 +237,12 @@  discard block
 block discarded – undo
216 237
 	 */
217 238
 	public function reads( $path )
218 239
 	{
219
-		try {
240
+		try
241
+		{
220 242
 			$content = $this->fs->get( $path );
221
-		} catch( \Exception $e ) {
243
+		}
244
+		catch( \Exception $e )
245
+		{
222 246
 			throw new Exception( $e->getMessage(), 0, $e );
223 247
 		}
224 248
 
@@ -250,9 +274,12 @@  discard block
 block discarded – undo
250 274
 	 */
251 275
 	public function write( $path, $content )
252 276
 	{
253
-		try {
277
+		try
278
+		{
254 279
 			$this->fs->put( $path, $content );
255
-		} catch( \Exception $e ) {
280
+		}
281
+		catch( \Exception $e )
282
+		{
256 283
 			throw new Exception( $e->getMessage(), 0, $e );
257 284
 		}
258 285
 	}
@@ -295,9 +322,12 @@  discard block
 block discarded – undo
295 322
 			throw new Exception( $error['message'] );
296 323
 		}
297 324
 
298
-		try {
325
+		try
326
+		{
299 327
 			$this->fs->put( $path, $content );
300
-		} catch( \Exception $e ) {
328
+		}
329
+		catch( \Exception $e )
330
+		{
301 331
 			throw new Exception( $e->getMessage(), 0, $e );
302 332
 		}
303 333
 	}
@@ -313,9 +343,12 @@  discard block
 block discarded – undo
313 343
 	 */
314 344
 	public function move( $from, $to )
315 345
 	{
316
-		try {
346
+		try
347
+		{
317 348
 			$this->fs->move( $from, $to );
318
-		} catch( \Exception $e ) {
349
+		}
350
+		catch( \Exception $e )
351
+		{
319 352
 			throw new Exception( $e->getMessage(), 0, $e );
320 353
 		}
321 354
 	}
@@ -331,9 +364,12 @@  discard block
 block discarded – undo
331 364
 	 */
332 365
 	public function copy( $from, $to )
333 366
 	{
334
-		try {
367
+		try
368
+		{
335 369
 			$this->fs->copy( $from, $to );
336
-		} catch( \Exception $e ) {
370
+		}
371
+		catch( \Exception $e )
372
+		{
337 373
 			throw new Exception( $e->getMessage(), 0, $e );
338 374
 		}
339 375
 	}
Please login to merge, or discard this patch.
lib/custom/src/MW/View/Helper/Request/Laravel5.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,8 +117,7 @@
 block discarded – undo
117 117
 					$value->getClientOriginalName(),
118 118
 					$value->getClientMimeType()
119 119
 				);
120
-			}
121
-			elseif( is_array( $value ) )
120
+			} elseif( is_array( $value ) )
122 121
 			{
123 122
 				$list[$key] = $this->getFiles( $value );
124 123
 			}
Please login to merge, or discard this patch.
lib/custom/setup/CustomerRemoveLostUserDataLaravel.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
 		{
54 54
 			$this->execute( $this->sql['address'] );
55 55
 			$this->status( 'done' );
56
-		}
57
-		else
56
+		} else
58 57
 		{
59 58
 			$this->status( 'OK' );
60 59
 		}
@@ -66,8 +65,7 @@  discard block
 block discarded – undo
66 65
 		{
67 66
 			$this->execute( $this->sql['list'] );
68 67
 			$this->status( 'done' );
69
-		}
70
-		else
68
+		} else
71 69
 		{
72 70
 			$this->status( 'OK' );
73 71
 		}
Please login to merge, or discard this patch.
lib/custom/setup/default/schema/customer.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 return array(
10 10
 	'table' => array(
11
-		'users' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
11
+		'users' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
12 12
 
13 13
 			$table = $schema->createTable( 'users' );
14 14
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 			$table->addColumn( 'status', 'smallint', array( 'default' => 1 ) );
45 45
 			$table->addColumn( 'updated_at', 'datetime', [] );
46 46
 			$table->addColumn( 'created_at', 'datetime', [] );
47
-			$table->addColumn( 'editor', 'string', array('length' => 255, 'default' => '' ) );
47
+			$table->addColumn( 'editor', 'string', array( 'length' => 255, 'default' => '' ) );
48 48
 
49 49
 			$table->setPrimaryKey( array( 'id' ), 'pk_lvusr_id' );
50 50
 			$table->addUniqueIndex( array( 'email' ), 'unq_lvusr_email' );
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 			return $schema;
60 60
 		},
61 61
 
62
-		'users_address' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
62
+		'users_address' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
63 63
 
64 64
 			$table = $schema->createTable( 'users_address' );
65 65
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 			$table->addColumn( 'latitude', 'float', array( 'notnull' => false ) );
90 90
 			$table->addColumn( 'mtime', 'datetime', [] );
91 91
 			$table->addColumn( 'ctime', 'datetime', [] );
92
-			$table->addColumn( 'editor', 'string', array('length' => 255 ) );
92
+			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
93 93
 
94 94
 			$table->setPrimaryKey( array( 'id' ), 'pk_lvuad_id' );
95 95
 			$table->addIndex( array( 'parentid' ), 'idx_lvuad_pid' );
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 			return $schema;
107 107
 		},
108 108
 
109
-		'users_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
109
+		'users_list_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
110 110
 
111 111
 			$table = $schema->createTable( 'users_list_type' );
112 112
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 			return $schema;
131 131
 		},
132 132
 
133
-		'users_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
133
+		'users_list' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
134 134
 
135 135
 			$table = $schema->createTable( 'users_list' );
136 136
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
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 164
 			$table = $schema->createTable( 'users_property_type' );
165 165
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
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 188
 			$table = $schema->createTable( 'users_property' );
189 189
 
Please login to merge, or discard this patch.
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,7 +8,8 @@  discard block
 block discarded – undo
8 8
 
9 9
 return array(
10 10
 	'table' => array(
11
-		'users' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
11
+		'users' => function ( \Doctrine\DBAL\Schema\Schema $schema )
12
+		{
12 13
 
13 14
 			$table = $schema->createTable( 'users' );
14 15
 
@@ -59,7 +60,8 @@  discard block
 block discarded – undo
59 60
 			return $schema;
60 61
 		},
61 62
 
62
-		'users_address' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
63
+		'users_address' => function ( \Doctrine\DBAL\Schema\Schema $schema )
64
+		{
63 65
 
64 66
 			$table = $schema->createTable( 'users_address' );
65 67
 
@@ -106,7 +108,8 @@  discard block
 block discarded – undo
106 108
 			return $schema;
107 109
 		},
108 110
 
109
-		'users_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
111
+		'users_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema )
112
+		{
110 113
 
111 114
 			$table = $schema->createTable( 'users_list_type' );
112 115
 
@@ -130,7 +133,8 @@  discard block
 block discarded – undo
130 133
 			return $schema;
131 134
 		},
132 135
 
133
-		'users_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
136
+		'users_list' => function ( \Doctrine\DBAL\Schema\Schema $schema )
137
+		{
134 138
 
135 139
 			$table = $schema->createTable( 'users_list' );
136 140
 
@@ -159,7 +163,8 @@  discard block
 block discarded – undo
159 163
 			return $schema;
160 164
 		},
161 165
 
162
-		'users_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
166
+		'users_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema )
167
+		{
163 168
 
164 169
 			$table = $schema->createTable( 'users_property_type' );
165 170
 
@@ -183,7 +188,8 @@  discard block
 block discarded – undo
183 188
 			return $schema;
184 189
 		},
185 190
 
186
-		'users_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
191
+		'users_property' => function ( \Doctrine\DBAL\Schema\Schema $schema )
192
+		{
187 193
 
188 194
 			$table = $schema->createTable( 'users_property' );
189 195
 
Please login to merge, or discard this patch.
lib/custom/setup/unittest/data/customer-list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@  discard block
 block discarded – undo
5 5
  * @copyright Aimeos (aimeos.org), 2014-2018
6 6
  */
7 7
 
8
-return array (
9
-	'customer/lists/type' => array (
8
+return array(
9
+	'customer/lists/type' => array(
10 10
 		'customer/group/default' => array( 'domain' => 'customer/group', 'code' => 'default', 'label' => 'Standard', 'status' => 1 ),
11 11
 		'order/download' => array( 'domain' => 'order', 'code' => 'download', 'label' => 'Download', 'status' => 1 ),
12 12
 		'product/favorite' => array( 'domain' => 'product', 'code' => 'favorite', 'label' => 'Favorite', 'status' => 1 ),
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 		'text/default' => array( 'domain' => 'text', 'code' => 'default', 'label' => 'Standard', 'status' => 1 ),
15 15
 	),
16 16
 
17
-	'customer/lists' => array (
17
+	'customer/lists' => array(
18 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 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 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 ),
Please login to merge, or discard this patch.
lib/custom/setup/unittest/data/customer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,10 +5,10 @@
 block discarded – undo
5 5
  * @copyright Aimeos (aimeos.org), 2014-2018
6 6
  */
7 7
 
8
-return array (
8
+return array(
9 9
 	'customer' => array(
10 10
 		'customer/UTC001' => array( 'code' => 'UTC001', 'label' => 'unitCustomer1', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Dr.', 'firstname' => 'Max', 'lastname' => 'Mustermann', 'address1' => 'Musterstraße', 'address2' => '1a', 'address3' => '', 'postal' => '20001', 'city' => 'Musterstadt', 'state' => 'Hamburg', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234567890', 'email' => '[email protected]', 'telefax' => '01234567890', 'website' => 'unittest.aimeos.org', 'longitude' => '10.0', 'latitude' => '50.0', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test' ),
11
-		'customer/UTC002' => array( 'code' => 'UTC002', 'label' => 'unitCustomer2', 'salutation' => 'mrs', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Prof. Dr.', 'firstname' => 'Erika', 'lastname' => 'Mustermann', 'address1' => 'Heidestraße', 'address2' => '17', 'address3' => '', 'postal' => '45632', 'city' => 'Köln', 'state' => '', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '09876543210', 'email' => '[email protected]', 'telefax' => '09876543210', 'website' => 'unittest.aimeos.org', 'longitude' => '10.5', 'latitude' => '51.0', 'birthday' => '1970-01-01', 'status' => '0','password' =>  'test' ),
11
+		'customer/UTC002' => array( 'code' => 'UTC002', 'label' => 'unitCustomer2', 'salutation' => 'mrs', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Prof. Dr.', 'firstname' => 'Erika', 'lastname' => 'Mustermann', 'address1' => 'Heidestraße', 'address2' => '17', 'address3' => '', 'postal' => '45632', 'city' => 'Köln', 'state' => '', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '09876543210', 'email' => '[email protected]', 'telefax' => '09876543210', 'website' => 'unittest.aimeos.org', 'longitude' => '10.5', 'latitude' => '51.0', 'birthday' => '1970-01-01', 'status' => '0', 'password' =>  'test' ),
12 12
 		'customer/UTC003' => array( 'code' => 'UTC003', 'label' => 'unitCustomer3', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => '', 'firstname' => 'Franz-Xaver', 'lastname' => 'Gabler', 'address1' => 'Phantasiestraße', 'address2' => '2', 'address3' => '', 'postal' => '23643', 'city' => 'Berlin', 'state' => 'Berlin', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234509876', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'longitude' => '11.0', 'latitude' => '52.0', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test' ),
13 13
 	),
14 14
 
Please login to merge, or discard this patch.
lib/custom/setup/unittest/data/customer-property.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 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 10
 		'customer/property/type/newsletter' => array( 'domain' => 'customer', 'code' => 'newsletter', 'label' => 'Newsletter', 'status' => 1 ),
11 11
 	),
Please login to merge, or discard this patch.
lib/custom/setup/unittest/CustomerAddLaravelTestData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 		$ds = DIRECTORY_SEPARATOR;
40 40
 		$path = __DIR__ . $ds . 'data' . $ds . 'customer.php';
41 41
 
42
-		if( ( $testdata = include( $path ) ) == false ){
42
+		if( ( $testdata = include( $path ) ) == false ) {
43 43
 			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for customer domain', $path ) );
44 44
 		}
45 45
 
Please login to merge, or discard this patch.
lib/custom/setup/unittest/CustomerListAddLaravelTestData.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,13 +39,13 @@
 block discarded – undo
39 39
 		$ds = DIRECTORY_SEPARATOR;
40 40
 		$path = __DIR__ . $ds . 'data' . $ds . 'customer-list.php';
41 41
 
42
-		if( ( $testdata = include( $path ) ) == false ){
42
+		if( ( $testdata = include( $path ) ) == false ) {
43 43
 			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for customer list domain', $path ) );
44 44
 		}
45 45
 
46 46
 		$refKeys = [];
47 47
 		foreach( $testdata['customer/lists'] as $dataset ) {
48
-			$refKeys[ $dataset['domain'] ][] = $dataset['refid'];
48
+			$refKeys[$dataset['domain']][] = $dataset['refid'];
49 49
 		}
50 50
 
51 51
 		$refIds = [];
Please login to merge, or discard this patch.