Completed
Push — master ( d29f07...779818 )
by Aimeos
21:15
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/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.
lib/mwlib/src/MW/Media/Factory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,17 +49,17 @@
 block discarded – undo
49 49
 		$mime = explode( '/', $mimetype );
50 50
 
51 51
 		$type = ( $mime[0] === 'image' ? 'Image' : 'Application' );
52
-		$name = ( isset( $options[ $mime[0] ]['name'] ) ? ucfirst( $options[ $mime[0] ]['name'] ) : 'Standard' );
52
+		$name = ( isset( $options[$mime[0]]['name'] ) ? ucfirst( $options[$mime[0]]['name'] ) : 'Standard' );
53 53
 
54 54
 
55 55
 		if( ctype_alnum( $name ) === false )
56 56
 		{
57
-			$classname = is_string( $name ) ? '\\Aimeos\\MW\\Media\\' . $name : '<not a string>';
57
+			$classname = is_string( $name ) ? '\\Aimeos\\MW\\Media\\'.$name : '<not a string>';
58 58
 			throw new \Aimeos\MW\Container\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
59 59
 		}
60 60
 
61 61
 		$iface = '\\Aimeos\\MW\\Media\\Iface';
62
-		$classname = '\\Aimeos\\MW\\Media\\' . $type . '\\' . $name;
62
+		$classname = '\\Aimeos\\MW\\Media\\'.$type.'\\'.$name;
63 63
 
64 64
 		if( class_exists( $classname ) === false ) {
65 65
 			throw new \Aimeos\MW\Media\Exception( sprintf( 'Class "%1$s" not available', $classname ) );
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Media/Image/Standard.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 		parent::__construct( $mimetype );
42 42
 
43 43
 		if( ( $this->image = @imagecreatefromstring( $content ) ) === false ) {
44
-			throw new \Aimeos\MW\Media\Exception( sprintf( 'The image type isn\'t supported by GDlib.') );
44
+			throw new \Aimeos\MW\Media\Exception( sprintf( 'The image type isn\'t supported by GDlib.' ) );
45 45
 		}
46 46
 
47 47
 		if( ( $this->info = getimagesizefromstring( $content ) ) === false ) {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 		}
50 50
 
51 51
 		if( imagealphablending( $this->image, false ) === false ) {
52
-			throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagealphablending)') );
52
+			throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagealphablending)' ) );
53 53
 		}
54 54
 
55 55
 		$this->options = $options;
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 				case 'image/png':
116 116
 
117 117
 					if( imagesavealpha( $this->image, true ) === false ) {
118
-						throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagesavealpha)') );
118
+						throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagesavealpha)' ) );
119 119
 					}
120 120
 
121 121
 					if( @imagepng( $this->image, $filename, (int) 10 - $quality / 10 ) === false ) {
@@ -198,15 +198,15 @@  discard block
 block discarded – undo
198 198
 		try
199 199
 		{
200 200
 			if( imagealphablending( $newImage, false ) === false ) {
201
-				throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagealphablending)') );
201
+				throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagealphablending)' ) );
202 202
 			}
203 203
 
204 204
 			if( ( $transparent = imagecolorallocatealpha( $newImage, 255, 255, 255, 127 ) ) === false ) {
205
-				throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagecolorallocatealpha)') );
205
+				throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagecolorallocatealpha)' ) );
206 206
 			}
207 207
 
208 208
 			if( imagefilledrectangle( $newImage, 0, 0, $destWidth, $destHeight, $transparent ) === false ) {
209
-				throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagefilledrectangle)') );
209
+				throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagefilledrectangle)' ) );
210 210
 			}
211 211
 
212 212
 			if( imagecopyresampled( $newImage, $image, 0, 0, 0, 0, $destWidth, $destHeight, $srcWidth, $srcHeight ) === false ) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -166,8 +166,7 @@
 block discarded – undo
166 166
 			}
167 167
 
168 168
 			$this->image = $result;
169
-		}
170
-		else
169
+		} else
171 170
 		{
172 171
 			$this->image = $this->resample( $this->image, $this->info[0], $this->info[1], $width, $height );
173 172
 		}
Please login to merge, or discard this patch.