Passed
Push — master ( 47e37b...2360ce )
by Aimeos
05:11
created
lib/mshoplib/src/MAdmin/Cache/Manager/Standard.php 2 patches
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -217,9 +217,12 @@  discard block
 block discarded – undo
217 217
 			);
218 218
 			$dbm = $context->getDatabaseManager();
219 219
 
220
-			try {
220
+			try
221
+			{
221 222
 				$this->object = \Aimeos\MW\Cache\Factory::create( $name, $config, $dbm );
222
-			} catch( \Exception $e ) {
223
+			}
224
+			catch( \Exception $e )
225
+			{
223 226
 				$this->object = \Aimeos\MW\Cache\Factory::create( 'DB', $config, $dbm );
224 227
 			}
225 228
 		}
@@ -288,9 +291,12 @@  discard block
 block discarded – undo
288 291
 	 */
289 292
 	public function createItem( array $values = [] )
290 293
 	{
291
-		try {
294
+		try
295
+		{
292 296
 			$values['siteid'] = $this->getContext()->getLocale()->getSiteId();
293
-		} catch( \Exception $e ) {
297
+		}
298
+		catch( \Exception $e )
299
+		{
294 300
 			$values['siteid'] = null;
295 301
 		}
296 302
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -404,7 +404,7 @@
 block discarded – undo
404 404
 	 * Removes multiple items specified by ids in the array.
405 405
 	 *
406 406
 	 * @param string[] $ids List of IDs
407
-	* @return \Aimeos\MAdmin\Cache\Manager\Iface Manager object for chaining method calls
407
+	 * @return \Aimeos\MAdmin\Cache\Manager\Iface Manager object for chaining method calls
408 408
 	 */
409 409
 	public function deleteItems( array $ids )
410 410
 	{
Please login to merge, or discard this patch.
lib/mshoplib/setup/MShopAddLocaleLangCurData.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::create( $this->additional, 'Standard' );
52 52
 
53 53
 
54
-		$filename = __DIR__ . $ds . 'default'.  $ds . 'data'. $ds . 'language.php';
54
+		$filename = __DIR__ . $ds . 'default' . $ds . 'data' . $ds . 'language.php';
55 55
 
56 56
 		if( ( $data = include( $filename ) ) == false ) {
57 57
 			throw new \Aimeos\MW\Setup\Exception( sprintf( 'No data file "%1$s" found', $filename ) );
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 		}
63 63
 
64 64
 
65
-		$filename = __DIR__ . $ds . 'default'.  $ds . 'data'. $ds . 'currency.php';
65
+		$filename = __DIR__ . $ds . 'default' . $ds . 'data' . $ds . 'currency.php';
66 66
 
67 67
 		if( ( $data = include( $filename ) ) == false ) {
68 68
 			throw new \Aimeos\MW\Setup\Exception( sprintf( 'No data file "%1$s" found', $filename ) );
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Service/Provider/Payment/BaseTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
 
22 22
 		$servManager = \Aimeos\MShop\Service\Manager\Factory::create( $this->context );
23 23
 		$search = $servManager->createSearch();
24
-		$search->setConditions($search->compare('==', 'service.provider', 'Standard'));
25
-		$result = $servManager->searchItems($search, array('price'));
24
+		$search->setConditions( $search->compare( '==', 'service.provider', 'Standard' ) );
25
+		$result = $servManager->searchItems( $search, array( 'price' ) );
26 26
 
27 27
 		if( ( $item = reset( $result ) ) === false ) {
28 28
 			throw new \RuntimeException( 'No order base item found' );
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Coupon/Provider/Decorator/CategoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 		$this->couponItem = \Aimeos\MShop\Coupon\Manager\Factory::create( $this->context )->createItem();
25 25
 
26 26
 		$provider = new \Aimeos\MShop\Coupon\Provider\Example( $this->context, $this->couponItem, 'abcd' );
27
-		$this->object = new \Aimeos\MShop\Coupon\Provider\Decorator\Category( $provider, $this->context, $this->couponItem, 'abcd');
27
+		$this->object = new \Aimeos\MShop\Coupon\Provider\Decorator\Category( $provider, $this->context, $this->couponItem, 'abcd' );
28 28
 		$this->object->setObject( $this->object );
29 29
 
30 30
 		$priceManager = \Aimeos\MShop::create( $this->context, 'price' );
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Coupon/Provider/Decorator/SupplierTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 		$this->couponItem = \Aimeos\MShop\Coupon\Manager\Factory::create( $this->context )->createItem();
25 25
 
26 26
 		$provider = new \Aimeos\MShop\Coupon\Provider\Example( $this->context, $this->couponItem, 'abcd' );
27
-		$this->object = new \Aimeos\MShop\Coupon\Provider\Decorator\Supplier( $provider, $this->context, $this->couponItem, 'abcd');
27
+		$this->object = new \Aimeos\MShop\Coupon\Provider\Decorator\Supplier( $provider, $this->context, $this->couponItem, 'abcd' );
28 28
 		$this->object->setObject( $this->object );
29 29
 
30 30
 		$priceManager = \Aimeos\MShop::create( $this->context, 'price' );
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Coupon/Provider/Decorator/RequiredTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 		$this->couponItem = \Aimeos\MShop\Coupon\Manager\Factory::create( $context )->createItem();
25 25
 
26 26
 		$provider = new \Aimeos\MShop\Coupon\Provider\Example( $context, $this->couponItem, 'abcd' );
27
-		$this->object = new \Aimeos\MShop\Coupon\Provider\Decorator\Required( $provider, $context, $this->couponItem, 'abcd');
27
+		$this->object = new \Aimeos\MShop\Coupon\Provider\Decorator\Required( $provider, $context, $this->couponItem, 'abcd' );
28 28
 		$this->object->setObject( $this->object );
29 29
 
30 30
 		$orderManager = \Aimeos\MShop\Order\Manager\Factory::create( $context );
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Attribute/Manager/Property/Type/StandardTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@  discard block
 block discarded – undo
19 19
 	{
20 20
 		$this->editor = \TestHelperMShop::getContext()->getEditor();
21 21
 		$manager = \Aimeos\MShop\Attribute\Manager\Factory::create( \TestHelperMShop::getContext() );
22
-		$this->object = $manager->getSubManager( 'property' )->getSubManager('type');
22
+		$this->object = $manager->getSubManager( 'property' )->getSubManager( 'type' );
23 23
 	}
24 24
 
25 25
 
26 26
 	protected function tearDown()
27 27
 	{
28
-		unset($this->object);
28
+		unset( $this->object );
29 29
 	}
30 30
 
31 31
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
 		$results = $this->object->searchItems( $search );
70 70
 
71
-		if( ($expected = reset($results) ) === false )
71
+		if( ( $expected = reset( $results ) ) === false )
72 72
 		{
73 73
 			throw new \RuntimeException( 'No property type item found.' );
74 74
 		}
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
 	{
91 91
 		$search = $this->object->createSearch();
92 92
 		$search->setConditions( $search->compare( '==', 'attribute.property.type.editor', $this->editor ) );
93
-		$results = $this->object->searchItems($search);
93
+		$results = $this->object->searchItems( $search );
94 94
 
95
-		if( ( $item = reset($results) ) === false ) {
95
+		if( ( $item = reset( $results ) ) === false ) {
96 96
 			throw new \RuntimeException( 'No type item found' );
97 97
 		}
98 98
 
99
-		$item->setId(null);
99
+		$item->setId( null );
100 100
 		$item->setCode( 'unitTestSave' );
101 101
 		$resultSaved = $this->object->saveItem( $item );
102 102
 		$itemSaved = $this->object->getItem( $item->getId() );
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 		$search->setConditions( $search->combine( '&&', $conditions ) );
174 174
 		$search->setSortations( [$search->sort( '-', 'attribute.property.type.position' )] );
175 175
 		$search->setSlice( 0, 2 );
176
-		$items = $this->object->searchItems( $search, [], $total);
176
+		$items = $this->object->searchItems( $search, [], $total );
177 177
 
178 178
 		$this->assertEquals( 2, count( $items ) );
179 179
 		$this->assertEquals( 3, $total );
@@ -190,6 +190,6 @@  discard block
 block discarded – undo
190 190
 	public function testGetSubManager()
191 191
 	{
192 192
 		$this->setExpectedException( \Aimeos\MShop\Exception::class );
193
-		$this->object->getSubManager('unknown');
193
+		$this->object->getSubManager( 'unknown' );
194 194
 	}
195 195
 }
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Service/Provider/Decorator/BaseTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
 
22 22
 		$servManager = \Aimeos\MShop\Service\Manager\Factory::create( $this->context );
23 23
 		$search = $servManager->createSearch();
24
-		$search->setConditions($search->compare('==', 'service.provider', 'Standard'));
25
-		$result = $servManager->searchItems($search, array('price'));
24
+		$search->setConditions( $search->compare( '==', 'service.provider', 'Standard' ) );
25
+		$result = $servManager->searchItems( $search, array( 'price' ) );
26 26
 
27 27
 		if( ( $item = reset( $result ) ) === false ) {
28 28
 			throw new \RuntimeException( 'No order base item found' );
Please login to merge, or discard this patch.
lib/mshoplib/setup/default/schema/attribute.php 1 patch
Spacing   +7 added lines, -7 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
-		'mshop_attribute_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
11
+		'mshop_attribute_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
12 12
 
13 13
 			$table = $schema->createTable( 'mshop_attribute_type' );
14 14
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 			return $schema;
33 33
 		},
34 34
 
35
-		'mshop_attribute' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
35
+		'mshop_attribute' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
36 36
 
37 37
 			$table = $schema->createTable( 'mshop_attribute' );
38 38
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 			$table->addColumn( 'status', 'smallint', [] );
47 47
 			$table->addColumn( 'mtime', 'datetime', [] );
48 48
 			$table->addColumn( 'ctime', 'datetime', [] );
49
-			$table->addColumn( 'editor', 'string', array('length' => 255 ) );
49
+			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
50 50
 
51 51
 			$table->setPrimaryKey( array( 'id' ), 'pk_msatt_id' );
52 52
 			$table->addUniqueIndex( array( 'siteid', 'domain', 'type', 'code' ), 'unq_msatt_sid_dom_type_code' );
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 			return $schema;
60 60
 		},
61 61
 
62
-		'mshop_attribute_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
62
+		'mshop_attribute_list_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
63 63
 
64 64
 			$table = $schema->createTable( 'mshop_attribute_list_type' );
65 65
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 			return $schema;
84 84
 		},
85 85
 
86
-		'mshop_attribute_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
86
+		'mshop_attribute_list' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
87 87
 
88 88
 			$table = $schema->createTable( 'mshop_attribute_list' );
89 89
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 			return $schema;
113 113
 		},
114 114
 
115
-		'mshop_attribute_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
115
+		'mshop_attribute_property_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
116 116
 
117 117
 			$table = $schema->createTable( 'mshop_attribute_property_type' );
118 118
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 			return $schema;
137 137
 		},
138 138
 
139
-		'mshop_attribute_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
139
+		'mshop_attribute_property' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
140 140
 
141 141
 			$table = $schema->createTable( 'mshop_attribute_property' );
142 142
 
Please login to merge, or discard this patch.