@@ -68,7 +68,7 @@ |
||
68 | 68 | if( $this->additional->getConfig()->get( 'setup/site' ) === 'unitperf' ) |
69 | 69 | { |
70 | 70 | $ds = DIRECTORY_SEPARATOR; |
71 | - $filename = __DIR__ . $ds . 'data' . $ds . 'locale.php'; |
|
71 | + $filename = __DIR__.$ds.'data'.$ds.'locale.php'; |
|
72 | 72 | |
73 | 73 | if( ( $testdata = include( $filename ) ) == false ) { |
74 | 74 | throw new \Aimeos\MW\Setup\Exception( sprintf( 'No data file "%1$s" found', $filename ) ); |
@@ -51,7 +51,7 @@ |
||
51 | 51 | $customerItem = $customerManager->createItem(); |
52 | 52 | $customerItem->setCode( 'demo-test' ); |
53 | 53 | $customerItem->setLabel( 'Test demo unitperf user' ); |
54 | - $customerItem->setPassword( sha1( microtime( true ) . getmypid() . rand() ) ); |
|
54 | + $customerItem->setPassword( sha1( microtime( true ).getmypid().rand() ) ); |
|
55 | 55 | $customerItem->setStatus( 1 ); |
56 | 56 | |
57 | 57 | $addrItem = $customerItem->getPaymentAddress(); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $this->msg( sprintf( 'Adding default code data for site "%1$s"', $site ), 0 ); $this->status( '' ); |
62 | 62 | |
63 | 63 | $ds = DIRECTORY_SEPARATOR; |
64 | - $path = __DIR__ . $ds . 'default' . $ds . 'data' . $ds . 'code.php'; |
|
64 | + $path = __DIR__.$ds.'default'.$ds.'data'.$ds.'code.php'; |
|
65 | 65 | |
66 | 66 | if( ( $data = include( $path ) ) == false ) { |
67 | 67 | throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for default codes', $path ) ); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | } catch( \Exception $e ) {; } // if type was already available |
94 | 94 | } |
95 | 95 | |
96 | - $this->status( $num > 0 ? $num . '/' . $total : 'OK' ); |
|
96 | + $this->status( $num > 0 ? $num.'/'.$total : 'OK' ); |
|
97 | 97 | } |
98 | 98 | } |
99 | 99 | } |
100 | 100 | \ No newline at end of file |
@@ -86,10 +86,14 @@ |
||
86 | 86 | $type->setStatus( $dataset['status'] ); |
87 | 87 | } |
88 | 88 | |
89 | - try { |
|
89 | + try |
|
90 | + { |
|
90 | 91 | $domainManager->saveItem( $type ); |
91 | 92 | $num++; |
92 | - } catch( \Exception $e ) {; } // if type was already available |
|
93 | + } |
|
94 | + catch( \Exception $e ) |
|
95 | + { |
|
96 | +; } // if type was already available |
|
93 | 97 | } |
94 | 98 | |
95 | 99 | $this->status( $num > 0 ? $num . '/' . $total : 'OK' ); |
@@ -81,7 +81,7 @@ |
||
81 | 81 | if( $value === '1' ) |
82 | 82 | { |
83 | 83 | $ds = DIRECTORY_SEPARATOR; |
84 | - $path = __DIR__ . $ds . 'data' . $ds . 'demo-catalog.php'; |
|
84 | + $path = __DIR__.$ds.'data'.$ds.'demo-catalog.php'; |
|
85 | 85 | |
86 | 86 | if( ( $data = include( $path ) ) == false ) { |
87 | 87 | throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for catalog domain', $path ) ); |
@@ -66,7 +66,9 @@ discard block |
||
66 | 66 | $this->removeItems( $item->getId(), 'catalog/lists', 'catalog', 'text' ); |
67 | 67 | $this->removeListItems( $item->getId(), 'catalog/lists', 'product' ); |
68 | 68 | } |
69 | - catch( \Exception $e ) {; } // If no root node was already inserted into the database |
|
69 | + catch( \Exception $e ) |
|
70 | + { |
|
71 | +; } // If no root node was already inserted into the database |
|
70 | 72 | |
71 | 73 | |
72 | 74 | if( $value === '1' ) |
@@ -103,8 +105,7 @@ discard block |
||
103 | 105 | } |
104 | 106 | |
105 | 107 | $this->status( 'added' ); |
106 | - } |
|
107 | - else |
|
108 | + } else |
|
108 | 109 | { |
109 | 110 | $this->status( 'removed' ); |
110 | 111 | } |
@@ -67,7 +67,7 @@ |
||
67 | 67 | if( $this->additional->getConfig()->get( 'setup/site', 'default' ) === 'default' ) |
68 | 68 | { |
69 | 69 | $ds = DIRECTORY_SEPARATOR; |
70 | - $filename = __DIR__ . $ds . 'data' . $ds . 'locale.php'; |
|
70 | + $filename = __DIR__.$ds.'data'.$ds.'locale.php'; |
|
71 | 71 | |
72 | 72 | if( ( $data = include( $filename ) ) == false ) { |
73 | 73 | throw new \Aimeos\MW\Setup\Exception( sprintf( 'No data file "%1$s" found', $filename ) ); |
@@ -82,7 +82,7 @@ |
||
82 | 82 | if( $value === '1' ) |
83 | 83 | { |
84 | 84 | $ds = DIRECTORY_SEPARATOR; |
85 | - $path = __DIR__ . $ds . 'data' . $ds . 'demo-service.php'; |
|
85 | + $path = __DIR__.$ds.'data'.$ds.'demo-service.php'; |
|
86 | 86 | |
87 | 87 | if( ( $data = include( $path ) ) == false ) { |
88 | 88 | throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for service domain', $path ) ); |
@@ -89,8 +89,7 @@ |
||
89 | 89 | } |
90 | 90 | |
91 | 91 | $this->status( 'added' ); |
92 | - } |
|
93 | - else |
|
92 | + } else |
|
94 | 93 | { |
95 | 94 | $this->status( 'removed' ); |
96 | 95 | } |
@@ -70,12 +70,12 @@ |
||
70 | 70 | |
71 | 71 | if( ctype_alnum( $name ) === false ) |
72 | 72 | { |
73 | - $classname = is_string( $name ) ? '\\Aimeos\\MAdmin\\Log\\Manager\\' . $name : '<not a string>'; |
|
73 | + $classname = is_string( $name ) ? '\\Aimeos\\MAdmin\\Log\\Manager\\'.$name : '<not a string>'; |
|
74 | 74 | throw new \Aimeos\MAdmin\Log\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
75 | 75 | } |
76 | 76 | |
77 | 77 | $iface = '\\Aimeos\\MAdmin\\Log\\Manager\\Iface'; |
78 | - $classname = '\\Aimeos\\MAdmin\\Log\\Manager\\' . $name; |
|
78 | + $classname = '\\Aimeos\\MAdmin\\Log\\Manager\\'.$name; |
|
79 | 79 | |
80 | 80 | $manager = self::createManagerBase( $context, $classname, $iface ); |
81 | 81 |
@@ -126,7 +126,7 @@ |
||
126 | 126 | * @category User |
127 | 127 | */ |
128 | 128 | $this->loglevel = $config->get( 'madmin/log/manager/standard/loglevel', \Aimeos\MW\Logger\Base::WARN ); |
129 | - $this->requestid = md5( php_uname( 'n' ) . getmypid() . date( 'Y-m-d H:i:s' ) ); |
|
129 | + $this->requestid = md5( php_uname( 'n' ).getmypid().date( 'Y-m-d H:i:s' ) ); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 |
@@ -153,9 +153,12 @@ discard block |
||
153 | 153 | */ |
154 | 154 | public function createItem() |
155 | 155 | { |
156 | - try { |
|
156 | + try |
|
157 | + { |
|
157 | 158 | $siteid = $this->getContext()->getLocale()->getSiteId(); |
158 | - } catch( \Exception $e ) { |
|
159 | + } |
|
160 | + catch( \Exception $e ) |
|
161 | + { |
|
159 | 162 | $siteid = null; |
160 | 163 | } |
161 | 164 | |
@@ -183,9 +186,12 @@ discard block |
||
183 | 186 | |
184 | 187 | $context = $this->getContext(); |
185 | 188 | |
186 | - try { |
|
189 | + try |
|
190 | + { |
|
187 | 191 | $siteid = $context->getLocale()->getSiteId(); |
188 | - } catch( \Exception $e ) { |
|
192 | + } |
|
193 | + catch( \Exception $e ) |
|
194 | + { |
|
189 | 195 | $siteid = null; |
190 | 196 | } |
191 | 197 | |
@@ -235,8 +241,7 @@ discard block |
||
235 | 241 | * @see madmin/log/manager/standard/count/ansi |
236 | 242 | */ |
237 | 243 | $path = 'madmin/log/manager/standard/insert'; |
238 | - } |
|
239 | - else |
|
244 | + } else |
|
240 | 245 | { |
241 | 246 | /** madmin/log/manager/standard/update/mysql |
242 | 247 | * Updates an existing log record in the database |
@@ -402,6 +402,7 @@ |
||
402 | 402 | * @param \Aimeos\MW\Criteria\Iface $search Search object containing the conditions |
403 | 403 | * @param array $ref List of domains to fetch list items and referenced items for |
404 | 404 | * @param integer &$total Number of items that are available in total |
405 | + * @param integer $total |
|
405 | 406 | * @return array List of jobs implementing \Aimeos\MAdmin\Job\Item\Iface |
406 | 407 | */ |
407 | 408 | public function searchItems( \Aimeos\MW\Criteria\Iface $search, array $ref = [], &$total = null ) |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | if( !isset( self::$managers[$id][$name] ) ) |
90 | 90 | { |
91 | - $factory = '\\Aimeos\\MAdmin\\' . ucwords( $name ) . '\\Manager\\Factory'; |
|
91 | + $factory = '\\Aimeos\\MAdmin\\'.ucwords( $name ).'\\Manager\\Factory'; |
|
92 | 92 | |
93 | 93 | if( class_exists( $factory ) === false ) { |
94 | 94 | throw new \Aimeos\MAdmin\Exception( sprintf( 'Class "%1$s" not available', $factory ) ); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | foreach( $parts as $part ) |
108 | 108 | { |
109 | - $tmpname = $name . '/' . $part; |
|
109 | + $tmpname = $name.'/'.$part; |
|
110 | 110 | |
111 | 111 | if( !isset( self::$managers[$id][$tmpname] ) ) { |
112 | 112 | self::$managers[$id][$tmpname] = self::$managers[$id][$name]->getSubManager( $part ); |