Completed
Push — master ( ec7a64...76981d )
by Aimeos
02:25
created
src/Aimeos/Shop/Command/JobsCommand.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -43,24 +43,24 @@  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(), '', '', false );
55
-			$localeItem->setLanguageId( null );
56
-			$localeItem->setCurrencyId( null );
54
+			$localeItem = $localeManager->bootstrap($siteItem->getCode(), '', '', false);
55
+			$localeItem->setLanguageId(null);
56
+			$localeItem->setCurrencyId(null);
57 57
 
58
-			$context->setLocale( $localeItem );
58
+			$context->setLocale($localeItem);
59 59
 
60
-			$this->info( sprintf( 'Executing the Aimeos jobs for "%s"', $siteItem->getCode() ) );
60
+			$this->info(sprintf('Executing the Aimeos jobs for "%s"', $siteItem->getCode()));
61 61
 
62
-			foreach( $jobs as $jobname ) {
63
-				\Aimeos\Controller\Jobs\Factory::createController( $context, $aimeos, $jobname )->run();
62
+			foreach ($jobs as $jobname) {
63
+				\Aimeos\Controller\Jobs\Factory::createController($context, $aimeos, $jobname)->run();
64 64
 			}
65 65
 		}
66 66
 	}
@@ -74,8 +74,8 @@  discard block
 block discarded – undo
74 74
 	protected function getArguments()
75 75
 	{
76 76
 		return array(
77
-			array( 'jobs', InputArgument::REQUIRED, 'One or more job controller names like "admin/job customer/email/watch"' ),
78
-			array( 'site', InputArgument::OPTIONAL, 'Site codes to execute the jobs for like "default unittest" (none for all)' ),
77
+			array('jobs', InputArgument::REQUIRED, 'One or more job controller names like "admin/job customer/email/watch"'),
78
+			array('site', InputArgument::OPTIONAL, 'Site codes to execute the jobs for like "default unittest" (none for all)'),
79 79
 		);
80 80
 	}
81 81
 
@@ -98,19 +98,19 @@  discard block
 block discarded – undo
98 98
 	protected function getContext()
99 99
 	{
100 100
 		$lv = $this->getLaravel();
101
-		$aimeos = $lv->make( '\Aimeos\Shop\Base\Aimeos' )->get();
102
-		$context = $lv->make( '\Aimeos\Shop\Base\Context' )->get( false, 'backend' );
101
+		$aimeos = $lv->make('\Aimeos\Shop\Base\Aimeos')->get();
102
+		$context = $lv->make('\Aimeos\Shop\Base\Context')->get(false, 'backend');
103 103
 
104
-		$tmplPaths = $aimeos->getCustomPaths( 'controller/jobs/templates' );
105
-		$view = $lv->make( '\Aimeos\Shop\Base\View' )->create( $context, $tmplPaths );
104
+		$tmplPaths = $aimeos->getCustomPaths('controller/jobs/templates');
105
+		$view = $lv->make('\Aimeos\Shop\Base\View')->create($context, $tmplPaths);
106 106
 
107
-		$langManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context )->getSubManager( 'language' );
108
-		$langids = array_keys( $langManager->searchItems( $langManager->createSearch( true ) ) );
109
-		$i18n = $lv->make( '\Aimeos\Shop\Base\I18n' )->get( $langids );
107
+		$langManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context)->getSubManager('language');
108
+		$langids = array_keys($langManager->searchItems($langManager->createSearch(true)));
109
+		$i18n = $lv->make('\Aimeos\Shop\Base\I18n')->get($langids);
110 110
 
111
-		$context->setEditor( 'aimeos:jobs' );
112
-		$context->setView( $view );
113
-		$context->setI18n( $i18n );
111
+		$context->setEditor('aimeos:jobs');
112
+		$context->setView($view);
113
+		$context->setI18n($i18n);
114 114
 
115 115
 		return $context;
116 116
 	}
Please login to merge, or discard this patch.