Completed
Push — master ( 37757a...f84d4b )
by Aimeos
07:01
created
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\Zend2( $i18nPaths, 'gettext', $langid, array( 'disableNotices' => true ) );
64
+				$i18n = new \Aimeos\MW\Translation\Zend2($i18nPaths, 'gettext', $langid, array('disableNotices' => true));
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/AbstractCommand.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -22,19 +22,19 @@
 block discarded – undo
22 22
 	 * @param string|array $sites Unique site codes
23 23
 	 * @return \Aimeos\MShop\Locale\Item\Site\Iface[] List of site items
24 24
 	 */
25
-	protected function getSiteItems( \Aimeos\MShop\Context\Item\Iface $context, $sites )
25
+	protected function getSiteItems(\Aimeos\MShop\Context\Item\Iface $context, $sites)
26 26
 	{
27
-		$manager = \Aimeos\MShop\Factory::createManager( $context, 'locale/site' );
27
+		$manager = \Aimeos\MShop\Factory::createManager($context, 'locale/site');
28 28
 		$search = $manager->createSearch();
29 29
 
30
-		if( is_scalar( $sites ) && $sites != '' ) {
31
-			$sites = explode( ' ', $sites );
30
+		if (is_scalar($sites) && $sites != '') {
31
+			$sites = explode(' ', $sites);
32 32
 		}
33 33
 
34
-		if( !empty( $sites ) ) {
35
-			$search->setConditions( $search->compare( '==', 'locale.site.code', $sites ) );
34
+		if (!empty($sites)) {
35
+			$search->setConditions($search->compare('==', 'locale.site.code', $sites));
36 36
 		}
37 37
 
38
-		return $manager->searchItems( $search );
38
+		return $manager->searchItems($search);
39 39
 	}
40 40
 }
41 41
\ No newline at end of file
Please login to merge, or discard this patch.
src/Aimeos/Shop/Command/CacheCommand.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -35,24 +35,24 @@  discard block
 block discarded – undo
35 35
 	 */
36 36
 	public function fire()
37 37
 	{
38
-		$context = $this->getLaravel()->make( 'Aimeos\Shop\Base\Context' )->get( false );
39
-		$context->setEditor( 'aimeos:cache' );
38
+		$context = $this->getLaravel()->make('Aimeos\Shop\Base\Context')->get(false);
39
+		$context->setEditor('aimeos:cache');
40 40
 
41
-		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context );
41
+		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context);
42 42
 
43
-		foreach( $this->getSiteItems( $context, $this->argument( 'site' ) ) as $siteItem )
43
+		foreach ($this->getSiteItems($context, $this->argument('site')) as $siteItem)
44 44
 		{
45
-			$localeItem = $localeManager->bootstrap( $siteItem->getCode(), '', '', false );
45
+			$localeItem = $localeManager->bootstrap($siteItem->getCode(), '', '', false);
46 46
 
47 47
 			$lcontext = clone $context;
48
-			$lcontext->setLocale( $localeItem );
48
+			$lcontext->setLocale($localeItem);
49 49
 
50
-			$cache = new \Aimeos\MAdmin\Cache\Proxy\Standard( $lcontext );
51
-			$lcontext->setCache( $cache );
50
+			$cache = new \Aimeos\MAdmin\Cache\Proxy\Standard($lcontext);
51
+			$lcontext->setCache($cache);
52 52
 
53
-			$this->info( sprintf( 'Clearing the Aimeos cache for site "%1$s"', $siteItem->getCode() ) );
53
+			$this->info(sprintf('Clearing the Aimeos cache for site "%1$s"', $siteItem->getCode()));
54 54
 
55
-			\Aimeos\MAdmin\Cache\Manager\Factory::createManager( $lcontext )->getCache()->flush();
55
+			\Aimeos\MAdmin\Cache\Manager\Factory::createManager($lcontext)->getCache()->flush();
56 56
 		}
57 57
 	}
58 58
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	protected function getArguments()
66 66
 	{
67 67
 		return array(
68
-			array( 'site', InputArgument::OPTIONAL, 'Site codes to clear the cache like "default unittest" (none for all)' ),
68
+			array('site', InputArgument::OPTIONAL, 'Site codes to clear the cache like "default unittest" (none for all)'),
69 69
 		);
70 70
 	}
71 71
 
Please login to merge, or discard this patch.
src/Aimeos/Shop/Command/JobsCommand.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -36,21 +36,21 @@  discard block
 block discarded – undo
36 36
 	 */
37 37
 	public function fire()
38 38
 	{
39
-		$aimeos = $this->getLaravel()->make( '\Aimeos\Shop\Base\Aimeos' )->get();
39
+		$aimeos = $this->getLaravel()->make('\Aimeos\Shop\Base\Aimeos')->get();
40 40
 		$context = $this->getContext();
41 41
 
42
-		$jobs = explode( ' ', $this->argument( 'jobs' ) );
43
-		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context );
42
+		$jobs = explode(' ', $this->argument('jobs'));
43
+		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context);
44 44
 
45
-		foreach( $this->getSiteItems( $context, $this->argument( 'site' ) ) as $siteItem )
45
+		foreach ($this->getSiteItems($context, $this->argument('site')) as $siteItem)
46 46
 		{
47
-			$localeItem = $localeManager->bootstrap( $siteItem->getCode(), 'en', '', false );
48
-			$context->setLocale( $localeItem );
47
+			$localeItem = $localeManager->bootstrap($siteItem->getCode(), 'en', '', false);
48
+			$context->setLocale($localeItem);
49 49
 
50
-			$this->info( sprintf( 'Executing the Aimeos jobs for "%s"', $siteItem->getCode() ) );
50
+			$this->info(sprintf('Executing the Aimeos jobs for "%s"', $siteItem->getCode()));
51 51
 
52
-			foreach( $jobs as $jobname ) {
53
-				\Aimeos\Controller\Jobs\Factory::createController( $context, $aimeos, $jobname )->run();
52
+			foreach ($jobs as $jobname) {
53
+				\Aimeos\Controller\Jobs\Factory::createController($context, $aimeos, $jobname)->run();
54 54
 			}
55 55
 		}
56 56
 	}
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 	protected function getArguments()
65 65
 	{
66 66
 		return array(
67
-			array( 'jobs', InputArgument::REQUIRED, 'One or more job controller names like "admin/job customer/email/watch"' ),
68
-			array( 'site', InputArgument::OPTIONAL, 'Site codes to execute the jobs for like "default unittest" (none for all)' ),
67
+			array('jobs', InputArgument::REQUIRED, 'One or more job controller names like "admin/job customer/email/watch"'),
68
+			array('site', InputArgument::OPTIONAL, 'Site codes to execute the jobs for like "default unittest" (none for all)'),
69 69
 		);
70 70
 	}
71 71
 
@@ -89,17 +89,17 @@  discard block
 block discarded – undo
89 89
 	{
90 90
 		$lv = $this->getLaravel();
91 91
 
92
-		$context = $lv->make( '\Aimeos\Shop\Base\Context' )->get( false );
93
-		$tmplPaths = $lv->make( '\Aimeos\Shop\Base\Aimeos' )->get()->getCustomPaths( 'controller/jobs/layouts' );
94
-		$view = $lv->make( '\Aimeos\Shop\Base\View' )->create( $context->getConfig(), $tmplPaths );
92
+		$context = $lv->make('\Aimeos\Shop\Base\Context')->get(false);
93
+		$tmplPaths = $lv->make('\Aimeos\Shop\Base\Aimeos')->get()->getCustomPaths('controller/jobs/layouts');
94
+		$view = $lv->make('\Aimeos\Shop\Base\View')->create($context->getConfig(), $tmplPaths);
95 95
 
96
-		$langManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context )->getSubManager( 'language' );
97
-		$langids = array_keys( $langManager->searchItems( $langManager->createSearch( true ) ) );
98
-		$i18n = $lv->make( '\Aimeos\Shop\Base\I18n' )->get( $langids );
96
+		$langManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context)->getSubManager('language');
97
+		$langids = array_keys($langManager->searchItems($langManager->createSearch(true)));
98
+		$i18n = $lv->make('\Aimeos\Shop\Base\I18n')->get($langids);
99 99
 
100
-		$context->setEditor( 'aimeos:jobs' );
101
-		$context->setView( $view );
102
-		$context->setI18n( $i18n );
100
+		$context->setEditor('aimeos:jobs');
101
+		$context->setView($view);
102
+		$context->setI18n($i18n);
103 103
 
104 104
 		return $context;
105 105
 	}
Please login to merge, or discard this patch.
src/Aimeos/Shop/Controller/AccountController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 	 */
29 29
 	public function indexAction()
30 30
 	{
31
-		$params = app( '\Aimeos\Shop\Base\Page' )->getSections( 'account-index' );
31
+		$params = app('\Aimeos\Shop\Base\Page')->getSections('account-index');
32 32
 		return \View::make('shop::account.index', $params);
33 33
 	}
34 34
 }
35 35
\ No newline at end of file
Please login to merge, or discard this patch.
src/Aimeos/Shop/Controller/BasketController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 	 */
29 29
 	public function indexAction()
30 30
 	{
31
-		$params = app( '\Aimeos\Shop\Base\Page' )->getSections( 'basket-index' );
31
+		$params = app('\Aimeos\Shop\Base\Page')->getSections('basket-index');
32 32
 		return \View::make('shop::basket.index', $params);
33 33
 	}
34 34
 }
35 35
\ No newline at end of file
Please login to merge, or discard this patch.
src/Aimeos/Shop/Controller/CatalogController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 */
29 29
 	public function countAction()
30 30
 	{
31
-		$params = app( '\Aimeos\Shop\Base\Page' )->getSections( 'catalog-count' );
31
+		$params = app('\Aimeos\Shop\Base\Page')->getSections('catalog-count');
32 32
 		$contents = \View::make('shop::catalog.count', $params);
33 33
 
34 34
 		$response = \Response::make($contents, 200);
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	public function detailAction()
47 47
 	{
48
-		$params = app( 'Aimeos\Shop\Base\Page' )->getSections( 'catalog-detail' );
48
+		$params = app('Aimeos\Shop\Base\Page')->getSections('catalog-detail');
49 49
 		return \View::make('shop::catalog.detail', $params);
50 50
 	}
51 51
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	 */
58 58
 	public function listAction()
59 59
 	{
60
-		$params = app( 'Aimeos\Shop\Base\Page' )->getSections( 'catalog-list' );
60
+		$params = app('Aimeos\Shop\Base\Page')->getSections('catalog-list');
61 61
 		return \View::make('shop::catalog.list', $params);
62 62
 	}
63 63
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 */
70 70
 	public function stockAction()
71 71
 	{
72
-		$params = app( 'Aimeos\Shop\Base\Page' )->getSections( 'catalog-stock' );
72
+		$params = app('Aimeos\Shop\Base\Page')->getSections('catalog-stock');
73 73
 		$contents = \View::make('shop::catalog.stock', $params);
74 74
 
75 75
 		$response = \Response::make($contents, 200);
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 */
87 87
 	public function suggestAction()
88 88
 	{
89
-		$params = app( 'Aimeos\Shop\Base\Page' )->getSections( 'catalog-suggest' );
89
+		$params = app('Aimeos\Shop\Base\Page')->getSections('catalog-suggest');
90 90
 		$contents = \View::make('shop::catalog.suggest', $params);
91 91
 
92 92
 		$response = \Response::make($contents, 200);
Please login to merge, or discard this patch.
src/Aimeos/Shop/Controller/CheckoutController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 */
29 29
 	public function confirmAction()
30 30
 	{
31
-		$params = app( '\Aimeos\Shop\Base\Page' )->getSections( 'checkout-confirm' );
31
+		$params = app('\Aimeos\Shop\Base\Page')->getSections('checkout-confirm');
32 32
 		return \View::make('shop::checkout.confirm', $params);
33 33
 	}
34 34
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	public function indexAction()
42 42
 	{
43
-		$params = app( '\Aimeos\Shop\Base\Page' )->getSections( 'checkout-index' );
43
+		$params = app('\Aimeos\Shop\Base\Page')->getSections('checkout-index');
44 44
 		return \View::make('shop::checkout.index', $params);
45 45
 	}
46 46
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public function updateAction()
54 54
 	{
55
-		$params = app( '\Aimeos\Shop\Base\Page' )->getSections( 'checkout-update' );
55
+		$params = app('\Aimeos\Shop\Base\Page')->getSections('checkout-update');
56 56
 		return \View::make('shop::checkout.update', $params);
57 57
 	}
58 58
 }
59 59
\ No newline at end of file
Please login to merge, or discard this patch.
src/Aimeos/Shop/ShopServiceProvider.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,31 +28,31 @@
 block discarded – undo
28 28
 	 */
29 29
 	public function boot()
30 30
 	{
31
-		$basedir = dirname(dirname(__DIR__)).DIRECTORY_SEPARATOR;
31
+		$basedir = dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR;
32 32
 
33
-		$this->mergeConfigFrom(dirname(dirname(__DIR__)).DIRECTORY_SEPARATOR.'config/shop.php', 'shop');
33
+		$this->mergeConfigFrom(dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'config/shop.php', 'shop');
34 34
 
35
-		$this->loadViewsFrom($basedir.'views', 'shop');
35
+		$this->loadViewsFrom($basedir . 'views', 'shop');
36 36
 
37 37
 
38 38
 		$this->publishes(array(
39
-			$basedir.'config/shop.php' => config_path('shop.php'),
39
+			$basedir . 'config/shop.php' => config_path('shop.php'),
40 40
 		), 'config');
41 41
 
42 42
 		$this->publishes(array(
43
-			$basedir.'database/migrations' => base_path('database/migrations'),
43
+			$basedir . 'database/migrations' => base_path('database/migrations'),
44 44
 		), 'migrations');
45 45
 
46 46
 		$this->publishes(array(
47
-			$basedir.'views' => base_path('resources/views/vendor/shop'),
47
+			$basedir . 'views' => base_path('resources/views/vendor/shop'),
48 48
 		), 'views');
49 49
 
50 50
 		$this->publishes(array(
51
-			dirname($basedir).DIRECTORY_SEPARATOR.'public' => public_path('packages/aimeos/shop'),
51
+			dirname($basedir) . DIRECTORY_SEPARATOR . 'public' => public_path('packages/aimeos/shop'),
52 52
 		), 'public');
53 53
 
54 54
 
55
-		require $basedir.'routes.php';
55
+		require $basedir . 'routes.php';
56 56
 	}
57 57
 
58 58
 
Please login to merge, or discard this patch.