Completed
Push — master ( ec393a...539bbb )
by Aimeos
12:50
created

Symfony2   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 18
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2014-2016
6
 * @package MW
7
 * @subpackage View
8
 */
9
10
11
namespace Aimeos\MW\View\Helper\Response;
12
13
14
/**
15
 * View helper class for retrieving data from Symfony2 responses.
16
 *
17
 * @package MW
18
 * @subpackage View
19
 */
20
class Symfony2
21
	extends \Aimeos\MW\View\Helper\Response\Standard
0 ignored issues
show
Coding Style introduced by
The extends keyword must be on the same line as the class name
Loading history...
Coding Style introduced by
Expected 0 spaces between "Standard" and comma; 1 found
Loading history...
22
	implements \Aimeos\MW\View\Helper\Response\Iface
0 ignored issues
show
Coding Style introduced by
The implements keyword must be on the same line as the class name
Loading history...
23
{
24
	/**
25
	 * Initializes the URL view helper.
26
	 *
27
	 * @param \Aimeos\MW\View\Iface $view View instance with registered view helpers
28
	 * @param \Symfony\Component\HttpFoundation\Response $response Symfony2 response object
29
	 */
30
	public function __construct( $view, \Symfony\Component\HttpFoundation\Response $response )
31
	{
32
		$factory = new \Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory();
33
		$psr7response = $factory->createResponse( $response );
34
35
		parent::__construct( $view, $psr7response );
36
	}
37
}
38