Completed
Push — master ( 4e3077...d2ec78 )
by Aimeos
15:45
created
src/Command/Jobs.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,6 @@
 block discarded – undo
21 21
 	/**
22 22
 	 * Executes the command
23 23
 	 *
24
-	 * @param array $argv Associative array from $_SERVER['argv']
25 24
 	 */
26 25
 	public static function usage()
27 26
 	{
Please login to merge, or discard this patch.
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -34,27 +34,27 @@  discard block
 block discarded – undo
34 34
 	 *
35 35
 	 * @return string Command usage and options
36 36
 	 */
37
-	public static function run( array $argv )
37
+	public static function run(array $argv)
38 38
 	{
39
-		array_shift( $argv );
40
-		$options = self::getOptions( $argv );
39
+		array_shift($argv);
40
+		$options = self::getOptions($argv);
41 41
 
42
-		if( ( $jobs = array_shift( $argv ) ) === null ) {
42
+		if (($jobs = array_shift($argv)) === null) {
43 43
 			throw new \Aimeos\Slim\Command\Exception();
44 44
 		}
45
-		$sites = array_shift( $argv );
45
+		$sites = array_shift($argv);
46 46
 
47
-		$config = self::getConfig( $options );
47
+		$config = self::getConfig($options);
48 48
 
49
-		$app = new \Slim\App( $config );
50
-		$aimeos = new \Aimeos\Slim\Bootstrap( $app, $config );
51
-		$aimeos->setup( ( isset( $options['extdir'] ) ? $options['extdir'] : './ext' ) );
49
+		$app = new \Slim\App($config);
50
+		$aimeos = new \Aimeos\Slim\Bootstrap($app, $config);
51
+		$aimeos->setup((isset($options['extdir']) ? $options['extdir'] : './ext'));
52 52
 
53 53
 		$container = $app->getContainer();
54
-		$context = self::getContext( $container );
54
+		$context = self::getContext($container);
55 55
 
56
-		$siteItems = self::getSiteItems( $context, $sites );
57
-		self::execute( $container->get( 'aimeos' ), $context, $siteItems, $jobs );
56
+		$siteItems = self::getSiteItems($context, $sites);
57
+		self::execute($container->get('aimeos'), $context, $siteItems, $jobs);
58 58
 	}
59 59
 
60 60
 
@@ -64,16 +64,16 @@  discard block
 block discarded – undo
64 64
 	 * @param array $options Associative list of given options
65 65
 	 * @return array Multi-dimensional array of configuration settings
66 66
 	 */
67
-	protected static function getConfig( array $options )
67
+	protected static function getConfig(array $options)
68 68
 	{
69 69
 		$config = array();
70 70
 
71
-		if( isset( $options['config'] ) )
71
+		if (isset($options['config']))
72 72
 		{
73
-			foreach( (array) $options['config'] as $path )
73
+			foreach ((array) $options['config'] as $path)
74 74
 			{
75
-				if( is_file( $path ) ) {
76
-					$config = array_replace_recursive( $config, require $path );
75
+				if (is_file($path)) {
76
+					$config = array_replace_recursive($config, require $path);
77 77
 				}
78 78
 			}
79 79
 		}
@@ -88,25 +88,25 @@  discard block
 block discarded – undo
88 88
 	 * @param \Interop\Container\ContainerInterface $container Dependency injection container
89 89
 	 * @return \Aimeos\MShop\Context\Item\Standard Context object
90 90
 	 */
91
-	protected static function getContext( \Interop\Container\ContainerInterface $container )
91
+	protected static function getContext(\Interop\Container\ContainerInterface $container)
92 92
 	{
93
-		$aimeos = $container->get( 'aimeos' );
94
-		$context = $container->get( 'aimeos_context' )->get( false );
93
+		$aimeos = $container->get('aimeos');
94
+		$context = $container->get('aimeos_context')->get(false);
95 95
 
96 96
 		$env = \Slim\Http\Environment::mock();
97
-		$request = \Slim\Http\Request::createFromEnvironment( $env );
97
+		$request = \Slim\Http\Request::createFromEnvironment($env);
98 98
 		$response = new \Slim\Http\Response();
99 99
 
100
-		$tmplPaths = $aimeos->getCustomPaths( 'controller/jobs/templates' );
101
-		$view = $container->get( 'aimeos_view' )->create( $request, $response, array(), $tmplPaths );
100
+		$tmplPaths = $aimeos->getCustomPaths('controller/jobs/templates');
101
+		$view = $container->get('aimeos_view')->create($request, $response, array(), $tmplPaths);
102 102
 
103
-		$langManager = \Aimeos\MShop\Factory::createManager( $context, 'locale/language' );
104
-		$langids = array_keys( $langManager->searchItems( $langManager->createSearch( true ) ) );
105
-		$i18n = $container->get( 'aimeos_i18n' )->get( $langids );
103
+		$langManager = \Aimeos\MShop\Factory::createManager($context, 'locale/language');
104
+		$langids = array_keys($langManager->searchItems($langManager->createSearch(true)));
105
+		$i18n = $container->get('aimeos_i18n')->get($langids);
106 106
 
107
-		$context->setEditor( 'aimeos:jobs' );
108
-		$context->setView( $view );
109
-		$context->setI18n( $i18n );
107
+		$context->setEditor('aimeos:jobs');
108
+		$context->setView($view);
109
+		$context->setI18n($i18n);
110 110
 
111 111
 		return $context;
112 112
 	}
@@ -119,19 +119,19 @@  discard block
 block discarded – undo
119 119
 	 * @param \Aimeos\MShop\Context\Item\Iface $ctx Context object
120 120
 	 * @param array $siteItems List of site items implementing \Aimeos\MShop\Locale\Site\Iface
121 121
 	 */
122
-	protected static function execute( \Aimeos\Bootstrap $aimeos, \Aimeos\MShop\Context\Item\Iface $ctx, array $siteItems, $jobs )
122
+	protected static function execute(\Aimeos\Bootstrap $aimeos, \Aimeos\MShop\Context\Item\Iface $ctx, array $siteItems, $jobs)
123 123
 	{
124
-		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $ctx );
124
+		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($ctx);
125 125
 
126
-		foreach( $siteItems as $siteItem )
126
+		foreach ($siteItems as $siteItem)
127 127
 		{
128
-			$localeItem = $localeManager->bootstrap( $siteItem->getCode(), 'en', '', false );
129
-			$ctx->setLocale( $localeItem );
128
+			$localeItem = $localeManager->bootstrap($siteItem->getCode(), 'en', '', false);
129
+			$ctx->setLocale($localeItem);
130 130
 
131
-			printf( "Executing the Aimeos jobs for \"%s\"\n", $siteItem->getCode() );
131
+			printf("Executing the Aimeos jobs for \"%s\"\n", $siteItem->getCode());
132 132
 
133
-			foreach( (array) explode( ' ', $jobs ) as $jobname ) {
134
-				\Aimeos\Controller\Jobs\Factory::createController( $ctx, $aimeos, $jobname )->run();
133
+			foreach ((array) explode(' ', $jobs) as $jobname) {
134
+				\Aimeos\Controller\Jobs\Factory::createController($ctx, $aimeos, $jobname)->run();
135 135
 			}
136 136
 		}
137 137
 	}
Please login to merge, or discard this patch.
src/Command/Iface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 	 *
24 24
 	 * @param array $argv Associative array from $_SERVER['argv']
25 25
 	 */
26
-	public static function run( array $argv );
26
+	public static function run(array $argv);
27 27
 
28 28
 	/**
29 29
 	 * Returns the command usage and options
Please login to merge, or discard this patch.
src/Command/Cache.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -34,19 +34,19 @@  discard block
 block discarded – undo
34 34
 	 *
35 35
 	 * @param array $argv Associative array from $_SERVER['argv']
36 36
 	 */
37
-	public static function run( array $argv )
37
+	public static function run(array $argv)
38 38
 	{
39
-		array_shift( $argv );
40
-		$options = self::getOptions( $argv );
41
-		$sites = array_shift( $argv );
39
+		array_shift($argv);
40
+		$options = self::getOptions($argv);
41
+		$sites = array_shift($argv);
42 42
 
43
-		$extdirs = ( isset( $options['extdir'] ) ? (array) $options['extdir'] : array() );
44
-		$aimeos = new \Aimeos\Bootstrap( $extdirs );
43
+		$extdirs = (isset($options['extdir']) ? (array) $options['extdir'] : array());
44
+		$aimeos = new \Aimeos\Bootstrap($extdirs);
45 45
 
46
-		$ctx = self::getContext( $aimeos->getConfigPaths(), $options );
47
-		$siteItems = self::getSiteItems( $ctx, $sites );
46
+		$ctx = self::getContext($aimeos->getConfigPaths(), $options);
47
+		$siteItems = self::getSiteItems($ctx, $sites);
48 48
 
49
-		self::clear( $ctx, $siteItems );
49
+		self::clear($ctx, $siteItems);
50 50
 	}
51 51
 
52 52
 
@@ -57,32 +57,32 @@  discard block
 block discarded – undo
57 57
 	 * @param array $options Associative list of configuration options as key/value pairs
58 58
 	 * @return \Aimeos\MShop\Context\Item\Iface Context object
59 59
 	 */
60
-	protected static function getContext( array $confPaths, array $options )
60
+	protected static function getContext(array $confPaths, array $options)
61 61
 	{
62 62
 		$config = array();
63 63
 		$ctx = new \Aimeos\MShop\Context\Item\Standard();
64 64
 
65
-		if( isset( $options['config'] ) )
65
+		if (isset($options['config']))
66 66
 		{
67
-			foreach( (array) $options['config'] as $path )
67
+			foreach ((array) $options['config'] as $path)
68 68
 			{
69
-				if( is_file( $path ) ) {
70
-					$config = array_replace_recursive( $config, require $path );
69
+				if (is_file($path)) {
70
+					$config = array_replace_recursive($config, require $path);
71 71
 				} else {
72 72
 					$confPaths[] = $path;
73 73
 				}
74 74
 			}
75 75
 		}
76 76
 
77
-		$conf = new \Aimeos\MW\Config\PHPArray( $config, $confPaths );
78
-		$conf = new \Aimeos\MW\Config\Decorator\Memory( $conf );
79
-		$ctx->setConfig( $conf );
77
+		$conf = new \Aimeos\MW\Config\PHPArray($config, $confPaths);
78
+		$conf = new \Aimeos\MW\Config\Decorator\Memory($conf);
79
+		$ctx->setConfig($conf);
80 80
 
81
-		$dbm = new \Aimeos\MW\DB\Manager\PDO( $conf );
82
-		$ctx->setDatabaseManager( $dbm );
81
+		$dbm = new \Aimeos\MW\DB\Manager\PDO($conf);
82
+		$ctx->setDatabaseManager($dbm);
83 83
 
84
-		$logger = new \Aimeos\MW\Logger\Errorlog( \Aimeos\MW\Logger\Base::INFO );
85
-		$ctx->setLogger( $logger );
84
+		$logger = new \Aimeos\MW\Logger\Errorlog(\Aimeos\MW\Logger\Base::INFO);
85
+		$ctx->setLogger($logger);
86 86
 
87 87
 		return $ctx;
88 88
 	}
@@ -94,23 +94,23 @@  discard block
 block discarded – undo
94 94
 	 * @param \Aimeos\MShop\Context\Item\Iface $ctx Context object
95 95
 	 * @param array $siteItems List of site items implementing \Aimeos\MShop\Locale\Site\Iface
96 96
 	 */
97
-	protected static function clear( \Aimeos\MShop\Context\Item\Iface $ctx, array $siteItems )
97
+	protected static function clear(\Aimeos\MShop\Context\Item\Iface $ctx, array $siteItems)
98 98
 	{
99
-		$localeManager = \Aimeos\MShop\Factory::createManager( $ctx, 'locale' );
99
+		$localeManager = \Aimeos\MShop\Factory::createManager($ctx, 'locale');
100 100
 
101
-		foreach( $siteItems as $siteItem )
101
+		foreach ($siteItems as $siteItem)
102 102
 		{
103
-			$localeItem = $localeManager->bootstrap( $siteItem->getCode(), '', '', false );
103
+			$localeItem = $localeManager->bootstrap($siteItem->getCode(), '', '', false);
104 104
 
105 105
 			$lcontext = clone $ctx;
106
-			$lcontext->setLocale( $localeItem );
106
+			$lcontext->setLocale($localeItem);
107 107
 
108
-			$cache = new \Aimeos\MAdmin\Cache\Proxy\Standard( $lcontext );
109
-			$lcontext->setCache( $cache );
108
+			$cache = new \Aimeos\MAdmin\Cache\Proxy\Standard($lcontext);
109
+			$lcontext->setCache($cache);
110 110
 
111
-			printf( "Clearing the Aimeos cache for site \"%1\$s\"\n", $siteItem->getCode() );
111
+			printf("Clearing the Aimeos cache for site \"%1\$s\"\n", $siteItem->getCode());
112 112
 
113
-			\Aimeos\MAdmin\Cache\Manager\Factory::createManager( $lcontext )->getCache()->flush();
113
+			\Aimeos\MAdmin\Cache\Manager\Factory::createManager($lcontext)->getCache()->flush();
114 114
 		}
115 115
 	}
116 116
 }
117 117
\ No newline at end of file
Please login to merge, or discard this patch.
src/Command/Base.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -24,31 +24,31 @@  discard block
 block discarded – undo
24 24
 	 * @param array &$params List of parameters
25 25
 	 * @return array Associative list of option name and value(s)
26 26
 	 */
27
-	protected static function getOptions( array &$params )
27
+	protected static function getOptions(array &$params)
28 28
 	{
29 29
 		$options = array();
30 30
 
31
-		foreach( $params as $key => $option )
31
+		foreach ($params as $key => $option)
32 32
 		{
33
-			if( $option === '--help' ) {
33
+			if ($option === '--help') {
34 34
 				throw new Exception();
35 35
 			}
36 36
 
37
-			if( strncmp( $option, '--', 2 ) === 0 && ( $pos = strpos( $option, '=', 2 ) ) !== false )
37
+			if (strncmp($option, '--', 2) === 0 && ($pos = strpos($option, '=', 2)) !== false)
38 38
 			{
39
-				$name = substr( $option, 2, $pos - 2 );
39
+				$name = substr($option, 2, $pos - 2);
40 40
 
41
-				if( isset( $options[$name] ) )
41
+				if (isset($options[$name]))
42 42
 				{
43 43
 					$options[$name] = (array) $options[$name];
44
-					$options[$name][] = substr( $option, $pos + 1 );
44
+					$options[$name][] = substr($option, $pos + 1);
45 45
 				}
46 46
 				else
47 47
 				{
48
-					$options[$name] = substr( $option, $pos + 1 );
48
+					$options[$name] = substr($option, $pos + 1);
49 49
 				}
50 50
 
51
-				unset( $params[$key] );
51
+				unset($params[$key]);
52 52
 			}
53 53
 		}
54 54
 
@@ -62,19 +62,19 @@  discard block
 block discarded – undo
62 62
 	 * @param \Aimeos\MShop\Context\Item\Iface $ctx Context object
63 63
 	 * @param string|null $sites List of site codes separated by a space
64 64
 	 */
65
-	protected static function getSiteItems( \Aimeos\MShop\Context\Item\Iface $ctx, $sites )
65
+	protected static function getSiteItems(\Aimeos\MShop\Context\Item\Iface $ctx, $sites)
66 66
 	{
67
-		$manager = \Aimeos\MShop\Factory::createManager( $ctx, 'locale/site' );
67
+		$manager = \Aimeos\MShop\Factory::createManager($ctx, 'locale/site');
68 68
 		$search = $manager->createSearch();
69 69
 
70
-		if( is_scalar( $sites ) && $sites != '' ) {
71
-			$sites = explode( ' ', $sites );
70
+		if (is_scalar($sites) && $sites != '') {
71
+			$sites = explode(' ', $sites);
72 72
 		}
73 73
 
74
-		if( !empty( $sites ) ) {
75
-			$search->setConditions( $search->compare( '==', 'locale.site.code', $sites ) );
74
+		if (!empty($sites)) {
75
+			$search->setConditions($search->compare('==', 'locale.site.code', $sites));
76 76
 		}
77 77
 
78
-		return $manager->searchItems( $search );
78
+		return $manager->searchItems($search);
79 79
 	}
80 80
 }
81 81
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@
 block discarded – undo
42 42
 				{
43 43
 					$options[$name] = (array) $options[$name];
44 44
 					$options[$name][] = substr( $option, $pos + 1 );
45
-				}
46
-				else
45
+				} else
47 46
 				{
48 47
 					$options[$name] = substr( $option, $pos + 1 );
49 48
 				}
Please login to merge, or discard this patch.
src/aimeos-routes.php 1 patch
Spacing   +99 added lines, -99 removed lines patch added patch discarded remove patch
@@ -1,158 +1,158 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-$app->group( $config( 'routes/admin', '/admin' ), function() use ( $config ) {
4
+$app->group($config('routes/admin', '/admin'), function() use ($config) {
5 5
 
6
-	$this->map(['GET', 'POST'], '', function( $request, $response, $args ) use ( $config ) {
7
-		return $response->withHeader( 'Location', $config( 'routes/admin', '/admin' ) . '/jqadm/search/product' );
8
-	})->setName( 'aimeos_shop_admin' );
6
+	$this->map(['GET', 'POST'], '', function($request, $response, $args) use ($config) {
7
+		return $response->withHeader('Location', $config('routes/admin', '/admin') . '/jqadm/search/product');
8
+	})->setName('aimeos_shop_admin');
9 9
 
10 10
 
11
-	$this->map(['GET'], '/extadm/file', function( $request, $response, $args ) {
12
-		return \Aimeos\Slim\Controller\Extadm::fileAction( $this, $request, $response, $args );
13
-	})->setName( 'aimeos_shop_extadm_file' );
11
+	$this->map(['GET'], '/extadm/file', function($request, $response, $args) {
12
+		return \Aimeos\Slim\Controller\Extadm::fileAction($this, $request, $response, $args);
13
+	})->setName('aimeos_shop_extadm_file');
14 14
 
15
-	$this->map(['POST'], '/extadm/do', function( $request, $response, $args ) {
16
-		return \Aimeos\Slim\Controller\Extadm::doAction( $this, $request, $response, $args );
17
-	})->setName( 'aimeos_shop_extadm_json' );
15
+	$this->map(['POST'], '/extadm/do', function($request, $response, $args) {
16
+		return \Aimeos\Slim\Controller\Extadm::doAction($this, $request, $response, $args);
17
+	})->setName('aimeos_shop_extadm_json');
18 18
 
19
-	$this->map(['GET'], '/extadm[/{tab:[0-9]+}[/{lang}]]', function( $request, $response, $args ) {
20
-		return \Aimeos\Slim\Controller\Extadm::indexAction( $this, $request, $response, $args );
21
-	})->setName( 'aimeos_shop_extadm' );
19
+	$this->map(['GET'], '/extadm[/{tab:[0-9]+}[/{lang}]]', function($request, $response, $args) {
20
+		return \Aimeos\Slim\Controller\Extadm::indexAction($this, $request, $response, $args);
21
+	})->setName('aimeos_shop_extadm');
22 22
 
23 23
 
24
-	$this->map(['GET', 'POST'], '/jqadm/copy/{resource:[^0-9]+}/{id:[0-9]+}', function( $request, $response, $args ) {
25
-		return \Aimeos\Slim\Controller\Jqadm::copyAction( $this, $request, $response, $args );
26
-	})->setName( 'aimeos_shop_jqadm_copy' );
24
+	$this->map(['GET', 'POST'], '/jqadm/copy/{resource:[^0-9]+}/{id:[0-9]+}', function($request, $response, $args) {
25
+		return \Aimeos\Slim\Controller\Jqadm::copyAction($this, $request, $response, $args);
26
+	})->setName('aimeos_shop_jqadm_copy');
27 27
 
28
-	$this->map(['GET', 'POST'], '/jqadm/create/{resource:[^0-9]+}', function( $request, $response, $args ) {
29
-		return \Aimeos\Slim\Controller\Jqadm::createAction( $this, $request, $response, $args );
30
-	})->setName( 'aimeos_shop_jqadm_create' );
28
+	$this->map(['GET', 'POST'], '/jqadm/create/{resource:[^0-9]+}', function($request, $response, $args) {
29
+		return \Aimeos\Slim\Controller\Jqadm::createAction($this, $request, $response, $args);
30
+	})->setName('aimeos_shop_jqadm_create');
31 31
 
32
-	$this->map(['GET', 'POST'], '/jqadm/delete/{resource:[^0-9]+}/{id:[0-9]+}', function( $request, $response, $args ) {
33
-		return \Aimeos\Slim\Controller\Jqadm::deleteAction( $this, $request, $response, $args );
34
-	})->setName( 'aimeos_shop_jqadm_delete' );
32
+	$this->map(['GET', 'POST'], '/jqadm/delete/{resource:[^0-9]+}/{id:[0-9]+}', function($request, $response, $args) {
33
+		return \Aimeos\Slim\Controller\Jqadm::deleteAction($this, $request, $response, $args);
34
+	})->setName('aimeos_shop_jqadm_delete');
35 35
 
36
-	$this->map(['GET'], '/jqadm/get/{resource:[^0-9]+}/{id:[0-9]+}', function( $request, $response, $args ) {
37
-		return \Aimeos\Slim\Controller\Jqadm::getAction( $this, $request, $response, $args );
38
-	})->setName( 'aimeos_shop_jqadm_get' );
36
+	$this->map(['GET'], '/jqadm/get/{resource:[^0-9]+}/{id:[0-9]+}', function($request, $response, $args) {
37
+		return \Aimeos\Slim\Controller\Jqadm::getAction($this, $request, $response, $args);
38
+	})->setName('aimeos_shop_jqadm_get');
39 39
 
40
-	$this->map(['POST'], '/jqadm/save/{resource:[^0-9]+}[/{id:[0-9]+}]', function( $request, $response, $args ) {
41
-		return \Aimeos\Slim\Controller\Jqadm::saveAction( $this, $request, $response, $args );
42
-	})->setName( 'aimeos_shop_jqadm_save' );
40
+	$this->map(['POST'], '/jqadm/save/{resource:[^0-9]+}[/{id:[0-9]+}]', function($request, $response, $args) {
41
+		return \Aimeos\Slim\Controller\Jqadm::saveAction($this, $request, $response, $args);
42
+	})->setName('aimeos_shop_jqadm_save');
43 43
 
44
-	$this->map(['GET', 'POST'], '/jqadm/search/{resource:[^0-9]+}', function( $request, $response, $args ) {
45
-		return \Aimeos\Slim\Controller\Jqadm::searchAction( $this, $request, $response, $args );
46
-	})->setName( 'aimeos_shop_jqadm_search' );
44
+	$this->map(['GET', 'POST'], '/jqadm/search/{resource:[^0-9]+}', function($request, $response, $args) {
45
+		return \Aimeos\Slim\Controller\Jqadm::searchAction($this, $request, $response, $args);
46
+	})->setName('aimeos_shop_jqadm_search');
47 47
 
48 48
 
49
-	$this->map(['DELETE'], '/jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function( $request, $response, $args ) {
50
-		return \Aimeos\Slim\Controller\Jsonadm::deleteAction( $this, $request, $response, $args );
51
-	})->setName( 'aimeos_shop_jsonadm_delete' );
49
+	$this->map(['DELETE'], '/jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function($request, $response, $args) {
50
+		return \Aimeos\Slim\Controller\Jsonadm::deleteAction($this, $request, $response, $args);
51
+	})->setName('aimeos_shop_jsonadm_delete');
52 52
 
53
-	$this->map(['GET'], '/jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function( $request, $response, $args ) {
54
-		return \Aimeos\Slim\Controller\Jsonadm::getAction( $this, $request, $response, $args );
55
-	})->setName( 'aimeos_shop_jsonadm_get' );
53
+	$this->map(['GET'], '/jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function($request, $response, $args) {
54
+		return \Aimeos\Slim\Controller\Jsonadm::getAction($this, $request, $response, $args);
55
+	})->setName('aimeos_shop_jsonadm_get');
56 56
 
57
-	$this->map(['PATCH'], '/jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function( $request, $response, $args ) {
58
-		return \Aimeos\Slim\Controller\Jsonadm::patchAction( $this, $request, $response, $args );
59
-	})->setName( 'aimeos_shop_jsonadm_patch' );
57
+	$this->map(['PATCH'], '/jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function($request, $response, $args) {
58
+		return \Aimeos\Slim\Controller\Jsonadm::patchAction($this, $request, $response, $args);
59
+	})->setName('aimeos_shop_jsonadm_patch');
60 60
 
61
-	$this->map(['POST'], '/jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function( $request, $response, $args ) {
62
-		return \Aimeos\Slim\Controller\Jsonadm::postAction( $this, $request, $response, $args );
63
-	})->setName( 'aimeos_shop_jsonadm_post' );
61
+	$this->map(['POST'], '/jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function($request, $response, $args) {
62
+		return \Aimeos\Slim\Controller\Jsonadm::postAction($this, $request, $response, $args);
63
+	})->setName('aimeos_shop_jsonadm_post');
64 64
 
65
-	$this->map(['PUT'], '/jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function( $request, $response, $args ) {
66
-		return \Aimeos\Slim\Controller\Jsonadm::putAction( $this, $request, $response, $args );
67
-	})->setName( 'aimeos_shop_jsonadm_put' );
65
+	$this->map(['PUT'], '/jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function($request, $response, $args) {
66
+		return \Aimeos\Slim\Controller\Jsonadm::putAction($this, $request, $response, $args);
67
+	})->setName('aimeos_shop_jsonadm_put');
68 68
 
69
-	$this->map(['OPTIONS'], '/jsonadm/[{resource}]', function( $request, $response, $args ) {
70
-		return \Aimeos\Slim\Controller\Jsonadm::optionsAction( $this, $request, $response, $args );
71
-	})->setName( 'aimeos_shop_jsonadm_options' );
69
+	$this->map(['OPTIONS'], '/jsonadm/[{resource}]', function($request, $response, $args) {
70
+		return \Aimeos\Slim\Controller\Jsonadm::optionsAction($this, $request, $response, $args);
71
+	})->setName('aimeos_shop_jsonadm_options');
72 72
 
73 73
 });
74 74
 
75 75
 
76
-$app->group( $config( 'routes/account', '' ), function() {
76
+$app->group($config('routes/account', ''), function() {
77 77
 
78
-	$this->map(['GET', 'POST'], '/myaccount', function( $request, $response, $args ) {
79
-		return \Aimeos\Slim\Controller\Account::indexAction( $this, $request, $response, $args );
80
-	})->setName( 'aimeos_shop_account' );
78
+	$this->map(['GET', 'POST'], '/myaccount', function($request, $response, $args) {
79
+		return \Aimeos\Slim\Controller\Account::indexAction($this, $request, $response, $args);
80
+	})->setName('aimeos_shop_account');
81 81
 
82
-	$this->map(['GET', 'POST'], '/myaccount/favorite[/{fav_action}/{fav_id:[0-9]+}[/{d_prodid:[0-9]+}[/{d_name}[/{l_pos:[0-9]+}]]]]', function( $request, $response, $args ) {
83
-		return \Aimeos\Slim\Controller\Account::indexAction( $this, $request, $response, $args );
84
-	})->setName( 'aimeos_shop_account_favorite' );
82
+	$this->map(['GET', 'POST'], '/myaccount/favorite[/{fav_action}/{fav_id:[0-9]+}[/{d_prodid:[0-9]+}[/{d_name}[/{l_pos:[0-9]+}]]]]', function($request, $response, $args) {
83
+		return \Aimeos\Slim\Controller\Account::indexAction($this, $request, $response, $args);
84
+	})->setName('aimeos_shop_account_favorite');
85 85
 
86
-	$this->map(['GET', 'POST'], '/myaccount/watch[/{wat_action}/{wat_id:[0-9]+}[/{d_prodid:[0-9]+}[/{d_name}[/{l_pos:[0-9]+}]]]]', function( $request, $response, $args ) {
87
-		return \Aimeos\Slim\Controller\Account::indexAction( $this, $request, $response, $args );
88
-	})->setName( 'aimeos_shop_account_watch' );
86
+	$this->map(['GET', 'POST'], '/myaccount/watch[/{wat_action}/{wat_id:[0-9]+}[/{d_prodid:[0-9]+}[/{d_name}[/{l_pos:[0-9]+}]]]]', function($request, $response, $args) {
87
+		return \Aimeos\Slim\Controller\Account::indexAction($this, $request, $response, $args);
88
+	})->setName('aimeos_shop_account_watch');
89 89
 
90
-	$this->map(['GET', 'POST'], '/myaccount/download/{dl_id}', function( $request, $response, $args ) {
91
-		return \Aimeos\Slim\Controller\Account::downloadAction( $this, $request, $response, $args );
92
-	})->setName( 'aimeos_shop_account_download' );
90
+	$this->map(['GET', 'POST'], '/myaccount/download/{dl_id}', function($request, $response, $args) {
91
+		return \Aimeos\Slim\Controller\Account::downloadAction($this, $request, $response, $args);
92
+	})->setName('aimeos_shop_account_download');
93 93
 
94 94
 });
95 95
 
96 96
 
97
-$app->group( $config( 'routes/default', '' ), function() {
97
+$app->group($config('routes/default', ''), function() {
98 98
 
99
-	$this->map(['GET', 'POST'], '/count', function( $request, $response, $args ) {
100
-		return \Aimeos\Slim\Controller\Catalog::countAction( $this, $request, $response, $args );
101
-	})->setName( 'aimeos_shop_count' );
99
+	$this->map(['GET', 'POST'], '/count', function($request, $response, $args) {
100
+		return \Aimeos\Slim\Controller\Catalog::countAction($this, $request, $response, $args);
101
+	})->setName('aimeos_shop_count');
102 102
 
103
-	$this->map(['GET', 'POST'], '/detail/{d_prodid:[0-9]+}[/{d_name}[/{l_pos:[0-9]+}]]', function( $request, $response, $args ) {
104
-		return \Aimeos\Slim\Controller\Catalog::detailAction( $this, $request, $response, $args );
105
-	})->setName( 'aimeos_shop_detail' );
103
+	$this->map(['GET', 'POST'], '/detail/{d_prodid:[0-9]+}[/{d_name}[/{l_pos:[0-9]+}]]', function($request, $response, $args) {
104
+		return \Aimeos\Slim\Controller\Catalog::detailAction($this, $request, $response, $args);
105
+	})->setName('aimeos_shop_detail');
106 106
 
107
-	$this->map(['GET', 'POST'], '/detail/pin[/{pin_action}/{pin_id:[0-9]+}[/{d_prodid:[0-9]+}[/{d_name}[/{l_pos:[0-9]+}]]]]', function( $request, $response, $args ) {
108
-		return \Aimeos\Slim\Controller\Catalog::detailAction( $this, $request, $response, $args );
109
-	})->setName( 'aimeos_shop_session_pinned' );
107
+	$this->map(['GET', 'POST'], '/detail/pin[/{pin_action}/{pin_id:[0-9]+}[/{d_prodid:[0-9]+}[/{d_name}[/{l_pos:[0-9]+}]]]]', function($request, $response, $args) {
108
+		return \Aimeos\Slim\Controller\Catalog::detailAction($this, $request, $response, $args);
109
+	})->setName('aimeos_shop_session_pinned');
110 110
 
111
-	$this->map(['GET', 'POST'], '/list[/{f_catid:[0-9]+}[/{f_name}]]', function( $request, $response, $args ) {
112
-		return \Aimeos\Slim\Controller\Catalog::listAction( $this, $request, $response, $args );
113
-	})->setName( 'aimeos_shop_list' );
111
+	$this->map(['GET', 'POST'], '/list[/{f_catid:[0-9]+}[/{f_name}]]', function($request, $response, $args) {
112
+		return \Aimeos\Slim\Controller\Catalog::listAction($this, $request, $response, $args);
113
+	})->setName('aimeos_shop_list');
114 114
 
115
-	$this->map(['GET', 'POST'], '/suggest', function( $request, $response, $args ) {
116
-		return \Aimeos\Slim\Controller\Catalog::suggestAction( $this, $request, $response, $args );
117
-	})->setName( 'aimeos_shop_suggest' );
115
+	$this->map(['GET', 'POST'], '/suggest', function($request, $response, $args) {
116
+		return \Aimeos\Slim\Controller\Catalog::suggestAction($this, $request, $response, $args);
117
+	})->setName('aimeos_shop_suggest');
118 118
 
119
-	$this->map(['GET', 'POST'], '/stock', function( $request, $response, $args ) {
120
-		return \Aimeos\Slim\Controller\Catalog::stockAction( $this, $request, $response, $args );
121
-	})->setName( 'aimeos_shop_stock' );
119
+	$this->map(['GET', 'POST'], '/stock', function($request, $response, $args) {
120
+		return \Aimeos\Slim\Controller\Catalog::stockAction($this, $request, $response, $args);
121
+	})->setName('aimeos_shop_stock');
122 122
 
123
-	$this->map(['GET', 'POST'], '/basket', function( $request, $response, $args ) {
124
-		return \Aimeos\Slim\Controller\Basket::indexAction( $this, $request, $response, $args );
125
-	})->setName( 'aimeos_shop_basket' );
123
+	$this->map(['GET', 'POST'], '/basket', function($request, $response, $args) {
124
+		return \Aimeos\Slim\Controller\Basket::indexAction($this, $request, $response, $args);
125
+	})->setName('aimeos_shop_basket');
126 126
 
127
-	$this->map(['GET', 'POST'], '/checkout[/{c_step}]', function( $request, $response, $args ) {
128
-		return \Aimeos\Slim\Controller\Checkout::indexAction( $this, $request, $response, $args );
129
-	})->setName( 'aimeos_shop_checkout' );
127
+	$this->map(['GET', 'POST'], '/checkout[/{c_step}]', function($request, $response, $args) {
128
+		return \Aimeos\Slim\Controller\Checkout::indexAction($this, $request, $response, $args);
129
+	})->setName('aimeos_shop_checkout');
130 130
 
131 131
 });
132 132
 
133 133
 
134
-$app->group( $config( 'routes/confirm', '' ), function() {
134
+$app->group($config('routes/confirm', ''), function() {
135 135
 
136
-	$this->map(['GET', 'POST'], '/confirm[/{code}[/{orderid:[0-9]+}]]', function( $request, $response, $args ) {
137
-		return \Aimeos\Slim\Controller\Checkout::confirmAction( $this, $request, $response, $args );
138
-	})->setName( 'aimeos_shop_confirm' );
136
+	$this->map(['GET', 'POST'], '/confirm[/{code}[/{orderid:[0-9]+}]]', function($request, $response, $args) {
137
+		return \Aimeos\Slim\Controller\Checkout::confirmAction($this, $request, $response, $args);
138
+	})->setName('aimeos_shop_confirm');
139 139
 
140 140
 });
141 141
 
142 142
 
143
-$app->group( $config( 'routes/update', '' ), function() {
143
+$app->group($config('routes/update', ''), function() {
144 144
 
145
-	$this->map(['GET', 'POST'], '/update', function( $request, $response, $args ) {
146
-		return \Aimeos\Slim\Controller\Checkout::updateAction( $this, $request, $response, $args );
147
-	})->setName( 'aimeos_shop_update' );
145
+	$this->map(['GET', 'POST'], '/update', function($request, $response, $args) {
146
+		return \Aimeos\Slim\Controller\Checkout::updateAction($this, $request, $response, $args);
147
+	})->setName('aimeos_shop_update');
148 148
 
149 149
 });
150 150
 
151 151
 
152
-$app->map(['GET', 'POST'], '/terms', function( $request, $response, $args ) {
152
+$app->map(['GET', 'POST'], '/terms', function($request, $response, $args) {
153 153
 	return 'terms';
154
-})->setName( 'aimeos_shop_terms' );
154
+})->setName('aimeos_shop_terms');
155 155
 
156
-$app->map(['GET', 'POST'], '/privacy', function( $request, $response, $args ) {
156
+$app->map(['GET', 'POST'], '/privacy', function($request, $response, $args) {
157 157
 	return 'privacy';
158
-})->setName( 'aimeos_shop_privacy' );
158
+})->setName('aimeos_shop_privacy');
Please login to merge, or discard this patch.
jobs.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 
9
-if( php_sapi_name() != 'cli' ) {
10
-	exit( 'Setup can only be started via command line for security reasons' );
9
+if (php_sapi_name() != 'cli') {
10
+	exit('Setup can only be started via command line for security reasons');
11 11
 }
12 12
 
13
-ini_set( 'display_errors', 1 );
14
-date_default_timezone_set( 'UTC' );
13
+ini_set('display_errors', 1);
14
+date_default_timezone_set('UTC');
15 15
 
16 16
 
17 17
 
@@ -19,15 +19,15 @@  discard block
 block discarded – undo
19 19
 {
20 20
 	require 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
21 21
 
22
-	\Aimeos\Slim\Command\Jobs::run( $_SERVER['argv'] );
22
+	\Aimeos\Slim\Command\Jobs::run($_SERVER['argv']);
23 23
 }
24
-catch( \Aimeos\Slim\Command\Exception $e )
24
+catch (\Aimeos\Slim\Command\Exception $e)
25 25
 {
26 26
 	echo $e->getMessage() . "\n";
27 27
 	echo \Aimeos\Slim\Command\Jobs::usage();
28
-	exit( 1 );
28
+	exit(1);
29 29
 }
30
-catch( \Throwable $t )
30
+catch (\Throwable $t)
31 31
 {
32 32
 	echo "\n\nCaught PHP error while processing setup";
33 33
 	echo "\n\nMessage:\n";
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 	echo "\n\nStack trace:\n";
36 36
 	echo $t->getTraceAsString();
37 37
 	echo "\n\n";
38
-	exit( 1 );
38
+	exit(1);
39 39
 }
40
-catch( \Exception $e )
40
+catch (\Exception $e)
41 41
 {
42 42
 	echo "\n\nCaught exception while processing setup";
43 43
 	echo "\n\nMessage:\n";
@@ -45,5 +45,5 @@  discard block
 block discarded – undo
45 45
 	echo "\n\nStack trace:\n";
46 46
 	echo $e->getTraceAsString();
47 47
 	echo "\n\n";
48
-	exit( 1 );
48
+	exit(1);
49 49
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,14 +20,12 @@  discard block
 block discarded – undo
20 20
 	require 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
21 21
 
22 22
 	\Aimeos\Slim\Command\Jobs::run( $_SERVER['argv'] );
23
-}
24
-catch( \Aimeos\Slim\Command\Exception $e )
23
+} catch( \Aimeos\Slim\Command\Exception $e )
25 24
 {
26 25
 	echo $e->getMessage() . "\n";
27 26
 	echo \Aimeos\Slim\Command\Jobs::usage();
28 27
 	exit( 1 );
29
-}
30
-catch( \Throwable $t )
28
+} catch( \Throwable $t )
31 29
 {
32 30
 	echo "\n\nCaught PHP error while processing setup";
33 31
 	echo "\n\nMessage:\n";
@@ -36,8 +34,7 @@  discard block
 block discarded – undo
36 34
 	echo $t->getTraceAsString();
37 35
 	echo "\n\n";
38 36
 	exit( 1 );
39
-}
40
-catch( \Exception $e )
37
+} catch( \Exception $e )
41 38
 {
42 39
 	echo "\n\nCaught exception while processing setup";
43 40
 	echo "\n\nMessage:\n";
Please login to merge, or discard this patch.
cache.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -6,27 +6,27 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 
9
-if( php_sapi_name() != 'cli' ) {
10
-	exit( 'Setup can only be started via command line for security reasons' );
9
+if (php_sapi_name() != 'cli') {
10
+	exit('Setup can only be started via command line for security reasons');
11 11
 }
12 12
 
13
-ini_set( 'display_errors', 1 );
14
-date_default_timezone_set( 'UTC' );
13
+ini_set('display_errors', 1);
14
+date_default_timezone_set('UTC');
15 15
 
16 16
 
17 17
 try
18 18
 {
19 19
 	require 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
20 20
 
21
-	\Aimeos\Slim\Command\Cache::run( $_SERVER['argv'] );
21
+	\Aimeos\Slim\Command\Cache::run($_SERVER['argv']);
22 22
 }
23
-catch( \Aimeos\Slim\Command\Exception $e )
23
+catch (\Aimeos\Slim\Command\Exception $e)
24 24
 {
25 25
 	echo $e->getMessage() . "\n";
26 26
 	echo \Aimeos\Slim\Command\Cache::usage();
27
-	exit( 1 );
27
+	exit(1);
28 28
 }
29
-catch( \Throwable $t )
29
+catch (\Throwable $t)
30 30
 {
31 31
 	echo "\n\nCaught PHP error";
32 32
 	echo "\n\nMessage:\n";
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
 	echo "\n\nStack trace:\n";
35 35
 	echo $t->getTraceAsString();
36 36
 	echo "\n\n";
37
-	exit( 1 );
37
+	exit(1);
38 38
 }
39
-catch( \Exception $e )
39
+catch (\Exception $e)
40 40
 {
41 41
 	echo "\n\nCaught exception";
42 42
 	echo "\n\nMessage:\n";
@@ -44,5 +44,5 @@  discard block
 block discarded – undo
44 44
 	echo "\n\nStack trace:\n";
45 45
 	echo $e->getTraceAsString();
46 46
 	echo "\n\n";
47
-	exit( 1 );
47
+	exit(1);
48 48
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,14 +19,12 @@  discard block
 block discarded – undo
19 19
 	require 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
20 20
 
21 21
 	\Aimeos\Slim\Command\Cache::run( $_SERVER['argv'] );
22
-}
23
-catch( \Aimeos\Slim\Command\Exception $e )
22
+} catch( \Aimeos\Slim\Command\Exception $e )
24 23
 {
25 24
 	echo $e->getMessage() . "\n";
26 25
 	echo \Aimeos\Slim\Command\Cache::usage();
27 26
 	exit( 1 );
28
-}
29
-catch( \Throwable $t )
27
+} catch( \Throwable $t )
30 28
 {
31 29
 	echo "\n\nCaught PHP error";
32 30
 	echo "\n\nMessage:\n";
@@ -35,8 +33,7 @@  discard block
 block discarded – undo
35 33
 	echo $t->getTraceAsString();
36 34
 	echo "\n\n";
37 35
 	exit( 1 );
38
-}
39
-catch( \Exception $e )
36
+} catch( \Exception $e )
40 37
 {
41 38
 	echo "\n\nCaught exception";
42 39
 	echo "\n\nMessage:\n";
Please login to merge, or discard this patch.