Passed
Push — master ( f7bbd3...17cd43 )
by Aimeos
04:27
created
lib/mwlib/tests/MW/Criteria/Expression/Compare/SQLTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
 			'bool' => 't.bool',
86 86
 		);
87 87
 
88
-		$expr = new \Aimeos\MW\Criteria\Expression\Compare\SQL( $this->conn, '==', 'list', array('a', 'b', 'c') );
88
+		$expr = new \Aimeos\MW\Criteria\Expression\Compare\SQL( $this->conn, '==', 'list', array( 'a', 'b', 'c' ) );
89 89
 		$this->assertEquals( "t.list IN ('a','b','c')", $expr->toSource( $types, $translations ) );
90 90
 
91
-		$expr = new \Aimeos\MW\Criteria\Expression\Compare\SQL( $this->conn, '!=', 'list', array('a', 'b', 'c') );
91
+		$expr = new \Aimeos\MW\Criteria\Expression\Compare\SQL( $this->conn, '!=', 'list', array( 'a', 'b', 'c' ) );
92 92
 		$this->assertEquals( "t.list NOT IN ('a','b','c')", $expr->toSource( $types, $translations ) );
93 93
 
94 94
 		$expr = new \Aimeos\MW\Criteria\Expression\Compare\SQL( $this->conn, '~=', 'string', 'value' );
@@ -97,13 +97,13 @@  discard block
 block discarded – undo
97 97
 		$expr = new \Aimeos\MW\Criteria\Expression\Compare\SQL( $this->conn, '<', 'float', 0.1 );
98 98
 		$this->assertEquals( "t.float < 0.1", $expr->toSource( $types, $translations ) );
99 99
 
100
-		$expr= new \Aimeos\MW\Criteria\Expression\Compare\SQL( $this->conn, '>', 'int', 10 );
100
+		$expr = new \Aimeos\MW\Criteria\Expression\Compare\SQL( $this->conn, '>', 'int', 10 );
101 101
 		$this->assertEquals( "t.int > 10", $expr->toSource( $types, $translations ) );
102 102
 
103
-		$expr= new \Aimeos\MW\Criteria\Expression\Compare\SQL( $this->conn, '!=', 'undefined', null );
103
+		$expr = new \Aimeos\MW\Criteria\Expression\Compare\SQL( $this->conn, '!=', 'undefined', null );
104 104
 		$this->assertEquals( "t.undefined IS NOT NULL", $expr->toSource( $types, $translations ) );
105 105
 
106
-		$expr= new \Aimeos\MW\Criteria\Expression\Compare\SQL( $this->conn, '==', 'bool', true );
106
+		$expr = new \Aimeos\MW\Criteria\Expression\Compare\SQL( $this->conn, '==', 'bool', true );
107 107
 		$this->assertEquals( "t.bool = 1", $expr->toSource( $types, $translations ) );
108 108
 	}
109 109
 
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Criteria/Expression/Compare/PgSQLTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
 			'bool' => 't.bool',
53 53
 		);
54 54
 
55
-		$expr = new \Aimeos\MW\Criteria\Expression\Compare\PgSQL( $this->conn, '==', 'list', array('a', 'b', 'c') );
55
+		$expr = new \Aimeos\MW\Criteria\Expression\Compare\PgSQL( $this->conn, '==', 'list', array( 'a', 'b', 'c' ) );
56 56
 		$this->assertEquals( "t.list IN ('a','b','c')", $expr->toSource( $types, $translations ) );
57 57
 
58
-		$expr = new \Aimeos\MW\Criteria\Expression\Compare\PgSQL( $this->conn, '!=', 'list', array('a', 'b', 'c') );
58
+		$expr = new \Aimeos\MW\Criteria\Expression\Compare\PgSQL( $this->conn, '!=', 'list', array( 'a', 'b', 'c' ) );
59 59
 		$this->assertEquals( "t.list NOT IN ('a','b','c')", $expr->toSource( $types, $translations ) );
60 60
 
61 61
 		$expr = new \Aimeos\MW\Criteria\Expression\Compare\PgSQL( $this->conn, '~=', 'string', 'value' );
@@ -64,16 +64,16 @@  discard block
 block discarded – undo
64 64
 		$expr = new \Aimeos\MW\Criteria\Expression\Compare\PgSQL( $this->conn, '<', 'float', 0.1 );
65 65
 		$this->assertEquals( "t.float < 0.1", $expr->toSource( $types, $translations ) );
66 66
 
67
-		$expr= new \Aimeos\MW\Criteria\Expression\Compare\PgSQL( $this->conn, '>', 'int', 10 );
67
+		$expr = new \Aimeos\MW\Criteria\Expression\Compare\PgSQL( $this->conn, '>', 'int', 10 );
68 68
 		$this->assertEquals( "t.int > 10", $expr->toSource( $types, $translations ) );
69 69
 
70
-		$expr= new \Aimeos\MW\Criteria\Expression\Compare\PgSQL( $this->conn, '!=', 'undefined', null );
70
+		$expr = new \Aimeos\MW\Criteria\Expression\Compare\PgSQL( $this->conn, '!=', 'undefined', null );
71 71
 		$this->assertEquals( "t.undefined IS NOT NULL", $expr->toSource( $types, $translations ) );
72 72
 
73
-		$expr= new \Aimeos\MW\Criteria\Expression\Compare\PgSQL( $this->conn, '==', 'bool', true );
73
+		$expr = new \Aimeos\MW\Criteria\Expression\Compare\PgSQL( $this->conn, '==', 'bool', true );
74 74
 		$this->assertEquals( "t.bool = 't'", $expr->toSource( $types, $translations ) );
75 75
 
76
-		$expr= new \Aimeos\MW\Criteria\Expression\Compare\PgSQL( $this->conn, '==', 'bool', false );
76
+		$expr = new \Aimeos\MW\Criteria\Expression\Compare\PgSQL( $this->conn, '==', 'bool', false );
77 77
 		$this->assertEquals( "t.bool = 'f'", $expr->toSource( $types, $translations ) );
78 78
 	}
79 79
 }
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Criteria/PgSQLTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,11 +43,11 @@
 block discarded – undo
43 43
 
44 44
 	public function testGetConditionSource()
45 45
 	{
46
-		$types = array( 'column' => \Aimeos\MW\DB\Statement\Base::PARAM_BOOL);
46
+		$types = array( 'column' => \Aimeos\MW\DB\Statement\Base::PARAM_BOOL );
47 47
 		$this->object->setConditions( $this->object->compare( '==', 'column', 0 ) );
48 48
 		$this->assertEquals( "column = 'f'", $this->object->getConditionSource( $types ) );
49 49
 
50
-		$types = array( 'column' => \Aimeos\MW\DB\Statement\Base::PARAM_BOOL);
50
+		$types = array( 'column' => \Aimeos\MW\DB\Statement\Base::PARAM_BOOL );
51 51
 		$this->object->setConditions( $this->object->compare( '==', 'column', 1 ) );
52 52
 		$this->assertEquals( "column = 't'", $this->object->getConditionSource( $types ) );
53 53
 	}
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Coupon/Provider/VoucherTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 	public function testCheckVoucher()
82 82
 	{
83 83
 		$this->setExpectedException( \Aimeos\MShop\Coupon\Exception::class );
84
-		$this->access( 'checkVoucher' )->invokeArgs( $this->object, [-1, [5,6]] );
84
+		$this->access( 'checkVoucher' )->invokeArgs( $this->object, [-1, [5, 6]] );
85 85
 	}
86 86
 
87 87
 
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Supplier/Manager/Factory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -66,14 +66,14 @@
 block discarded – undo
66 66
 		 * @since 2014.03
67 67
 		 * @category Developer
68 68
 		 */
69
-		if ( $name === null ) {
70
-			$name = $context->getConfig()->get('mshop/supplier/manager/name', 'Standard');
69
+		if( $name === null ) {
70
+			$name = $context->getConfig()->get( 'mshop/supplier/manager/name', 'Standard' );
71 71
 		}
72 72
 
73
-		if ( ctype_alnum($name) === false )
73
+		if( ctype_alnum( $name ) === false )
74 74
 		{
75
-			$classname = is_string($name) ? '\Aimeos\MShop\Supplier\Manager\\' . $name : '<not a string>';
76
-			throw new \Aimeos\MShop\Supplier\Exception(sprintf('Invalid characters in class name "%1$s"', $classname));
75
+			$classname = is_string( $name ) ? '\Aimeos\MShop\Supplier\Manager\\' . $name : '<not a string>';
76
+			throw new \Aimeos\MShop\Supplier\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
77 77
 		}
78 78
 
79 79
 		$iface = \Aimeos\MShop\Supplier\Manager\Iface::class;
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Tree/Manager/DBNestedSetTest.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -179,14 +179,14 @@  discard block
 block discarded – undo
179 179
 	public function testConstructorNoDatabaseManager()
180 180
 	{
181 181
 		$this->setExpectedException( \Aimeos\MW\Tree\Exception::class );
182
-		new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, null);
182
+		new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, null );
183 183
 	}
184 184
 
185 185
 
186 186
 	public function testConstructorNoConfig()
187 187
 	{
188 188
 		$this->setExpectedException( \Aimeos\MW\Tree\Exception::class );
189
-		new \Aimeos\MW\Tree\Manager\DBNestedSet([], self::$dbm);
189
+		new \Aimeos\MW\Tree\Manager\DBNestedSet( [], self::$dbm );
190 190
 	}
191 191
 
192 192
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 		unset( $this->config['sql'] );
196 196
 
197 197
 		$this->setExpectedException( \Aimeos\MW\Tree\Exception::class );
198
-		new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, self::$dbm);
198
+		new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm );
199 199
 	}
200 200
 
201 201
 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 		unset( $this->config['sql']['newid'] );
205 205
 
206 206
 		$this->setExpectedException( \Aimeos\MW\Tree\Exception::class );
207
-		new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, self::$dbm);
207
+		new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm );
208 208
 	}
209 209
 
210 210
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 		unset( $this->config['search']['id'] );
214 214
 
215 215
 		$this->setExpectedException( \Aimeos\MW\Tree\Exception::class );
216
-		new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, self::$dbm);
216
+		new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm );
217 217
 	}
218 218
 
219 219
 
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 
261 261
 
262 262
 		if( ( $node = reset( $nodes ) ) === false ) {
263
-			throw new \RuntimeException('No node found');
263
+			throw new \RuntimeException( 'No node found' );
264 264
 		}
265 265
 
266 266
 		$search->setConditions( $search->compare( '==', 'tree.level', 3 ) );
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 
285 285
 		$this->setExpectedException( \Aimeos\MW\DB\Exception::class );
286 286
 
287
-		$manager = new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, self::$dbm);
287
+		$manager = new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm );
288 288
 		$manager->searchNodes( $manager->createSearch() );
289 289
 	}
290 290
 
@@ -321,8 +321,8 @@  discard block
 block discarded – undo
321 321
 		$this->setExpectedException( \Aimeos\MW\DB\Exception::class );
322 322
 
323 323
 		$manager = new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm );
324
-		$root = $manager->getNode( null, \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE  );
325
-		$manager->deleteNode($root->getId());
324
+		$root = $manager->getNode( null, \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE );
325
+		$manager->deleteNode( $root->getId() );
326 326
 	}
327 327
 
328 328
 
@@ -392,10 +392,10 @@  discard block
 block discarded – undo
392 392
 
393 393
 	public function testGetLevelFromConstantException()
394 394
 	{
395
-		$manager = new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, self::$dbm);
395
+		$manager = new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm );
396 396
 
397 397
 		$this->setExpectedException( \Aimeos\MW\Tree\Exception::class );
398
-		$manager->getNode( null, 0);
398
+		$manager->getNode( null, 0 );
399 399
 	}
400 400
 
401 401
 
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
 
433 433
 	public function testInsertNodeException()
434 434
 	{
435
-		$manager = new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, self::$dbm);
435
+		$manager = new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm );
436 436
 		$newNode = $manager->createNode();
437 437
 
438 438
 		$this->setExpectedException( \Aimeos\MW\Tree\Exception::class );
@@ -1023,7 +1023,7 @@  discard block
 block discarded – undo
1023 1023
 		';
1024 1024
 
1025 1025
 
1026
-		$manager = new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, self::$dbm);
1026
+		$manager = new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm );
1027 1027
 
1028 1028
 		$root = $manager->getNode( null, \Aimeos\MW\Tree\Manager\Base::LEVEL_TREE );
1029 1029
 
@@ -1055,7 +1055,7 @@  discard block
 block discarded – undo
1055 1055
 		$node = $manager->createNode();
1056 1056
 
1057 1057
 		$this->setExpectedException( \Aimeos\MW\Tree\Exception::class );
1058
-		$manager->saveNode($node);
1058
+		$manager->saveNode( $node );
1059 1059
 	}
1060 1060
 
1061 1061
 
@@ -1065,7 +1065,7 @@  discard block
 block discarded – undo
1065 1065
 			UPDATE "mw_tree_test" SET label123 = ?, status = ? WHERE id = ?
1066 1066
 		';
1067 1067
 
1068
-		$manager = new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, self::$dbm);
1068
+		$manager = new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm );
1069 1069
 		$root = $manager->getNode( null, \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE );
1070 1070
 
1071 1071
 		$root->setLabel( 'rooot' );
@@ -1081,7 +1081,7 @@  discard block
 block discarded – undo
1081 1081
 		$method = $class->getMethod( 'setReadOnly' );
1082 1082
 		$method->setAccessible( true );
1083 1083
 
1084
-		$manager = new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, self::$dbm);
1084
+		$manager = new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm );
1085 1085
 
1086 1086
 		$method->invokeArgs( $manager, [] );
1087 1087
 
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Tree/Node/DBNestedSetTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,14 +52,14 @@
 block discarded – undo
52 52
 
53 53
 	public function testSetId()
54 54
 	{
55
-		$this->object->setId(null);
55
+		$this->object->setId( null );
56 56
 		$this->assertEquals( true, $this->object->isModified() );
57 57
 	}
58 58
 
59 59
 	public function testGetChild()
60 60
 	{
61 61
 		$this->setExpectedException( \Aimeos\MW\Tree\Exception::class );
62
-		$this->object->getChild(null);
62
+		$this->object->getChild( null );
63 63
 	}
64 64
 
65 65
 	public function testMagicGet()
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Criteria/SQLTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 		$this->object->setConditions( $this->object->combine( '&&', $expr ) );
121 121
 		$this->assertEquals( "( int_col = 1 AND ( str_col = 'test' ) )", $this->object->getConditionSource( $types, $translations ) );
122 122
 
123
-		$types = array( 'column' => \Aimeos\MW\DB\Statement\Base::PARAM_BOOL);
123
+		$types = array( 'column' => \Aimeos\MW\DB\Statement\Base::PARAM_BOOL );
124 124
 		$this->object->setConditions( $this->object->compare( '==', 'column', 1 ) );
125 125
 		$this->assertEquals( "column = 1", $this->object->getConditionSource( $types ) );
126 126
 	}
@@ -188,10 +188,10 @@  discard block
 block discarded – undo
188 188
 	{
189 189
 		$types = array( 'asc_column' => \Aimeos\MW\DB\Statement\Base::PARAM_INT, 'desc_column' => \Aimeos\MW\DB\Statement\Base::PARAM_STR );
190 190
 
191
-		$this->assertEquals('asc_column ASC', $this->object->getSortationSource( $types ) );
191
+		$this->assertEquals( 'asc_column ASC', $this->object->getSortationSource( $types ) );
192 192
 
193 193
 		$translations = array( 'asc_column' => 'asc_int_col', 'desc_column' => 'desc_str_col' );
194
-		$this->assertEquals('asc_int_col ASC', $this->object->getSortationSource( $types, $translations ));
194
+		$this->assertEquals( 'asc_int_col ASC', $this->object->getSortationSource( $types, $translations ) );
195 195
 	}
196 196
 
197 197
 
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Criteria/Expression/Combine/SQLTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 		);
59 59
 
60 60
 		$expr1 = [];
61
-		$expr1[] = new \Aimeos\MW\Criteria\Expression\Compare\SQL( $conn, '==', 'list', array('a', 'b', 'c') );
61
+		$expr1[] = new \Aimeos\MW\Criteria\Expression\Compare\SQL( $conn, '==', 'list', array( 'a', 'b', 'c' ) );
62 62
 		$expr1[] = new \Aimeos\MW\Criteria\Expression\Compare\SQL( $conn, '~=', 'string', 'value' );
63 63
 
64 64
 		$expr2 = [];
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
 		$expected = " NOT ( ( list IN ('a','b','c') AND string LIKE '%value%' ESCAPE '#' ) OR ( float < 0.1 AND int > 10 ) )";
76 76
 		$this->assertEquals( $expected, $test->toSource( $types ) );
77 77
 
78
-		$obj = new \Aimeos\MW\Criteria\Expression\Combine\SQL('&&', []);
79
-		$this->assertEquals('', $obj->toSource($types));
78
+		$obj = new \Aimeos\MW\Criteria\Expression\Combine\SQL( '&&', [] );
79
+		$this->assertEquals( '', $obj->toSource( $types ) );
80 80
 
81 81
 		$this->setExpectedException( \Aimeos\MW\Common\Exception::class );
82
-		new \Aimeos\MW\Criteria\Expression\Combine\SQL('', []);
82
+		new \Aimeos\MW\Criteria\Expression\Combine\SQL( '', [] );
83 83
 
84 84
 	}
85 85
 }
Please login to merge, or discard this patch.