@@ -30,14 +30,14 @@ discard block |
||
30 | 30 | * @param \\Aimeos\MW\View\Iface $view View instance with registered view helpers |
31 | 31 | * @param \Illuminate\Http\Request $request Laravel request object |
32 | 32 | */ |
33 | - public function __construct( \Aimeos\MW\View\Iface $view, \Illuminate\Http\Request $request ) |
|
33 | + public function __construct(\Aimeos\MW\View\Iface $view, \Illuminate\Http\Request $request) |
|
34 | 34 | { |
35 | 35 | $this->request = $request; |
36 | 36 | |
37 | 37 | $factory = new \Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory(); |
38 | - $psr7request = $factory->createRequest( $request ); |
|
38 | + $psr7request = $factory->createRequest($request); |
|
39 | 39 | |
40 | - parent::__construct( $view, $psr7request ); |
|
40 | + parent::__construct($view, $psr7request); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public function getTarget() |
61 | 61 | { |
62 | - if( ( $route = $this->request->route() ) !== null ) { |
|
62 | + if (($route = $this->request->route()) !== null) { |
|
63 | 63 | return $route->getName(); |
64 | 64 | } |
65 | 65 | } |
@@ -27,11 +27,11 @@ |
||
27 | 27 | * @param \\Aimeos\MW\View\Iface $view View instance with registered view helpers |
28 | 28 | * @param \Illuminate\Http\Response $response Laravel response object |
29 | 29 | */ |
30 | - public function __construct( \Aimeos\MW\View\Iface $view, \Illuminate\Http\Response $response ) |
|
30 | + public function __construct(\Aimeos\MW\View\Iface $view, \Illuminate\Http\Response $response) |
|
31 | 31 | { |
32 | 32 | $factory = new \Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory(); |
33 | - $psr7response = $factory->createResponse( $response ); |
|
33 | + $psr7response = $factory->createResponse($response); |
|
34 | 34 | |
35 | - parent::__construct( $view, $psr7response ); |
|
35 | + parent::__construct($view, $psr7response); |
|
36 | 36 | } |
37 | 37 | } |
@@ -17,42 +17,42 @@ |
||
17 | 17 | |
18 | 18 | protected function setUp() |
19 | 19 | { |
20 | - if( !class_exists( '\Illuminate\Http\Request' ) ) { |
|
21 | - $this->markTestSkipped( '\Illuminate\Http\Request is not available' ); |
|
20 | + if (!class_exists('\Illuminate\Http\Request')) { |
|
21 | + $this->markTestSkipped('\Illuminate\Http\Request is not available'); |
|
22 | 22 | } |
23 | 23 | |
24 | - if( !class_exists( '\Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory' ) ) { |
|
25 | - $this->markTestSkipped( '\Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory is not available' ); |
|
24 | + if (!class_exists('\Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory')) { |
|
25 | + $this->markTestSkipped('\Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory is not available'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | $view = new \Aimeos\MW\View\Standard(); |
29 | - $param = array( 'HTTP_HOST' => 'localhost', 'REMOTE_ADDR' => '127.0.0.1' ); |
|
30 | - $request = new \Illuminate\Http\Request( array(), array(), array(), array(), array(), $param, 'Content' ); |
|
29 | + $param = array('HTTP_HOST' => 'localhost', 'REMOTE_ADDR' => '127.0.0.1'); |
|
30 | + $request = new \Illuminate\Http\Request(array(), array(), array(), array(), array(), $param, 'Content'); |
|
31 | 31 | |
32 | - $this->object = new \Aimeos\MW\View\Helper\Request\Laravel5( $view, $request ); |
|
32 | + $this->object = new \Aimeos\MW\View\Helper\Request\Laravel5($view, $request); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | |
36 | 36 | protected function tearDown() |
37 | 37 | { |
38 | - unset( $this->object, $this->mock ); |
|
38 | + unset($this->object, $this->mock); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | |
42 | 42 | public function testTransform() |
43 | 43 | { |
44 | - $this->assertInstanceOf( '\Aimeos\MW\View\Helper\Request\Laravel5', $this->object->transform() ); |
|
44 | + $this->assertInstanceOf('\Aimeos\MW\View\Helper\Request\Laravel5', $this->object->transform()); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | |
48 | 48 | public function testGetClientAddress() |
49 | 49 | { |
50 | - $this->assertEquals( '127.0.0.1', $this->object->getClientAddress() ); |
|
50 | + $this->assertEquals('127.0.0.1', $this->object->getClientAddress()); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | |
54 | 54 | public function testGetTarget() |
55 | 55 | { |
56 | - $this->assertEquals( null, $this->object->getTarget() ); |
|
56 | + $this->assertEquals(null, $this->object->getTarget()); |
|
57 | 57 | } |
58 | 58 | } |
@@ -17,29 +17,29 @@ |
||
17 | 17 | |
18 | 18 | protected function setUp() |
19 | 19 | { |
20 | - if( !class_exists( '\Illuminate\Http\Response' ) ) { |
|
21 | - $this->markTestSkipped( '\Illuminate\Http\Response is not available' ); |
|
20 | + if (!class_exists('\Illuminate\Http\Response')) { |
|
21 | + $this->markTestSkipped('\Illuminate\Http\Response is not available'); |
|
22 | 22 | } |
23 | 23 | |
24 | - if( !class_exists( '\Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory' ) ) { |
|
25 | - $this->markTestSkipped( '\Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory is not available' ); |
|
24 | + if (!class_exists('\Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory')) { |
|
25 | + $this->markTestSkipped('\Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory is not available'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | $view = new \Aimeos\MW\View\Standard(); |
29 | - $response = new \Illuminate\Http\Response( 'Content' ); |
|
29 | + $response = new \Illuminate\Http\Response('Content'); |
|
30 | 30 | |
31 | - $this->object = new \Aimeos\MW\View\Helper\Response\Laravel5( $view, $response ); |
|
31 | + $this->object = new \Aimeos\MW\View\Helper\Response\Laravel5($view, $response); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | |
35 | 35 | protected function tearDown() |
36 | 36 | { |
37 | - unset( $this->object, $this->mock ); |
|
37 | + unset($this->object, $this->mock); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | |
41 | 41 | public function testTransform() |
42 | 42 | { |
43 | - $this->assertInstanceOf( '\Aimeos\MW\View\Helper\Response\Laravel5', $this->object->transform() ); |
|
43 | + $this->assertInstanceOf('\Aimeos\MW\View\Helper\Response\Laravel5', $this->object->transform()); |
|
44 | 44 | } |
45 | 45 | } |