Completed
Push — master ( 7ac949...d0dda4 )
by Aimeos
11:16
created
lib/mshoplib/src/MShop/Stock/Manager/Standard.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -552,8 +552,8 @@  discard block
 block discarded – undo
552 552
 
553 553
 			while( ( $row = $results->fetch() ) !== false )
554 554
 			{
555
-				$map[ $row['stock.id'] ] = $row;
556
-				$typeIds[ $row['stock.typeid'] ] = null;
555
+				$map[$row['stock.id']] = $row;
556
+				$typeIds[$row['stock.typeid']] = null;
557 557
 			}
558 558
 
559 559
 			$dbm->release( $conn, $dbname );
@@ -576,9 +576,9 @@  discard block
 block discarded – undo
576 576
 
577 577
 			foreach( $map as $id => $row )
578 578
 			{
579
-				if( isset( $typeItems[ $row['stock.typeid'] ] ) )
579
+				if( isset( $typeItems[$row['stock.typeid']] ) )
580 580
 				{
581
-					$row['stock.type'] = $typeItems[ $row['stock.typeid'] ]->getCode();
581
+					$row['stock.type'] = $typeItems[$row['stock.typeid']]->getCode();
582 582
 					$row['stock.typename'] = $typeItems[$row['stock.typeid']]->getName();
583 583
 				}
584 584
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -200,8 +200,7 @@
 block discarded – undo
200 200
 				 * @see mshop/stock/manager/standard/stocklevel
201 201
 				 */
202 202
 				$path = 'mshop/stock/manager/standard/insert';
203
-			}
204
-			else
203
+			} else
205 204
 			{
206 205
 				/** mshop/stock/manager/standard/update/mysql
207 206
 				 * Updates an existing product stock record in the database
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -435,6 +435,7 @@
 block discarded – undo
435 435
 	 * @param \Aimeos\MW\Criteria\Iface $search Search criteria object
436 436
 	 * @param string[] $ref List of domains to fetch list items and referenced items for
437 437
 	 * @param integer|null &$total Number of items that are available in total
438
+	 * @param integer $total
438 439
 	 * @return array List of stock items implementing \Aimeos\MShop\Stock\Item\Iface
439 440
 	 */
440 441
 	public function searchItems( \Aimeos\MW\Criteria\Iface $search, array $ref = [], &$total = null )
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Stock/Manager/Type/Standard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -283,7 +283,7 @@
 block discarded – undo
283 283
 		 * @see mshop/stock/manager/type/decorators/global
284 284
 		 */
285 285
 
286
-		return $this->getSubManagerBase( 'stock', 'type/' . $manager, $name );
286
+		return $this->getSubManagerBase( 'stock', 'type/'.$manager, $name );
287 287
 	}
288 288
 
289 289
 
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Stock/Manager/Factory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,12 +71,12 @@
 block discarded – undo
71 71
 
72 72
 		if( ctype_alnum( $name ) === false )
73 73
 		{
74
-			$classname = is_string( $name ) ? '\\Aimeos\\MShop\\Stock\\Manager\\' . $name : '<not a string>';
74
+			$classname = is_string( $name ) ? '\\Aimeos\\MShop\\Stock\\Manager\\'.$name : '<not a string>';
75 75
 			throw new \Aimeos\MShop\Stock\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
76 76
 		}
77 77
 
78 78
 		$iface = '\\Aimeos\\MShop\\Stock\\Manager\\Iface';
79
-		$classname = '\\Aimeos\\MShop\\Stock\\Manager\\' . $name;
79
+		$classname = '\\Aimeos\\MShop\\Stock\\Manager\\'.$name;
80 80
 
81 81
 		$manager = self::createManagerBase( $context, $classname, $iface );
82 82
 
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Stock/Item/Standard.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 */
92 92
 	public function setTypeId( $id )
93 93
 	{
94
-		if ( $id == $this->getTypeId() ) { return $this; }
94
+		if( $id == $this->getTypeId() ) { return $this; }
95 95
 
96 96
 		$this->values['stock.typeid'] = (int) $id;
97 97
 		$this->setModified();
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 	{
190 190
 		if( $backdate == $this->getDateBack() ) { return $this; }
191 191
 
192
-		$this->values['stock.backdate'] = $this->checkDateFormat( $backdate );;
192
+		$this->values['stock.backdate'] = $this->checkDateFormat( $backdate ); ;
193 193
 		$this->setModified();
194 194
 
195 195
 		return $this;
Please login to merge, or discard this patch.
lib/mshoplib/setup/StockMigrateProductcode.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -72,8 +72,7 @@  discard block
 block discarded – undo
72 72
 				{
73 73
 					$this->execute( $stmt );
74 74
 					$this->status( 'done' );
75
-				}
76
-				else
75
+				} else
77 76
 				{
78 77
 					$this->status( 'OK' );
79 78
 				}
@@ -86,8 +85,7 @@  discard block
 block discarded – undo
86 85
 			{
87 86
 				$this->executeList( $this->updates );
88 87
 				$this->status( 'done' );
89
-			}
90
-			else
88
+			} else
91 89
 			{
92 90
 				$this->status( 'OK' );
93 91
 			}
@@ -101,8 +99,7 @@  discard block
 block discarded – undo
101 99
 				{
102 100
 					$this->execute( $stmt );
103 101
 					$this->status( 'done' );
104
-				}
105
-				else
102
+				} else
106 103
 				{
107 104
 					$this->status( 'OK' );
108 105
 				}
@@ -114,8 +111,7 @@  discard block
 block discarded – undo
114 111
 			{
115 112
 				$this->execute( $this->column );
116 113
 				$this->status( 'done' );
117
-			}
118
-			else
114
+			} else
119 115
 			{
120 116
 				$this->status( 'OK' );
121 117
 			}
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Service/Provider/Decorator/CategoryTest.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -197,6 +197,9 @@
 block discarded – undo
197 197
 	}
198 198
 
199 199
 
200
+	/**
201
+	 * @param string $code
202
+	 */
200 203
 	protected function getOrderProduct( $code )
201 204
 	{
202 205
 		$productManager = \Aimeos\MShop\Factory::createManager( $this->context, 'product' );
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Factory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
 			if( self::$cache === false || !isset( self::$managers[$id][$domain] ) )
93 93
 			{
94
-				$factory = '\\Aimeos\\MShop\\' . ucwords( $domain ) . '\\Manager\\Factory';
94
+				$factory = '\\Aimeos\\MShop\\'.ucwords( $domain ).'\\Manager\\Factory';
95 95
 
96 96
 				if( class_exists( $factory ) === false ) {
97 97
 					throw new \Aimeos\MShop\Exception( sprintf( 'Class "%1$s" not available', $factory ) );
@@ -111,14 +111,14 @@  discard block
 block discarded – undo
111 111
 
112 112
 			foreach( $parts as $part )
113 113
 			{
114
-				$subpath .= $part . '/';
115
-				$classname = $context->getConfig()->get( 'mshop/' . $domain . '/manager/' . $subpath . 'name' );
114
+				$subpath .= $part.'/';
115
+				$classname = $context->getConfig()->get( 'mshop/'.$domain.'/manager/'.$subpath.'name' );
116 116
 
117
-				if( self::$cache === false || !isset( self::$managers[$id][$tmppath . '/' . $part] ) ) {
118
-					self::$managers[$id][$tmppath . '/' . $part] = self::$managers[$id][$tmppath]->getSubManager( $part, $classname );
117
+				if( self::$cache === false || !isset( self::$managers[$id][$tmppath.'/'.$part] ) ) {
118
+					self::$managers[$id][$tmppath.'/'.$part] = self::$managers[$id][$tmppath]->getSubManager( $part, $classname );
119 119
 				}
120 120
 
121
-				$tmppath .= '/' . $part;
121
+				$tmppath .= '/'.$part;
122 122
 			}
123 123
 		}
124 124
 
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Media/FactoryTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 	public function testGetImage()
16 16
 	{
17 17
 		$ds = DIRECTORY_SEPARATOR;
18
-		$object = \Aimeos\MW\Media\Factory::get( __DIR__ . $ds .'_testfiles' . $ds . 'image.png' );
18
+		$object = \Aimeos\MW\Media\Factory::get( __DIR__.$ds.'_testfiles'.$ds.'image.png' );
19 19
 
20 20
 		$this->assertInstanceOf( '\\Aimeos\\MW\\Media\\Iface', $object );
21 21
 		$this->assertInstanceOf( '\\Aimeos\\MW\\Media\\Image\\Iface', $object );
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	public function testGetImageAsResource()
26 26
 	{
27 27
 		$ds = DIRECTORY_SEPARATOR;
28
-		$resource = fopen( __DIR__ . $ds .'_testfiles' . $ds . 'image.png', 'rw' );
28
+		$resource = fopen( __DIR__.$ds.'_testfiles'.$ds.'image.png', 'rw' );
29 29
 		$object = \Aimeos\MW\Media\Factory::get( $resource );
30 30
 
31 31
 		$this->assertInstanceOf( '\\Aimeos\\MW\\Media\\Iface', $object );
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	public function testGetImageAsString()
37 37
 	{
38 38
 		$ds = DIRECTORY_SEPARATOR;
39
-		$content = file_get_contents( __DIR__ . $ds .'_testfiles' . $ds . 'image.png' );
39
+		$content = file_get_contents( __DIR__.$ds.'_testfiles'.$ds.'image.png' );
40 40
 		$object = \Aimeos\MW\Media\Factory::get( $content );
41 41
 
42 42
 		$this->assertInstanceOf( '\\Aimeos\\MW\\Media\\Iface', $object );
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	public function testGetBinary()
49 49
 	{
50 50
 		$ds = DIRECTORY_SEPARATOR;
51
-		$object = \Aimeos\MW\Media\Factory::get( __DIR__ . $ds . '_testfiles' . $ds . 'application.txt' );
51
+		$object = \Aimeos\MW\Media\Factory::get( __DIR__.$ds.'_testfiles'.$ds.'application.txt' );
52 52
 
53 53
 		$this->assertInstanceOf( '\\Aimeos\\MW\\Media\\Iface', $object );
54 54
 		$this->assertInstanceOf( '\\Aimeos\\MW\\Media\\Application\\Iface', $object );
Please login to merge, or discard this patch.
controller/common/src/Controller/Common/Media/Standard.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 				$fs->rm( $path );
104 104
 			}
105 105
 		}
106
-		catch( \Exception $e ) { ; } // Can be a mime icon with relative path
106
+		catch( \Exception $e ) {; } // Can be a mime icon with relative path
107 107
 
108 108
 		$item->setPreview( '' );
109 109
 	}
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 			default: $ext = '';
234 234
 		}
235 235
 
236
-		$filename = md5( $filename . getmypid() . microtime( true ) );
236
+		$filename = md5( $filename.getmypid().microtime( true ) );
237 237
 
238 238
 		return "${type}/${filename[0]}/${filename[1]}/${filename}${ext}";
239 239
 	}
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 		 */
321 321
 		$ext = $config->get( 'controller/common/media/standard/mimeicon/extension', '.png' );
322 322
 
323
-		return $mimedir . DIRECTORY_SEPARATOR . $mimetype . $ext;
323
+		return $mimedir.DIRECTORY_SEPARATOR.$mimetype.$ext;
324 324
 	}
325 325
 
326 326
 
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 		 * @category User
365 365
 		 */
366 366
 		$default = array( 'image/jpeg', 'image/png', 'image/gif' );
367
-		$allowed = $config->get( 'controller/common/media/standard/' . $type . '/allowedtypes', $default );
367
+		$allowed = $config->get( 'controller/common/media/standard/'.$type.'/allowedtypes', $default );
368 368
 
369 369
 		if( in_array( $mimetype, $allowed ) === false )
370 370
 		{
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 		 * @category Developer
426 426
 		 * @category User
427 427
 		 */
428
-		$maxwidth = $config->get( 'controller/common/media/standard/' . $type . '/maxwidth', null );
428
+		$maxwidth = $config->get( 'controller/common/media/standard/'.$type.'/maxwidth', null );
429 429
 
430 430
 		/** controller/common/media/standard/files/maxheight
431 431
 		 * Maximum height of the uploaded images
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 		 * @category Developer
463 463
 		 * @category User
464 464
 		 */
465
-		$maxheight = $config->get( 'controller/common/media/standard/' . $type . '/maxheight', null );
465
+		$maxheight = $config->get( 'controller/common/media/standard/'.$type.'/maxheight', null );
466 466
 
467 467
 		return $media->scale( $maxwidth, $maxheight );
468 468
 	}
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
 			$filepath = $this->getFilePath( $file->getClientFilename(), 'preview', $mimeprev );
62 62
 			$this->storeFile( $media->save( null, $mimetype ), $fsname, $filepath, $item->getPreview() );
63 63
 			$item->setPreview( $filepath );
64
-		}
65
-		else
64
+		} else
66 65
 		{
67 66
 			$mimetype = $media->getMimeType();
68 67
 			$item->setPreview( $this->getMimeIcon( $mimetype ) );
@@ -103,7 +102,9 @@  discard block
 block discarded – undo
103 102
 				$fs->rm( $path );
104 103
 			}
105 104
 		}
106
-		catch( \Exception $e ) { ; } // Can be a mime icon with relative path
105
+		catch( \Exception $e )
106
+		{
107
+; } // Can be a mime icon with relative path
107 108
 
108 109
 		$item->setPreview( '' );
109 110
 	}
Please login to merge, or discard this patch.