Completed
Push — master ( 99e480...1f8fa9 )
by Aimeos
02:51
created
lib/custom/tests/bootstrap.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,17 +9,17 @@
 block discarded – undo
9 9
  * Set error reporting to maximum
10 10
  */
11 11
 error_reporting( -1 );
12
-ini_set( 'display_errors', '1' );
12
+ini_set('display_errors', '1');
13 13
 
14 14
 
15 15
 /*
16 16
  * Set locale settings to reasonable defaults
17 17
  */
18
-setlocale( LC_ALL, 'en_US.UTF-8' );
19
-setlocale( LC_CTYPE, 'en_US.UTF-8' );
20
-setlocale( LC_NUMERIC, 'POSIX' );
21
-setlocale( LC_TIME, 'POSIX' );
22
-date_default_timezone_set( 'UTC' );
18
+setlocale(LC_ALL, 'en_US.UTF-8');
19
+setlocale(LC_CTYPE, 'en_US.UTF-8');
20
+setlocale(LC_NUMERIC, 'POSIX');
21
+setlocale(LC_TIME, 'POSIX');
22
+date_default_timezone_set('UTC');
23 23
 
24 24
 require_once 'TestHelper.php';
25 25
 TestHelper::bootstrap();
Please login to merge, or discard this patch.
lib/custom/tests/MW/View/Helper/Response/FlowTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,23 +16,23 @@
 block discarded – undo
16 16
 
17 17
 	protected function setUp()
18 18
 	{
19
-		if( !class_exists( '\Zend\Diactoros\Response' ) ) {
20
-			$this->markTestSkipped( '\Zend\Diactoros\Response is not available' );
19
+		if (!class_exists('\Zend\Diactoros\Response')) {
20
+			$this->markTestSkipped('\Zend\Diactoros\Response is not available');
21 21
 		}
22 22
 
23 23
 		$view = new \Aimeos\MW\View\Standard();
24
-		$this->object = new \Aimeos\MW\View\Helper\Response\Flow( $view );
24
+		$this->object = new \Aimeos\MW\View\Helper\Response\Flow($view);
25 25
 	}
26 26
 
27 27
 
28 28
 	protected function tearDown()
29 29
 	{
30
-		unset( $this->object );
30
+		unset($this->object);
31 31
 	}
32 32
 
33 33
 
34 34
 	public function testTransform()
35 35
 	{
36
-		$this->assertInstanceOf( '\Aimeos\MW\View\Helper\Response\Flow', $this->object->transform() );
36
+		$this->assertInstanceOf('\Aimeos\MW\View\Helper\Response\Flow', $this->object->transform());
37 37
 	}
38 38
 }
Please login to merge, or discard this patch.
lib/custom/src/MW/View/Helper/Response/Flow.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@
 block discarded – undo
26 26
 	 *
27 27
 	 * @param \Aimeos\MW\View\Iface $view View instance with registered view helpers
28 28
 	 */
29
-	public function __construct( \Aimeos\MW\View\Iface $view )
29
+	public function __construct(\Aimeos\MW\View\Iface $view)
30 30
 	{
31
-		parent::__construct( $view, new \Zend\Diactoros\Response() );
31
+		parent::__construct($view, new \Zend\Diactoros\Response());
32 32
 	}
33 33
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Session/FlowTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,14 +25,14 @@  discard block
 block discarded – undo
25 25
 	 */
26 26
 	protected function setUp()
27 27
 	{
28
-		if( class_exists( '\\Neos\\Flow\\Session\\Session' ) === false ) {
29
-			$this->markTestSkipped( 'Class \\Neos\\Flow\\Session\\Session not found' );
28
+		if (class_exists('\\Neos\\Flow\\Session\\Session') === false) {
29
+			$this->markTestSkipped('Class \\Neos\\Flow\\Session\\Session not found');
30 30
 		}
31 31
 
32 32
 		$session = new \Neos\Flow\Session\TransientSession();
33 33
 		$session->start();
34 34
 
35
-		$this->object = new \Aimeos\MW\Session\Flow( $session );
35
+		$this->object = new \Aimeos\MW\Session\Flow($session);
36 36
 	}
37 37
 
38 38
 
@@ -44,26 +44,26 @@  discard block
 block discarded – undo
44 44
 	 */
45 45
 	protected function tearDown()
46 46
 	{
47
-		unset( $this->object );
47
+		unset($this->object);
48 48
 	}
49 49
 
50 50
 
51 51
 	public function testGetDefault()
52 52
 	{
53
-		$this->assertEquals( null, $this->object->get( 'notexist' ) );
53
+		$this->assertEquals(null, $this->object->get('notexist'));
54 54
 	}
55 55
 
56 56
 
57 57
 	public function testGetSet()
58 58
 	{
59
-		$this->object->set( 'key', 'value' );
60
-		$this->assertEquals( 'value', $this->object->get( 'key' ) );
59
+		$this->object->set('key', 'value');
60
+		$this->assertEquals('value', $this->object->get('key'));
61 61
 	}
62 62
 
63 63
 
64 64
 	public function testGetSetArray()
65 65
 	{
66
-		$this->object->set( 'key', array( 'value' ) );
67
-		$this->assertEquals( array( 'value' ), $this->object->get( 'key' ) );
66
+		$this->object->set('key', array('value'));
67
+		$this->assertEquals(array('value'), $this->object->get('key'));
68 68
 	}
69 69
 }
Please login to merge, or discard this patch.
lib/custom/src/MW/Session/Flow.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 *
29 29
 	 * @param \Neos\Flow\Session\SessionInterface $object Flow session object
30 30
 	 */
31
-	public function __construct( \Neos\Flow\Session\SessionInterface $object )
31
+	public function __construct(\Neos\Flow\Session\SessionInterface $object)
32 32
 	{
33 33
 		$this->object = $object;
34 34
 	}
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
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
-		if( $this->object->hasKey( $name ) !== true ) {
48
+		if ($this->object->hasKey($name) !== true) {
49 49
 			return $default;
50 50
 		}
51 51
 
52
-		return $this->object->getData( $name );
52
+		return $this->object->getData($name);
53 53
 	}
54 54
 
55 55
 
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 	 * @param mixed $value Value that should be associated with the given key
63 63
 	 * @return void
64 64
 	 */
65
-	public function set( $name, $value )
65
+	public function set($name, $value)
66 66
 	{
67
-		$this->object->putData( $name, $value );
67
+		$this->object->putData($name, $value);
68 68
 	}
69 69
 }
Please login to merge, or discard this patch.
lib/custom/src/MAdmin/Cache/Proxy/Flow.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	 * @param \Aimeos\MShop\Context\Item\Iface $context MShop context object
33 33
 	 * @param \Neos\Cache\Frontend\StringFrontend $cache Flow cache object
34 34
 	 */
35
-	public function __construct( \Aimeos\MShop\Context\Item\Iface $context, \Neos\Cache\Frontend\StringFrontend $cache )
35
+	public function __construct(\Aimeos\MShop\Context\Item\Iface $context, \Neos\Cache\Frontend\StringFrontend $cache)
36 36
 	{
37 37
 		$this->context = $context;
38 38
 		$this->cache = $cache;
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 	 */
47 47
 	protected function getObject()
48 48
 	{
49
-		if( !isset( $this->object ) )
49
+		if (!isset($this->object))
50 50
 		{
51 51
 			$siteid = $this->context->getLocale()->getSiteId();
52
-			$conf = array( 'siteid' => $this->context->getConfig()->get( 'madmin/cache/prefix' ) . $siteid );
53
-			$this->object = \Aimeos\MW\Cache\Factory::createManager( 'Flow', $conf, $this->cache );
52
+			$conf = array('siteid' => $this->context->getConfig()->get('madmin/cache/prefix').$siteid);
53
+			$this->object = \Aimeos\MW\Cache\Factory::createManager('Flow', $conf, $this->cache);
54 54
 		}
55 55
 
56 56
 		return $this->object;
Please login to merge, or discard this patch.
lib/custom/tests/MAdmin/Cache/Proxy/FlowTest.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -17,38 +17,38 @@
 block discarded – undo
17 17
 
18 18
 	protected function setUp()
19 19
 	{
20
-		if( class_exists( 'Neos\Cache\Frontend\StringFrontend' ) === false ) {
21
-			$this->markTestSkipped( 'Class \\Neos\\Cache\\Frontend\\StringFrontend not found' );
20
+		if (class_exists('Neos\Cache\Frontend\StringFrontend') === false) {
21
+			$this->markTestSkipped('Class \\Neos\\Cache\\Frontend\\StringFrontend not found');
22 22
 		}
23 23
 
24
-		$localeItem = $this->getMockBuilder( '\Aimeos\MShop\Locale\Item\Standard' )
25
-			->setMethods( ['getSiteId'])
24
+		$localeItem = $this->getMockBuilder('\Aimeos\MShop\Locale\Item\Standard')
25
+			->setMethods(['getSiteId'])
26 26
 			->getMock();
27 27
 
28
-		$this->mock = $this->getMockBuilder( 'Neos\Cache\Frontend\StringFrontend' )
28
+		$this->mock = $this->getMockBuilder('Neos\Cache\Frontend\StringFrontend')
29 29
 			->disableOriginalConstructor()
30 30
 			->getMock();
31 31
 
32 32
 		$context = \TestHelper::getContext();
33
-		$context->setLocale( $localeItem );
33
+		$context->setLocale($localeItem);
34 34
 
35
-		$this->object = new \Aimeos\MAdmin\Cache\Proxy\Flow( $context, $this->mock );
35
+		$this->object = new \Aimeos\MAdmin\Cache\Proxy\Flow($context, $this->mock);
36 36
 	}
37 37
 
38 38
 
39 39
 	protected function tearDown()
40 40
 	{
41
-		unset( $this->mock, $this->object );
41
+		unset($this->mock, $this->object);
42 42
 	}
43 43
 
44 44
 
45 45
 	public function testGetObject()
46 46
 	{
47
-		$class = new \ReflectionClass( '\Aimeos\MAdmin\Cache\Proxy\Flow' );
48
-		$method = $class->getMethod( 'getObject' );
49
-		$method->setAccessible( true );
47
+		$class = new \ReflectionClass('\Aimeos\MAdmin\Cache\Proxy\Flow');
48
+		$method = $class->getMethod('getObject');
49
+		$method->setAccessible(true);
50 50
 
51
-		$result = $method->invokeArgs( $this->object, [] );
52
-		$this->assertInstanceOf( '\Aimeos\MW\Cache\Iface', $result );
51
+		$result = $method->invokeArgs($this->object, []);
52
+		$this->assertInstanceOf('\Aimeos\MW\Cache\Iface', $result);
53 53
 	}
54 54
 }
Please login to merge, or discard this patch.
lib/custom/src/MW/View/Engine/Flow.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 *
28 28
 	 * @param \Neos\FluidAdaptor\View\StandaloneView $view Flow template view object
29 29
 	 */
30
-	public function __construct( \Neos\FluidAdaptor\View\StandaloneView $view )
30
+	public function __construct(\Neos\FluidAdaptor\View\StandaloneView $view)
31 31
 	{
32 32
 		$this->view = $view;
33 33
 	}
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
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
 		$fluid = clone $this->view;
48 48
 
49
-		$fluid->setTemplatePathAndFilename( $filename );
50
-		$fluid->assign( '_aimeos_view', $view );
51
-		$fluid->assignMultiple( $values );
49
+		$fluid->setTemplatePathAndFilename($filename);
50
+		$fluid->assign('_aimeos_view', $view);
51
+		$fluid->assignMultiple($values);
52 52
 
53 53
 		return $fluid->render();
54 54
 	}
Please login to merge, or discard this patch.
lib/custom/tests/TestHelper.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -17,14 +17,14 @@  discard block
 block discarded – undo
17 17
 
18 18
 		$includepaths = $mshop->getIncludePaths();
19 19
 		$includepaths[] = get_include_path();
20
-		set_include_path( implode( PATH_SEPARATOR, $includepaths ) );
20
+		set_include_path(implode(PATH_SEPARATOR, $includepaths));
21 21
 	}
22 22
 
23 23
 
24
-	public static function getContext( $site = 'unittest' )
24
+	public static function getContext($site = 'unittest')
25 25
 	{
26
-		if( !isset( self::$context[$site] ) ) {
27
-			self::$context[$site] = self::createContext( $site );
26
+		if (!isset(self::$context[$site])) {
27
+			self::$context[$site] = self::createContext($site);
28 28
 		}
29 29
 
30 30
 		return clone self::$context[$site];
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
 
34 34
 	private static function getAimeos()
35 35
 	{
36
-		if( !isset( self::$aimeos ) )
36
+		if (!isset(self::$aimeos))
37 37
 		{
38 38
 			require_once 'Bootstrap.php';
39
-			spl_autoload_register( 'Aimeos\\Bootstrap::autoload' );
39
+			spl_autoload_register('Aimeos\\Bootstrap::autoload');
40 40
 
41
-			$extdir = dirname( dirname( dirname( dirname( __FILE__ ) ) ) );
42
-			self::$aimeos = new \Aimeos\Bootstrap( array( $extdir ), false );
41
+			$extdir = dirname(dirname(dirname(dirname(__FILE__))));
42
+			self::$aimeos = new \Aimeos\Bootstrap(array($extdir), false);
43 43
 		}
44 44
 
45 45
 		return self::$aimeos;
@@ -52,31 +52,31 @@  discard block
 block discarded – undo
52 52
 	 * @param string $site Unique site code
53 53
 	 * @return \\Aimeos\MShop\Context\Item\Iface Context object
54 54
 	 */
55
-		private static function createContext( $site )
55
+		private static function createContext($site)
56 56
 	{
57 57
 		$ctx = new \Aimeos\MShop\Context\Item\Standard();
58 58
 		$mshop = self::getAimeos();
59 59
 
60 60
 
61
-		$paths = $mshop->getConfigPaths( 'mysql' );
62
-		$paths[] = __DIR__ . DIRECTORY_SEPARATOR . 'config';
61
+		$paths = $mshop->getConfigPaths('mysql');
62
+		$paths[] = __DIR__.DIRECTORY_SEPARATOR.'config';
63 63
 
64
-		$conf = new \Aimeos\MW\Config\PHPArray( [], $paths );
65
-		$ctx->setConfig( $conf );
64
+		$conf = new \Aimeos\MW\Config\PHPArray([], $paths);
65
+		$ctx->setConfig($conf);
66 66
 
67 67
 
68
-		$dbm = new \Aimeos\MW\DB\Manager\PDO( $conf );
69
-		$ctx->setDatabaseManager( $dbm );
68
+		$dbm = new \Aimeos\MW\DB\Manager\PDO($conf);
69
+		$ctx->setDatabaseManager($dbm);
70 70
 
71 71
 
72
-		$logger = new \Aimeos\MW\Logger\File( $site . '.log', \Aimeos\MW\Logger\Base::DEBUG );
73
-		$ctx->setLogger( $logger );
72
+		$logger = new \Aimeos\MW\Logger\File($site.'.log', \Aimeos\MW\Logger\Base::DEBUG);
73
+		$ctx->setLogger($logger);
74 74
 
75 75
 
76 76
 		$session = new \Aimeos\MW\Session\None();
77
-		$ctx->setSession( $session );
77
+		$ctx->setSession($session);
78 78
 
79
-		$ctx->setEditor( 'ai-flow:unittest' );
79
+		$ctx->setEditor('ai-flow:unittest');
80 80
 
81 81
 		return $ctx;
82 82
 	}
Please login to merge, or discard this patch.