Completed
Push — master ( 7ac949...d0dda4 )
by Aimeos
11:16
created
lib/mshoplib/setup/unittest/ProductAddPropertyTestData.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 		$this->additional->setEditor( 'core:unittest' );
52 52
 
53 53
 		$ds = DIRECTORY_SEPARATOR;
54
-		$path = __DIR__ . $ds . 'data' . $ds . 'productproperty.php';
54
+		$path = __DIR__.$ds.'data'.$ds.'productproperty.php';
55 55
 
56 56
 		if( ( $testdata = include( $path ) ) == false ) {
57 57
 			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for product domain', $path ) );
@@ -89,19 +89,19 @@  discard block
 block discarded – undo
89 89
 			$type->setStatus( $dataset['status'] );
90 90
 
91 91
 			$productPropertyTypeManager->saveItem( $type );
92
-			$typeIds[ $key ] = $type->getId();
92
+			$typeIds[$key] = $type->getId();
93 93
 		}
94 94
 
95 95
 		$prodProperty = $productPropertyManager->createItem();
96 96
 		foreach( $testdata['product/property'] as $key => $dataset )
97 97
 		{
98
-			if( !isset( $typeIds[ $dataset['typeid'] ] ) ) {
98
+			if( !isset( $typeIds[$dataset['typeid']] ) ) {
99 99
 				throw new \Aimeos\MW\Setup\Exception( sprintf( 'No product property type ID found for "%1$s"', $dataset['typeid'] ) );
100 100
 			}
101 101
 
102 102
 			$prodProperty->setId( null );
103
-			$prodProperty->setParentId( $prodIds[ $dataset['parentid'] ] );
104
-			$prodProperty->setTypeId( $typeIds[ $dataset['typeid'] ] );
103
+			$prodProperty->setParentId( $prodIds[$dataset['parentid']] );
104
+			$prodProperty->setTypeId( $typeIds[$dataset['typeid']] );
105 105
 			$prodProperty->setLanguageId( $dataset['langid'] );
106 106
 			$prodProperty->setValue( $dataset['value'] );
107 107
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 		$search = $productManager->createSearch();
125 125
 
126 126
 		foreach( $productManager->searchItems( $search ) as $id => $item ) {
127
-			$entry[ 'product/' . $item->getCode() ] = $id;
127
+			$entry['product/'.$item->getCode()] = $id;
128 128
 		}
129 129
 
130 130
 		return $entry;
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/data/productproperty.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  * @copyright Aimeos (aimeos.org), 2014-2015
6 6
  */
7 7
 
8
-return array (
8
+return array(
9 9
 	'product/property/type' => array(
10 10
 		'product/property/type/packheight' => array( 'domain' => 'product', 'code' => 'package-height', 'label' => 'Package height', 'status' => 1 ),
11 11
 		'product/property/type/packlength' => array( 'domain' => 'product', 'code' => 'package-length', 'label' => 'Package lenght', 'status' => 1 ),
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
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $this->additional, 'Standard' );
55 55
 
56 56
 
57
-		$filename = __DIR__ . $ds . 'default'.  $ds . 'data'. $ds . 'language.php';
57
+		$filename = __DIR__.$ds.'default'.$ds.'data'.$ds.'language.php';
58 58
 
59 59
 		if( ( $data = include( $filename ) ) == false ) {
60 60
 			throw new \Aimeos\MW\Setup\Exception( sprintf( 'No data file "%1$s" found', $filename ) );
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		}
66 66
 
67 67
 
68
-		$filename = __DIR__ . $ds . 'default'.  $ds . 'data'. $ds . 'currency.php';
68
+		$filename = __DIR__.$ds.'default'.$ds.'data'.$ds.'currency.php';
69 69
 
70 70
 		if( ( $data = include( $filename ) ) == false ) {
71 71
 			throw new \Aimeos\MW\Setup\Exception( sprintf( 'No data file "%1$s" found', $filename ) );
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Product/Item/Property/Standard.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	 */
61 61
 	public function setLanguageId( $id )
62 62
 	{
63
-		if ( $id == $this->getLanguageId() ) { return $this; }
63
+		if( $id == $this->getLanguageId() ) { return $this; }
64 64
 
65 65
 		$this->values['product.property.languageid'] = $this->checkLanguageId( $id );
66 66
 		$this->setModified();
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 	 */
140 140
 	public function setTypeId( $id )
141 141
 	{
142
-		if ( $id == $this->getTypeId() ) { return $this; }
142
+		if( $id == $this->getTypeId() ) { return $this; }
143 143
 
144 144
 		$this->values['product.property.typeid'] = (int) $id;
145 145
 		$this->setModified();
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 	 */
172 172
 	public function setValue( $value )
173 173
 	{
174
-		if ( $value == $this->getValue() ) { return $this; }
174
+		if( $value == $this->getValue() ) { return $this; }
175 175
 
176 176
 		$this->values['product.property.value'] = (string) $value;
177 177
 		$this->setModified();
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Product/Manager/Property/Type/Standard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -281,7 +281,7 @@
 block discarded – undo
281 281
 		 * @see mshop/product/manager/property/type/decorators/global
282 282
 		 */
283 283
 
284
-		return $this->getSubManagerBase( 'product', 'property/type/' . $manager, $name );
284
+		return $this->getSubManagerBase( 'product', 'property/type/'.$manager, $name );
285 285
 	}
286 286
 
287 287
 
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Common/Item/Helper/Password/Hash.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,11 +55,11 @@
 block discarded – undo
55 55
 		$iterations = ( isset( $this->options['iterations'] ) ? (int) $this->options['iterations'] : 1 );
56 56
 		
57 57
 		$salted = sprintf( $format, $password, $salt );
58
-		$digest = hash( $this->options['algorithm'], $salted, true);
58
+		$digest = hash( $this->options['algorithm'], $salted, true );
59 59
 		
60 60
 		// "stretch" hash
61
-		for ($i = 1; $i < $iterations; $i++ ) {
62
-			$digest = hash( $this->options['algorithm'], $digest . $salted, true);
61
+		for( $i = 1; $i < $iterations; $i++ ) {
62
+			$digest = hash( $this->options['algorithm'], $digest.$salted, true );
63 63
 		}
64 64
 		
65 65
 		return ( $encode ? base64_encode( $digest ) : bin2hex( $digest ) );
Please login to merge, or discard this patch.
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   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -695,7 +695,8 @@
 block discarded – undo
695 695
 	 * @param string[] $ref List of domains to fetch list items and referenced items for, e.g.
696 696
 	 *	"order/base/address", "order/base/coupon", "order/base/product", "order/base/service"
697 697
 	 * @param integer|null &$total Number of items that are available in total
698
-	 * @return array List of items implementing \Aimeos\MShop\Order\Item\Base\Iface
698
+	 * @param integer $total
699
+	 * @return \Aimeos\MShop\Order\Item\Base\Iface[] List of items implementing \Aimeos\MShop\Order\Item\Base\Iface
699 700
 	 */
700 701
 	public function searchItems( \Aimeos\MW\Criteria\Iface $search, array $ref = [], &$total = null )
701 702
 	{
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.