@@ -39,7 +39,7 @@ |
||
39 | 39 | $name = 'MAdminCacheProxyDefaultTest'; |
40 | 40 | $this->context->getConfig()->set( 'madmin/cache/manager/name', $name ); |
41 | 41 | |
42 | - \Aimeos\MAdmin\Cache\Manager\Factory::injectManager( '\\Aimeos\\MAdmin\\Cache\\Manager\\' . $name, $manager ); |
|
42 | + \Aimeos\MAdmin\Cache\Manager\Factory::injectManager( '\\Aimeos\\MAdmin\\Cache\\Manager\\'.$name, $manager ); |
|
43 | 43 | |
44 | 44 | $this->object = new \Aimeos\MAdmin\Cache\Proxy\Standard( $this->context ); |
45 | 45 | } |
@@ -51,7 +51,7 @@ discard block |
||
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 |
||
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 |
||
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; |
@@ -54,7 +54,7 @@ discard block |
||
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 |
||
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 ) ); |
@@ -60,7 +60,7 @@ discard block |
||
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 |
||
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 |
||
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(); |
@@ -281,7 +281,7 @@ |
||
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 |
@@ -55,11 +55,11 @@ |
||
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 ) ); |
@@ -13,26 +13,26 @@ |
||
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 ) ); |
@@ -35,25 +35,25 @@ |
||
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 | } |
@@ -23,25 +23,25 @@ |
||
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 | } |