Completed
Push — master ( c5d99a...f2124a )
by Aimeos
11:35
created
src/config/shop.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 return array(
4 4
 	'apc_enabled' => false,
5 5
 	'apc_prefix' => 'laravel:',
6
-	'extdir' => ( is_dir(base_path('ext')) ? base_path('ext') : dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'ext' ),
6
+	'extdir' => (is_dir(base_path('ext')) ? base_path('ext') : dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'ext'),
7 7
 	'uploaddir' => '/',
8 8
 
9 9
 	'routes' => array(
@@ -16,16 +16,16 @@  discard block
 block discarded – undo
16 16
 	),
17 17
 
18 18
 	'page' => array(
19
-		'account-index' => array( 'account/history','account/favorite','account/watch','basket/mini','catalog/session' ),
20
-		'basket-index' => array( 'basket/standard','basket/related' ),
21
-		'catalog-count' => array( 'catalog/count' ),
22
-		'catalog-detail' => array( 'basket/mini','catalog/stage','catalog/detail','catalog/session' ),
23
-		'catalog-list' => array( 'basket/mini','catalog/filter','catalog/stage','catalog/lists' ),
24
-		'catalog-stock' => array( 'catalog/stock' ),
25
-		'catalog-suggest' => array( 'catalog/suggest' ),
26
-		'checkout-confirm' => array( 'checkout/confirm' ),
27
-		'checkout-index' => array( 'checkout/standard' ),
28
-		'checkout-update' => array( 'checkout/update'),
19
+		'account-index' => array('account/history', 'account/favorite', 'account/watch', 'basket/mini', 'catalog/session'),
20
+		'basket-index' => array('basket/standard', 'basket/related'),
21
+		'catalog-count' => array('catalog/count'),
22
+		'catalog-detail' => array('basket/mini', 'catalog/stage', 'catalog/detail', 'catalog/session'),
23
+		'catalog-list' => array('basket/mini', 'catalog/filter', 'catalog/stage', 'catalog/lists'),
24
+		'catalog-stock' => array('catalog/stock'),
25
+		'catalog-suggest' => array('catalog/suggest'),
26
+		'checkout-confirm' => array('checkout/confirm'),
27
+		'checkout-index' => array('checkout/standard'),
28
+		'checkout-update' => array('checkout/update'),
29 29
 	),
30 30
 
31 31
 	'resource' => array(
@@ -36,24 +36,24 @@  discard block
 block discarded – undo
36 36
 			'database' => env('DB_DATABASE', 'laravel'),
37 37
 			'username' => env('DB_USERNAME', 'root'),
38 38
 			'password' => env('DB_PASSWORD', ''),
39
-			'stmt' => array( "SET NAMES 'utf8'", "SET SESSION sql_mode='ANSI'" ),
39
+			'stmt' => array("SET NAMES 'utf8'", "SET SESSION sql_mode='ANSI'"),
40 40
 			'opt-persistent' => 0,
41 41
 			'limit' => 2,
42 42
 		),
43 43
 		'fs' => array(
44 44
 			'adapter' => 'Standard',
45 45
 			'basedir' => public_path(),
46
-			'tempdir' => storage_path( 'tmp' ),
46
+			'tempdir' => storage_path('tmp'),
47 47
 		),
48 48
 		'fs-admin' => array(
49 49
 			'adapter' => 'Standard',
50
-			'basedir' => public_path( 'uploads' ),
51
-			'tempdir' => storage_path( 'tmp' ),
50
+			'basedir' => public_path('uploads'),
51
+			'tempdir' => storage_path('tmp'),
52 52
 		),
53 53
 		'fs-secure' => array(
54 54
 			'adapter' => 'Standard',
55
-			'basedir' => storage_path( 'secure' ),
56
-			'tempdir' => storage_path( 'tmp' ),
55
+			'basedir' => storage_path('secure'),
56
+			'tempdir' => storage_path('tmp'),
57 57
 		),
58 58
 	),
59 59
 
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 				'default' => array(
228 228
 					'mimeicon' => array(
229 229
 						# Directory where icons for the mime types stored
230
-						'directory' => public_path( '/packages/aimeos/shop/mimeicons' ),
230
+						'directory' => public_path('/packages/aimeos/shop/mimeicons'),
231 231
 						# File extension of mime type icons
232 232
 						'extension' => '.png'
233 233
 					),
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 						# in the "maxwidth" parameter
271 271
 						# maxheight: 280
272 272
 					),
273
-					'tempdir' => storage_path( 'aimeos' ),
273
+					'tempdir' => storage_path('aimeos'),
274 274
 				),
275 275
 			),
276 276
 			'product' => array(
Please login to merge, or discard this patch.
src/Aimeos/Shop/Base/I18n.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 * @param \Aimeos\Shop\Base\Aimeos $aimeos Aimeos object
41 41
 	 * @param \Illuminate\Contracts\Config\Repository $config Configuration object
42 42
 	 */
43
-	public function __construct( \Aimeos\Shop\Base\Aimeos $aimeos, \Illuminate\Contracts\Config\Repository $config )
43
+	public function __construct(\Aimeos\Shop\Base\Aimeos $aimeos, \Illuminate\Contracts\Config\Repository $config)
44 44
 	{
45 45
 		$this->aimeos = $aimeos;
46 46
 		$this->config = $config;
@@ -53,22 +53,22 @@  discard block
 block discarded – undo
53 53
 	 * @param array $languageIds List of two letter ISO language IDs
54 54
 	 * @return \Aimeos\MW\Translation\Iface[] List of translation objects
55 55
 	 */
56
-	public function get( array $languageIds )
56
+	public function get(array $languageIds)
57 57
 	{
58 58
 		$i18nPaths = $this->aimeos->get()->getI18nPaths();
59 59
 
60
-		foreach( $languageIds as $langid )
60
+		foreach ($languageIds as $langid)
61 61
 		{
62
-			if( !isset( $this->i18n[$langid] ) )
62
+			if (!isset($this->i18n[$langid]))
63 63
 			{
64
-				$i18n = new \Aimeos\MW\Translation\Gettext( $i18nPaths, $langid );
64
+				$i18n = new \Aimeos\MW\Translation\Gettext($i18nPaths, $langid);
65 65
 
66
-				if( function_exists( 'apc_store' ) === true && $this->config->get( 'shop.apc_enabled', false ) == true ) {
67
-					$i18n = new \Aimeos\MW\Translation\Decorator\APC( $i18n, $this->config->get( 'shop.apc_prefix', 'laravel:' ) );
66
+				if (function_exists('apc_store') === true && $this->config->get('shop.apc_enabled', false) == true) {
67
+					$i18n = new \Aimeos\MW\Translation\Decorator\APC($i18n, $this->config->get('shop.apc_prefix', 'laravel:'));
68 68
 				}
69 69
 
70
-				if( $this->config->has( 'shop.i18n.' . $langid ) ) {
71
-					$i18n = new \Aimeos\MW\Translation\Decorator\Memory( $i18n, $this->config->get( 'shop.i18n.' . $langid ) );
70
+				if ($this->config->has('shop.i18n.' . $langid)) {
71
+					$i18n = new \Aimeos\MW\Translation\Decorator\Memory($i18n, $this->config->get('shop.i18n.' . $langid));
72 72
 				}
73 73
 
74 74
 				$this->i18n[$langid] = $i18n;
Please login to merge, or discard this patch.
src/Aimeos/Shop/Command/JobsCommand.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -43,21 +43,21 @@  discard block
 block discarded – undo
43 43
 	 */
44 44
 	public function fire()
45 45
 	{
46
-		$aimeos = $this->getLaravel()->make( '\Aimeos\Shop\Base\Aimeos' )->get();
46
+		$aimeos = $this->getLaravel()->make('\Aimeos\Shop\Base\Aimeos')->get();
47 47
 		$context = $this->getContext();
48 48
 
49
-		$jobs = explode( ' ', $this->argument( 'jobs' ) );
50
-		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context );
49
+		$jobs = explode(' ', $this->argument('jobs'));
50
+		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context);
51 51
 
52
-		foreach( $this->getSiteItems( $context, $this->argument( 'site' ) ) as $siteItem )
52
+		foreach ($this->getSiteItems($context, $this->argument('site')) as $siteItem)
53 53
 		{
54
-			$localeItem = $localeManager->bootstrap( $siteItem->getCode(), 'en', '', false );
55
-			$context->setLocale( $localeItem );
54
+			$localeItem = $localeManager->bootstrap($siteItem->getCode(), 'en', '', false);
55
+			$context->setLocale($localeItem);
56 56
 
57
-			$this->info( sprintf( 'Executing the Aimeos jobs for "%s"', $siteItem->getCode() ) );
57
+			$this->info(sprintf('Executing the Aimeos jobs for "%s"', $siteItem->getCode()));
58 58
 
59
-			foreach( $jobs as $jobname ) {
60
-				\Aimeos\Controller\Jobs\Factory::createController( $context, $aimeos, $jobname )->run();
59
+			foreach ($jobs as $jobname) {
60
+				\Aimeos\Controller\Jobs\Factory::createController($context, $aimeos, $jobname)->run();
61 61
 			}
62 62
 		}
63 63
 	}
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
 	protected function getArguments()
72 72
 	{
73 73
 		return array(
74
-			array( 'jobs', InputArgument::REQUIRED, 'One or more job controller names like "admin/job customer/email/watch"' ),
75
-			array( 'site', InputArgument::OPTIONAL, 'Site codes to execute the jobs for like "default unittest" (none for all)' ),
74
+			array('jobs', InputArgument::REQUIRED, 'One or more job controller names like "admin/job customer/email/watch"'),
75
+			array('site', InputArgument::OPTIONAL, 'Site codes to execute the jobs for like "default unittest" (none for all)'),
76 76
 		);
77 77
 	}
78 78
 
@@ -95,19 +95,19 @@  discard block
 block discarded – undo
95 95
 	protected function getContext()
96 96
 	{
97 97
 		$lv = $this->getLaravel();
98
-		$aimeos = $lv->make( '\Aimeos\Shop\Base\Aimeos' )->get();
99
-		$context = $lv->make( '\Aimeos\Shop\Base\Context' )->get( false );
98
+		$aimeos = $lv->make('\Aimeos\Shop\Base\Aimeos')->get();
99
+		$context = $lv->make('\Aimeos\Shop\Base\Context')->get(false);
100 100
 
101
-		$tmplPaths = $aimeos->getCustomPaths( 'controller/jobs/templates' );
102
-		$view = $lv->make( '\Aimeos\Shop\Base\View' )->create( $context->getConfig(), $tmplPaths );
101
+		$tmplPaths = $aimeos->getCustomPaths('controller/jobs/templates');
102
+		$view = $lv->make('\Aimeos\Shop\Base\View')->create($context->getConfig(), $tmplPaths);
103 103
 
104
-		$langManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context )->getSubManager( 'language' );
105
-		$langids = array_keys( $langManager->searchItems( $langManager->createSearch( true ) ) );
106
-		$i18n = $lv->make( '\Aimeos\Shop\Base\I18n' )->get( $langids );
104
+		$langManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context)->getSubManager('language');
105
+		$langids = array_keys($langManager->searchItems($langManager->createSearch(true)));
106
+		$i18n = $lv->make('\Aimeos\Shop\Base\I18n')->get($langids);
107 107
 
108
-		$context->setEditor( 'aimeos:jobs' );
109
-		$context->setView( $view );
110
-		$context->setI18n( $i18n );
108
+		$context->setEditor('aimeos:jobs');
109
+		$context->setView($view);
110
+		$context->setI18n($i18n);
111 111
 
112 112
 		return $context;
113 113
 	}
Please login to merge, or discard this patch.