Completed
Push — master ( 4ae673...13744a )
by Aimeos
15:56
created
src/Base/Config.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 *
30 30
 	 * @param ContainerInterface $container Dependency container
31 31
 	 */
32
-	public function __construct( ContainerInterface $container, $settings )
32
+	public function __construct(ContainerInterface $container, $settings)
33 33
 	{
34 34
 		$this->container = $container;
35 35
 		$this->settings = $settings;
@@ -42,19 +42,19 @@  discard block
 block discarded – undo
42 42
 	 * @param string $type Configuration type ("frontend" or "backend")
43 43
 	 * @return \Aimeos\MW\Config\Iface Config object
44 44
 	 */
45
-	public function get( $type = 'frontend' )
45
+	public function get($type = 'frontend')
46 46
 	{
47
-		$paths = $this->container->get( 'aimeos' )->getConfigPaths();
48
-		$config = new \Aimeos\MW\Config\PHPArray( array(), $paths );
47
+		$paths = $this->container->get('aimeos')->getConfigPaths();
48
+		$config = new \Aimeos\MW\Config\PHPArray(array(), $paths);
49 49
 
50
-		if( function_exists( 'apcu_store' ) === true && $config->get( 'apc_enabled', false ) == true ) {
51
-			$config = new \Aimeos\MW\Config\Decorator\APC( $config, $config->get( 'apc_prefix', 'slim:' ) );
50
+		if (function_exists('apcu_store') === true && $config->get('apc_enabled', false) == true) {
51
+			$config = new \Aimeos\MW\Config\Decorator\APC($config, $config->get('apc_prefix', 'slim:'));
52 52
 		}
53 53
 
54
-		$config = new \Aimeos\MW\Config\Decorator\Memory( $config, $this->settings );
54
+		$config = new \Aimeos\MW\Config\Decorator\Memory($config, $this->settings);
55 55
 
56
-		if( isset( $this->settings[$type] ) ) {
57
-			$config = new \Aimeos\MW\Config\Decorator\Memory( $config, $this->settings[$type] );
56
+		if (isset($this->settings[$type])) {
57
+			$config = new \Aimeos\MW\Config\Decorator\Memory($config, $this->settings[$type]);
58 58
 		}
59 59
 
60 60
 		return $config;
Please login to merge, or discard this patch.
src/Base/I18n.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 *
30 30
 	 * @param ContainerInterface $container Dependency container
31 31
 	 */
32
-	public function __construct( ContainerInterface $container )
32
+	public function __construct(ContainerInterface $container)
33 33
 	{
34 34
 		$this->container = $container;
35 35
 	}
@@ -41,23 +41,23 @@  discard block
 block discarded – undo
41 41
 	 * @param array $languageIds List of two letter ISO language IDs
42 42
 	 * @return \Aimeos\MW\Translation\Iface[] List of translation objects
43 43
 	 */
44
-	public function get( array $languageIds )
44
+	public function get(array $languageIds)
45 45
 	{
46
-		$config = $this->container->get( 'aimeos_config' )->get();
47
-		$i18nPaths = $this->container->get( 'aimeos' )->getI18nPaths();
46
+		$config = $this->container->get('aimeos_config')->get();
47
+		$i18nPaths = $this->container->get('aimeos')->getI18nPaths();
48 48
 
49
-		foreach( $languageIds as $langid )
49
+		foreach ($languageIds as $langid)
50 50
 		{
51
-			if( !isset( $this->i18n[$langid] ) )
51
+			if (!isset($this->i18n[$langid]))
52 52
 			{
53
-				$i18n = new \Aimeos\MW\Translation\Gettext( $i18nPaths, $langid );
53
+				$i18n = new \Aimeos\MW\Translation\Gettext($i18nPaths, $langid);
54 54
 
55
-				if( function_exists( 'apcu_store' ) === true && $config->get( 'apc_enabled', false ) == true ) {
56
-					$i18n = new \Aimeos\MW\Translation\Decorator\APC( $i18n, $config->get( 'apc_prefix', 'slim:' ) );
55
+				if (function_exists('apcu_store') === true && $config->get('apc_enabled', false) == true) {
56
+					$i18n = new \Aimeos\MW\Translation\Decorator\APC($i18n, $config->get('apc_prefix', 'slim:'));
57 57
 				}
58 58
 
59
-				if( ( $cfg = $config->get( 'i18n/' . $langid, array() ) ) !== array() ) {
60
-					$i18n = new \Aimeos\MW\Translation\Decorator\Memory( $i18n, $cfg );
59
+				if (($cfg = $config->get('i18n/'.$langid, array())) !== array()) {
60
+					$i18n = new \Aimeos\MW\Translation\Decorator\Memory($i18n, $cfg);
61 61
 				}
62 62
 
63 63
 				$this->i18n[$langid] = $i18n;
Please login to merge, or discard this patch.