@@ -21,7 +21,7 @@ |
||
21 | 21 | |
22 | 22 | protected function tearDown() |
23 | 23 | { |
24 | - unset($this->object); |
|
24 | + unset( $this->object ); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 |
@@ -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 | } |
@@ -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 ) ); |
@@ -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 | } |
@@ -11,13 +11,13 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 ); |