Completed
Push — master ( bb2531...13f21d )
by Aimeos
07:57
created
lib/mshoplib/src/MShop/Order/Manager/Base/Standard.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -472,7 +472,7 @@
 block discarded – undo
472 472
 		 * @see mshop/order/manager/base/decorators/global
473 473
 		 */
474 474
 
475
-		return $this->getSubManagerBase( 'order', 'base/' . $manager, $name );
475
+		return $this->getSubManagerBase( 'order', 'base/'.$manager, $name );
476 476
 	}
477 477
 
478 478
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -539,8 +539,7 @@
 block discarded – undo
539 539
 				 * @see mshop/order/manager/base/standard/count/ansi
540 540
 				 */
541 541
 				$path = 'mshop/order/manager/base/standard/insert';
542
-			}
543
-			else
542
+			} else
544 543
 			{
545 544
 				/** mshop/order/manager/base/standard/update/mysql
546 545
 				 * Updates an existing order record in the database
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -689,6 +689,7 @@
 block discarded – undo
689 689
 	 * @param \Aimeos\MW\Criteria\Iface $search Search criteria object
690 690
 	 * @param string[] $ref List of domains to fetch list items and referenced items for
691 691
 	 * @param integer|null &$total Number of items that are available in total
692
+	 * @param integer $total
692 693
 	 * @return array List of items implementing \Aimeos\MShop\Order\Item\Base\Iface
693 694
 	 */
694 695
 	public function searchItems( \Aimeos\MW\Criteria\Iface $search, array $ref = [], &$total = null )
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Order/Manager/Base/Base.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 		$currency = $locale->getCurrencyId();
98 98
 		$language = $locale->getLanguageId();
99 99
 		$sitecode = $locale->getSite()->getCode();
100
-		$key = 'aimeos/basket/content-' . $sitecode . '-' . $language . '-' . $currency . '-' . strval( $type );
100
+		$key = 'aimeos/basket/content-'.$sitecode.'-'.$language.'-'.$currency.'-'.strval( $type );
101 101
 
102 102
 		if( ( $serorder = $session->get( $key ) ) === null ) {
103 103
 			return $this->createItem();
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 		$currency = $locale->getCurrencyId();
134 134
 		$language = $locale->getLanguageId();
135 135
 		$sitecode = $locale->getSite()->getCode();
136
-		$key = 'aimeos/basket/lock-' . $sitecode . '-' . $language . '-' . $currency . '-' . strval( $type );
136
+		$key = 'aimeos/basket/lock-'.$sitecode.'-'.$language.'-'.$currency.'-'.strval( $type );
137 137
 
138 138
 		if( ( $value = $session->get( $key ) ) !== null ) {
139 139
 			return (int) $value;
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 		$currency = $locale->getCurrencyId();
158 158
 		$language = $locale->getLanguageId();
159 159
 		$sitecode = $locale->getSite()->getCode();
160
-		$key = 'aimeos/basket/content-' . $sitecode . '-' . $language . '-' . $currency . '-' . strval( $type );
160
+		$key = 'aimeos/basket/content-'.$sitecode.'-'.$language.'-'.$currency.'-'.strval( $type );
161 161
 
162 162
 		$session->set( $key, serialize( clone $order ) );
163 163
 	}
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 		$currency = $locale->getCurrencyId();
182 182
 		$language = $locale->getLanguageId();
183 183
 		$sitecode = $locale->getSite()->getCode();
184
-		$key = 'aimeos/basket/lock-' . $sitecode . '-' . $language . '-' . $currency . '-' . strval( $type );
184
+		$key = 'aimeos/basket/lock-'.$sitecode.'-'.$language.'-'.$currency.'-'.strval( $type );
185 185
 
186 186
 		$session->set( $key, strval( $lock ) );
187 187
 	}
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -343,8 +343,7 @@  discard block
 block discarded – undo
343 343
 				$attributes[$attribute->getParentId()][] = $attribute;
344 344
 				$attribute->setParentId( null );
345 345
 				$attribute->setId( null );
346
-			}
347
-			else
346
+			} else
348 347
 			{
349 348
 				$attributes[$attribute->getParentId()][$id] = $attribute;
350 349
 			}
@@ -363,8 +362,7 @@  discard block
 block discarded – undo
363 362
 				$products[$item->getPosition()] = $item;
364 363
 
365 364
 				$subProducts = [];
366
-			}
367
-			else
365
+			} else
368 366
 			{	// in case it's a sub-product
369 367
 				$subProducts[$item->getPosition()] = $item;
370 368
 			}
Please login to merge, or discard this patch.
lib/mshoplib/src/MW/Criteria/PgSQL.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 					$regex = '/(\s|\&|\%|\?|\#|\=|\{|\}|\||\\\\|\~|\[|\]|\`|\^|\/|\-|\+|\>|\<|\(|\)|\*|\:|\"|\!|\§|\$|\'|\;|\.|\,|\@)+/';
39 39
 					$search = trim( preg_replace( $regex, ' ', $params[2] ) );
40 40
 
41
-					$params[2] = implode( ':* & ', explode( ' ', $search ) ) . ':*';
41
+					$params[2] = implode( ':* & ', explode( ' ', $search ) ).':*';
42 42
 				}
43 43
 				break;
44 44
 		}
Please login to merge, or discard this patch.
lib/mshoplib/src/MW/Criteria/MySQL.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@
 block discarded – undo
44 44
 						$len = strlen( $part );
45 45
 
46 46
 						if( $len > 3 ) {
47
-							$str .= ' +' . $part . '*';
47
+							$str .= ' +'.$part.'*';
48 48
 						} else if( $len > 0 ) {
49
-							$str .= ' ' . $part . '*';
49
+							$str .= ' '.$part.'*';
50 50
 						}
51 51
 					}
52 52
 
Please login to merge, or discard this patch.
lib/mwlib/tests/bootstrap.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -13,26 +13,26 @@
 block discarded – undo
13 13
 error_reporting( -1 );
14 14
 ini_set( 'display_errors', '1' );
15 15
 
16
-date_default_timezone_set('UTC');
16
+date_default_timezone_set( 'UTC' );
17 17
 
18 18
 /*
19 19
  * Set locale settings to reasonable defaults
20 20
  */
21
-setlocale(LC_ALL, 'en_US.UTF-8');
22
-setlocale(LC_NUMERIC, 'POSIX');
23
-setlocale(LC_CTYPE, 'en_US.UTF-8');
24
-setlocale(LC_TIME, 'POSIX');
21
+setlocale( LC_ALL, 'en_US.UTF-8' );
22
+setlocale( LC_NUMERIC, 'POSIX' );
23
+setlocale( LC_CTYPE, 'en_US.UTF-8' );
24
+setlocale( LC_TIME, 'POSIX' );
25 25
 
26 26
 
27 27
 /*
28 28
  * Set include path for tests
29 29
  */
30 30
 
31
-require_once dirname( dirname( dirname( __DIR__ ) ) ) . '/vendor/autoload.php';
31
+require_once dirname( dirname( dirname( __DIR__ ) ) ).'/vendor/autoload.php';
32 32
 
33
-$testdir =  __DIR__;
34
-$srcdir =  dirname( $testdir ) . DIRECTORY_SEPARATOR . 'src';
35
-$libdir =  dirname( $testdir ) . DIRECTORY_SEPARATOR . 'lib';
33
+$testdir = __DIR__;
34
+$srcdir = dirname( $testdir ).DIRECTORY_SEPARATOR.'src';
35
+$libdir = dirname( $testdir ).DIRECTORY_SEPARATOR.'lib';
36 36
 
37 37
 $path = array( $testdir, $srcdir, $libdir, get_include_path() );
38 38
 set_include_path( implode( PATH_SEPARATOR, $path ) );
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Session/NoneTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,25 +35,25 @@
 block discarded – undo
35 35
 	 */
36 36
 	protected function tearDown()
37 37
 	{
38
-		unset($this->object);
38
+		unset( $this->object );
39 39
 	}
40 40
 
41 41
 
42 42
 	public function testGet()
43 43
 	{
44
-		$this->assertEquals(null, $this->object->get('test'));
44
+		$this->assertEquals( null, $this->object->get( 'test' ) );
45 45
 
46
-		$this->object->set('test', '123456789');
47
-		$this->assertEquals('123456789', $this->object->get('test'));
46
+		$this->object->set( 'test', '123456789' );
47
+		$this->assertEquals( '123456789', $this->object->get( 'test' ) );
48 48
 	}
49 49
 
50 50
 
51 51
 	public function testSet()
52 52
 	{
53
-		$this->object->set('test', null);
53
+		$this->object->set( 'test', null );
54 54
 		$this->assertEquals( null, $this->object->get( 'test' ) );
55 55
 
56
-		$this->object->set('test', '234');
56
+		$this->object->set( 'test', '234' );
57 57
 		$this->assertEquals( '234', $this->object->get( 'test' ) );
58 58
 	}
59 59
 }
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Session/PHPTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,25 +23,25 @@
 block discarded – undo
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 testGet()
31 31
 	{
32
-		$this->assertEquals(null, $this->object->get('test'));
32
+		$this->assertEquals( null, $this->object->get( 'test' ) );
33 33
 
34
-		$this->object->set('test', '123456789');
35
-		$this->assertEquals('123456789', $this->object->get('test'));
34
+		$this->object->set( 'test', '123456789' );
35
+		$this->assertEquals( '123456789', $this->object->get( 'test' ) );
36 36
 	}
37 37
 
38 38
 
39 39
 	public function testSet()
40 40
 	{
41
-		$this->object->set('test', null);
41
+		$this->object->set( 'test', null );
42 42
 		$this->assertEquals( null, $this->object->get( 'test' ) );
43 43
 
44
-		$this->object->set('test', '234');
44
+		$this->object->set( 'test', '234' );
45 45
 		$this->assertEquals( '234', $this->object->get( 'test' ) );
46 46
 	}
47 47
 }
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Container/DirectoryTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@  discard block
 block discarded – undo
11 11
 {
12 12
 	public function testNewFile()
13 13
 	{
14
-		$dirname = 'tmp' . DIRECTORY_SEPARATOR . 'testdir';
14
+		$dirname = 'tmp'.DIRECTORY_SEPARATOR.'testdir';
15 15
 
16 16
 		$dir = new \Aimeos\MW\Container\Directory( $dirname, 'CSV' );
17 17
 		$dir->add( $dir->create( 'test' ) );
18 18
 		$dir->close();
19 19
 
20
-		$filepath = $dir->getName() . DIRECTORY_SEPARATOR . 'test.csv';
20
+		$filepath = $dir->getName().DIRECTORY_SEPARATOR.'test.csv';
21 21
 
22 22
 		$check = file_exists( $filepath );
23 23
 		unlink( $filepath );
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
 	public function testAdd()
33 33
 	{
34
-		$dir = new \Aimeos\MW\Container\Directory( 'tmp' . DIRECTORY_SEPARATOR . 'testdir', 'CSV' );
34
+		$dir = new \Aimeos\MW\Container\Directory( 'tmp'.DIRECTORY_SEPARATOR.'testdir', 'CSV' );
35 35
 
36 36
 		$content = $dir->create( 'test' );
37 37
 		$content->add( array( 'test', 'file', 'data' ) );
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
 		$dir->add( $content );
40 40
 		$dir->close();
41 41
 
42
-		$filepath = $dir->getName() . DIRECTORY_SEPARATOR . 'test.csv';
42
+		$filepath = $dir->getName().DIRECTORY_SEPARATOR.'test.csv';
43 43
 
44 44
 		$actual = file_get_contents( $filepath );
45
-		$expected = '"test","file","data"' . "\n";
45
+		$expected = '"test","file","data"'."\n";
46 46
 
47 47
 		unlink( $filepath );
48 48
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
 	public function testGet()
55 55
 	{
56
-		$dir = new \Aimeos\MW\Container\Directory( __DIR__ . DIRECTORY_SEPARATOR . '_testdir', 'CSV' );
56
+		$dir = new \Aimeos\MW\Container\Directory( __DIR__.DIRECTORY_SEPARATOR.'_testdir', 'CSV' );
57 57
 
58 58
 		$this->assertInstanceOf( '\\Aimeos\\MW\\Container\\Content\\Iface', $dir->get( 'testfile.csv' ) );
59 59
 	}
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
 	public function testIterator()
63 63
 	{
64
-		$dir = new \Aimeos\MW\Container\Directory( __DIR__ . DIRECTORY_SEPARATOR . '_testdir', 'CSV' );
64
+		$dir = new \Aimeos\MW\Container\Directory( __DIR__.DIRECTORY_SEPARATOR.'_testdir', 'CSV' );
65 65
 
66 66
 		$expected = array(
67 67
 			'testfile.csv' => 1,
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 				$rows[] = $row;
82 82
 			}
83 83
 
84
-			$actual[ $entry->getName() ] = count( $rows );
84
+			$actual[$entry->getName()] = count( $rows );
85 85
 		}
86 86
 
87 87
 		$this->assertEquals( $expected, $actual );
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Container/ZipTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
 	public function testNewFile()
24 24
 	{
25
-		$filename = 'tmp' . DIRECTORY_SEPARATOR . 'tempfile';
25
+		$filename = 'tmp'.DIRECTORY_SEPARATOR.'tempfile';
26 26
 
27 27
 		$zip = new \Aimeos\MW\Container\Zip( $filename, 'CSV' );
28 28
 		$zip->add( $zip->create( 'test' ) );
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
 	public function testAdd()
41 41
 	{
42
-		$filename = 'tmp' . DIRECTORY_SEPARATOR . 'tempfile';
42
+		$filename = 'tmp'.DIRECTORY_SEPARATOR.'tempfile';
43 43
 
44 44
 		$zip = new \Aimeos\MW\Container\Zip( $filename, 'CSV' );
45 45
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		$actual = $za->getFromName( $content->getName() );
55 55
 		$za->close();
56 56
 
57
-		$expected = '"test","file","data"' . PHP_EOL;
57
+		$expected = '"test","file","data"'.PHP_EOL;
58 58
 
59 59
 		unlink( $zip->getName() );
60 60
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
 	public function testGet()
66 66
 	{
67
-		$zip = new \Aimeos\MW\Container\Zip( __DIR__ . DIRECTORY_SEPARATOR . 'testfile', 'CSV' );
67
+		$zip = new \Aimeos\MW\Container\Zip( __DIR__.DIRECTORY_SEPARATOR.'testfile', 'CSV' );
68 68
 
69 69
 		$this->assertInstanceOf( '\\Aimeos\\MW\\Container\\Content\\Iface', $zip->get( 'tempfile.csv' ) );
70 70
 	}
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
 	public function testIterator()
74 74
 	{
75
-		$zip = new \Aimeos\MW\Container\Zip( __DIR__ . DIRECTORY_SEPARATOR . 'testfile', 'CSV' );
75
+		$zip = new \Aimeos\MW\Container\Zip( __DIR__.DIRECTORY_SEPARATOR.'testfile', 'CSV' );
76 76
 
77 77
 		$expected = array(
78 78
 			'tempfile.csv' => 2,
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 				$rows[] = $row;
94 94
 			}
95 95
 
96
-			$actual[ $entry->getName() ] = count( $rows );
96
+			$actual[$entry->getName()] = count( $rows );
97 97
 		}
98 98
 
99 99
 		$this->assertEquals( $expected, $actual );
Please login to merge, or discard this patch.