@@ -21,12 +21,12 @@ discard block |
||
21 | 21 | */ |
22 | 22 | protected function setUp() |
23 | 23 | { |
24 | - if( interface_exists( '\\Illuminate\\Session\\Store' ) === false ) { |
|
25 | - $this->markTestSkipped( 'Class \\Illuminate\\Session\\Store not found' ); |
|
24 | + if (interface_exists('\\Illuminate\\Session\\Store') === false) { |
|
25 | + $this->markTestSkipped('Class \\Illuminate\\Session\\Store not found'); |
|
26 | 26 | } |
27 | 27 | |
28 | - $this->mock = $this->getMockBuilder( '\\Illuminate\\Session\\Store' )->getMock(); |
|
29 | - $this->object = new \Aimeos\MW\Session\Laravel5( $this->mock ); |
|
28 | + $this->mock = $this->getMockBuilder('\\Illuminate\\Session\\Store')->getMock(); |
|
29 | + $this->object = new \Aimeos\MW\Session\Laravel5($this->mock); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | |
@@ -38,21 +38,21 @@ discard block |
||
38 | 38 | */ |
39 | 39 | protected function tearDown() |
40 | 40 | { |
41 | - unset( $this->object ); |
|
41 | + unset($this->object); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | |
45 | 45 | public function testGetDefault() |
46 | 46 | { |
47 | - $this->mock->expects( $this->once() )->method( 'get' )->with( $this->equalTo( 'notexist' ) ); |
|
48 | - $this->object->get( 'notexist' ); |
|
47 | + $this->mock->expects($this->once())->method('get')->with($this->equalTo('notexist')); |
|
48 | + $this->object->get('notexist'); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | |
52 | 52 | public function testSet() |
53 | 53 | { |
54 | - $this->mock->expects( $this->once() )->method( 'put' ) |
|
55 | - ->with( $this->equalTo( 'key' ), $this->equalTo( 'value' ) ); |
|
56 | - $this->object->set( 'key', 'value' ); |
|
54 | + $this->mock->expects($this->once())->method('put') |
|
55 | + ->with($this->equalTo('key'), $this->equalTo('value')); |
|
56 | + $this->object->set('key', 'value'); |
|
57 | 57 | } |
58 | 58 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * |
28 | 28 | * @param \Illuminate\View\Factory $factory Laravel view factory |
29 | 29 | */ |
30 | - public function __construct( \Illuminate\View\Factory $factory ) |
|
30 | + public function __construct(\Illuminate\View\Factory $factory) |
|
31 | 31 | { |
32 | 32 | $this->factory = $factory; |
33 | 33 | } |
@@ -42,19 +42,19 @@ discard block |
||
42 | 42 | * @return string Output generated by the template |
43 | 43 | * @throws \Aimeos\MW\View\Exception If the template isn't found |
44 | 44 | */ |
45 | - public function render( \Aimeos\MW\View\Iface $view, $filename, array $values ) |
|
45 | + public function render(\Aimeos\MW\View\Iface $view, $filename, array $values) |
|
46 | 46 | { |
47 | 47 | $factory = $this->factory; |
48 | - $lv = $factory->file( $filename, $values ); |
|
48 | + $lv = $factory->file($filename, $values); |
|
49 | 49 | |
50 | - $fcn = function() use ( $factory, $view ) |
|
50 | + $fcn = function() use ($factory, $view) |
|
51 | 51 | { |
52 | - foreach( $factory->getSections() as $name => $section ) { |
|
53 | - $view->block()->set( $name, $section ); |
|
52 | + foreach ($factory->getSections() as $name => $section) { |
|
53 | + $view->block()->set($name, $section); |
|
54 | 54 | } |
55 | 55 | }; |
56 | 56 | |
57 | - $contents = $lv->render( $fcn ); |
|
57 | + $contents = $lv->render($fcn); |
|
58 | 58 | $this->factory->flushSections(); |
59 | 59 | |
60 | 60 | return $contents; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * |
29 | 29 | * @param \Illuminate\Session\Store $object Laravel session object |
30 | 30 | */ |
31 | - public function __construct( \Illuminate\Session\Store $object ) |
|
31 | + public function __construct(\Illuminate\Session\Store $object) |
|
32 | 32 | { |
33 | 33 | $this->object = $object; |
34 | 34 | } |
@@ -43,9 +43,9 @@ discard block |
||
43 | 43 | * @param mixed $default Value returned if requested key isn't found |
44 | 44 | * @return mixed Value associated to the requested key |
45 | 45 | */ |
46 | - public function get( $name, $default = null ) |
|
46 | + public function get($name, $default = null) |
|
47 | 47 | { |
48 | - return $this->object->get( $name, $default ); |
|
48 | + return $this->object->get($name, $default); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | * @param mixed $value Value that should be associated with the given key |
59 | 59 | * @return void |
60 | 60 | */ |
61 | - public function set( $name, $value ) |
|
61 | + public function set($name, $value) |
|
62 | 62 | { |
63 | - $this->object->put( $name, $value ); |
|
63 | + $this->object->put($name, $value); |
|
64 | 64 | } |
65 | 65 | } |