Completed
Push — master ( 957cdc...2c3bf2 )
by Aimeos
03:54
created
src/views/admin/extadm-index.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         }
42 42
         </script>
43 43
 
44
-		<script type="text/javascript" src="<?= route( 'aimeos_shop_extadm_file', array( 'site' => 'default' ) ); ?>"></script>
44
+		<script type="text/javascript" src="<?= route('aimeos_shop_extadm_file', array('site' => 'default')); ?>"></script>
45 45
 
46 46
     </head>
47 47
     <body>
Please login to merge, or discard this patch.
src/Aimeos/Shop/Controller/AdminController.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -207,8 +207,7 @@
 block discarded – undo
207 207
 			$localeItem = $localeManager->bootstrap( $sitecode, '', '', false );
208 208
 			$localeItem->setLanguageId( null );
209 209
 			$localeItem->setCurrencyId( null );
210
-		}
211
-		catch( \Aimeos\MShop\Locale\Exception $e )
210
+		} catch( \Aimeos\MShop\Locale\Exception $e )
212 211
 		{
213 212
 			$localeItem = $localeManager->createItem();
214 213
 		}
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -35,17 +35,17 @@  discard block
 block discarded – undo
35 35
 	 */
36 36
 	public function indexAction()
37 37
 	{
38
-		if( config( 'shop.authorize', true ) ) {
39
-			$this->authorize( 'admin' );
38
+		if (config('shop.authorize', true)) {
39
+			$this->authorize('admin');
40 40
 		}
41 41
 
42 42
 		$param = array(
43 43
 			'resource' => 'product',
44
-			'site' => Route::input( 'site', 'default' ),
45
-			'lang' => Input::get( 'lang', config( 'app.locale', 'en' ) ),
44
+			'site' => Route::input('site', 'default'),
45
+			'lang' => Input::get('lang', config('app.locale', 'en')),
46 46
 		);
47 47
 
48
-		return redirect()->route( 'aimeos_shop_jqadm_search', $param );
48
+		return redirect()->route('aimeos_shop_jqadm_search', $param);
49 49
 	}
50 50
 
51 51
 
@@ -56,12 +56,12 @@  discard block
 block discarded – undo
56 56
 	 */
57 57
 	protected function getVersion()
58 58
 	{
59
-		if( ( $content = @file_get_contents( base_path( 'composer.lock' ) ) ) !== false
60
-			&& ( $content = json_decode( $content, true ) ) !== null && isset( $content['packages'] )
59
+		if (($content = @file_get_contents(base_path('composer.lock'))) !== false
60
+			&& ($content = json_decode($content, true)) !== null && isset($content['packages'])
61 61
 		) {
62
-			foreach( (array) $content['packages'] as $item )
62
+			foreach ((array) $content['packages'] as $item)
63 63
 			{
64
-				if( $item['name'] === 'aimeos/aimeos-laravel' ) {
64
+				if ($item['name'] === 'aimeos/aimeos-laravel') {
65 65
 					return $item['version'];
66 66
 				}
67 67
 			}
@@ -79,23 +79,23 @@  discard block
 block discarded – undo
79 79
 	 * @param string $lang ISO language code, e.g. "en" or "en_GB"
80 80
 	 * @return \Aimeos\MShop\Context\Item\Iface Modified context object
81 81
 	 */
82
-	protected function setLocale( \Aimeos\MShop\Context\Item\Iface $context, $sitecode = 'default', $lang = null )
82
+	protected function setLocale(\Aimeos\MShop\Context\Item\Iface $context, $sitecode = 'default', $lang = null)
83 83
 	{
84
-		$localeManager = \Aimeos\MShop\Factory::createManager( $context, 'locale' );
84
+		$localeManager = \Aimeos\MShop\Factory::createManager($context, 'locale');
85 85
 
86 86
 		try
87 87
 		{
88
-			$localeItem = $localeManager->bootstrap( $sitecode, '', '', false );
89
-			$localeItem->setLanguageId( null );
90
-			$localeItem->setCurrencyId( null );
88
+			$localeItem = $localeManager->bootstrap($sitecode, '', '', false);
89
+			$localeItem->setLanguageId(null);
90
+			$localeItem->setCurrencyId(null);
91 91
 		}
92
-		catch( \Aimeos\MShop\Locale\Exception $e )
92
+		catch (\Aimeos\MShop\Locale\Exception $e)
93 93
 		{
94 94
 			$localeItem = $localeManager->createItem();
95 95
 		}
96 96
 
97
-		$context->setLocale( $localeItem );
98
-		$context->setI18n( app('\Aimeos\Shop\Base\I18n')->get( array( $lang ) ) );
97
+		$context->setLocale($localeItem);
98
+		$context->setI18n(app('\Aimeos\Shop\Base\I18n')->get(array($lang)));
99 99
 
100 100
 		return $context;
101 101
 	}
Please login to merge, or discard this patch.
src/Aimeos/Shop/Command/SetupCommand.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -36,31 +36,31 @@  discard block
 block discarded – undo
36 36
 	 */
37 37
 	public function fire()
38 38
 	{
39
-		$ctx = $this->getLaravel()->make( '\Aimeos\Shop\Base\Context' )->get( false );
40
-		$ctx->setEditor( 'aimeos:setup' );
39
+		$ctx = $this->getLaravel()->make('\Aimeos\Shop\Base\Context')->get(false);
40
+		$ctx->setEditor('aimeos:setup');
41 41
 
42 42
 		$config = $ctx->getConfig();
43
-		$site = $this->argument( 'site' );
44
-		$template = $this->argument( 'tplsite' );
43
+		$site = $this->argument('site');
44
+		$template = $this->argument('tplsite');
45 45
 
46
-		$config->set( 'setup/site', $site );
47
-		$dbconfig = $this->getDbConfig( $config );
48
-		$this->setOptions( $config );
46
+		$config->set('setup/site', $site);
47
+		$dbconfig = $this->getDbConfig($config);
48
+		$this->setOptions($config);
49 49
 
50
-		$taskPaths = $this->getLaravel()->make( '\Aimeos\Shop\Base\Aimeos' )->get()->getSetupPaths( $template );
50
+		$taskPaths = $this->getLaravel()->make('\Aimeos\Shop\Base\Aimeos')->get()->getSetupPaths($template);
51 51
 
52 52
 		$includePaths = $taskPaths;
53 53
 		$includePaths[] = get_include_path();
54 54
 
55
-		if( set_include_path( implode( PATH_SEPARATOR, $includePaths ) ) === false ) {
56
-			throw new Exception( 'Unable to extend include path' );
55
+		if (set_include_path(implode(PATH_SEPARATOR, $includePaths)) === false) {
56
+			throw new Exception('Unable to extend include path');
57 57
 		}
58 58
 
59
-		$manager = new \Aimeos\MW\Setup\Manager\Multiple( $ctx->getDatabaseManager(), $dbconfig, $taskPaths, $ctx );
59
+		$manager = new \Aimeos\MW\Setup\Manager\Multiple($ctx->getDatabaseManager(), $dbconfig, $taskPaths, $ctx);
60 60
 
61
-		$this->info( sprintf( 'Initializing or updating the Aimeos database tables for site "%1$s"', $site ) );
61
+		$this->info(sprintf('Initializing or updating the Aimeos database tables for site "%1$s"', $site));
62 62
 
63
-		$manager->run( 'mysql' );
63
+		$manager->run('mysql');
64 64
 	}
65 65
 
66 66
 
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 	protected function getArguments()
73 73
 	{
74 74
 		return array(
75
-			array( 'site', InputArgument::OPTIONAL, 'Site for updating database entries', 'default' ),
76
-			array( 'tplsite', InputArgument::OPTIONAL, 'Site used as template for creating the new one', 'default' ),
75
+			array('site', InputArgument::OPTIONAL, 'Site for updating database entries', 'default'),
76
+			array('tplsite', InputArgument::OPTIONAL, 'Site used as template for creating the new one', 'default'),
77 77
 		);
78 78
 	}
79 79
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	protected function getOptions()
87 87
 	{
88 88
 		return array(
89
-			array( 'option', null, InputOption::VALUE_REQUIRED, 'Optional setup configuration, name and value are separated by ":" like "setup/default/demo:1"', array() ),
89
+			array('option', null, InputOption::VALUE_REQUIRED, 'Optional setup configuration, name and value are separated by ":" like "setup/default/demo:1"', array()),
90 90
 		);
91 91
 	}
92 92
 
@@ -97,14 +97,14 @@  discard block
 block discarded – undo
97 97
 	 * @param \Aimeos\MW\Config\Iface $conf Config object
98 98
 	 * @return array Multi-dimensional associative list of database configuration parameters
99 99
 	 */
100
-	protected function getDbConfig( \Aimeos\MW\Config\Iface $conf )
100
+	protected function getDbConfig(\Aimeos\MW\Config\Iface $conf)
101 101
 	{
102
-		$dbconfig = $conf->get( 'resource', array() );
102
+		$dbconfig = $conf->get('resource', array());
103 103
 
104
-		foreach( $dbconfig as $rname => $dbconf )
104
+		foreach ($dbconfig as $rname => $dbconf)
105 105
 		{
106
-			if( strncmp( $rname, 'db', 2 ) !== 0 ) {
107
-				unset( $dbconfig[$rname] );
106
+			if (strncmp($rname, 'db', 2) !== 0) {
107
+				unset($dbconfig[$rname]);
108 108
 			}
109 109
 		}
110 110
 
@@ -119,12 +119,12 @@  discard block
 block discarded – undo
119 119
 	 * @param array Associative list of database configurations
120 120
 	 * @throws \RuntimeException If the format of the options is invalid
121 121
 	 */
122
-	protected function setOptions( \Aimeos\MW\Config\Iface $conf )
122
+	protected function setOptions(\Aimeos\MW\Config\Iface $conf)
123 123
 	{
124
-		foreach( (array) $this->option( 'option' ) as $option )
124
+		foreach ((array) $this->option('option') as $option)
125 125
 		{
126
-			list( $name, $value ) = explode( ':', $option );
127
-			$conf->set( $name, $value );
126
+			list($name, $value) = explode(':', $option);
127
+			$conf->set($name, $value);
128 128
 		}
129 129
 	}
130 130
 }
Please login to merge, or discard this patch.