@@ -132,9 +132,9 @@ |
||
132 | 132 | && ( $count += substr_count( $pr, '\'' ) ) % 2 !== 0 ) |
133 | 133 | { |
134 | 134 | if( ( $part = next( $parts ) ) === false ) { |
135 | - throw new \Aimeos\MW\DB\Exception( 'Number of apostrophes don\'t match: ' . $sql ); |
|
135 | + throw new \Aimeos\MW\DB\Exception( 'Number of apostrophes don\'t match: '.$sql ); |
|
136 | 136 | } |
137 | - $temp .= '?' . $part; |
|
137 | + $temp .= '?'.$part; |
|
138 | 138 | } |
139 | 139 | $result[] = $temp; |
140 | 140 | } |
@@ -174,7 +174,7 @@ |
||
174 | 174 | * Reconnects to the database server if not in a transaction |
175 | 175 | * |
176 | 176 | * @param \Exception $e Exception to throw if a transaction is running |
177 | - * @return \Aimeos\MW\DB\Statement\Iface Object for method chaining |
|
177 | + * @return Base Object for method chaining |
|
178 | 178 | * @throws \Exception If a transaction is running |
179 | 179 | */ |
180 | 180 | protected function reconnect( \Exception $e ) |
@@ -335,7 +335,7 @@ |
||
335 | 335 | |
336 | 336 | public function testSearchItemsDefault() |
337 | 337 | { |
338 | - $search = $this->object->createSearch( true ); |
|
338 | + $search = $this->object->createSearch( true ); |
|
339 | 339 | $items = $this->object->searchItems( $search ); |
340 | 340 | |
341 | 341 | $this->assertEquals( 0, count( $items ) ); |
@@ -200,6 +200,7 @@ |
||
200 | 200 | * @param \Aimeos\MW\Criteria\Iface $search Search criteria object |
201 | 201 | * @param string[] $ref List of domains to fetch list items and referenced items for |
202 | 202 | * @param integer|null &$total Number of items that are available in total |
203 | + * @param integer $total |
|
203 | 204 | * @return array List of type items implementing \Aimeos\MShop\Common\Item\Type\Iface |
204 | 205 | */ |
205 | 206 | public function searchItems( \Aimeos\MW\Criteria\Iface $search, array $ref = [], &$total = null ) |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | public function createItem() |
62 | 62 | { |
63 | 63 | $values = array( |
64 | - $this->prefix . 'siteid' => $this->getContext()->getLocale()->getSiteId(), |
|
64 | + $this->prefix.'siteid' => $this->getContext()->getLocale()->getSiteId(), |
|
65 | 65 | ); |
66 | 66 | return $this->createItemBase( $values ); |
67 | 67 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $type = 'update'; |
118 | 118 | } |
119 | 119 | |
120 | - $stmt = $conn->create( $this->getSqlConfig( $this->getConfigPath() . $type ) ); |
|
120 | + $stmt = $conn->create( $this->getSqlConfig( $this->getConfigPath().$type ) ); |
|
121 | 121 | |
122 | 122 | $stmt->bind( 1, $item->getCode(), \Aimeos\MW\DB\Statement\Base::PARAM_STR ); |
123 | 123 | $stmt->bind( 2, $item->getDomain(), \Aimeos\MW\DB\Statement\Base::PARAM_STR ); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | if( $fetch === true ) |
139 | 139 | { |
140 | 140 | if( $id === null ) { |
141 | - $item->setId( $this->newId( $conn, $this->getConfigPath() . 'newid' ) ); |
|
141 | + $item->setId( $this->newId( $conn, $this->getConfigPath().'newid' ) ); |
|
142 | 142 | } else { |
143 | 143 | $item->setId( $id ); // modified false |
144 | 144 | } |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | */ |
164 | 164 | public function deleteItems( array $ids ) |
165 | 165 | { |
166 | - $this->deleteItemsBase( $ids, $this->getConfigPath() . 'delete' ); |
|
166 | + $this->deleteItemsBase( $ids, $this->getConfigPath().'delete' ); |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | |
@@ -180,8 +180,8 @@ discard block |
||
180 | 180 | public function findItem( $code, array $ref = [], $domain = 'product', $type = null, $default = false ) |
181 | 181 | { |
182 | 182 | $find = array( |
183 | - $this->prefix . 'code' => $code, |
|
184 | - $this->prefix . 'domain' => $domain, |
|
183 | + $this->prefix.'code' => $code, |
|
184 | + $this->prefix.'domain' => $domain, |
|
185 | 185 | ); |
186 | 186 | return $this->findItemBase( $find, $ref, $default ); |
187 | 187 | } |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | */ |
198 | 198 | public function getItem( $id, array $ref = [], $default = false ) |
199 | 199 | { |
200 | - return $this->getItemBase( $this->prefix . 'id', $id, $ref, $default ); |
|
200 | + return $this->getItemBase( $this->prefix.'id', $id, $ref, $default ); |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | |
@@ -226,13 +226,13 @@ discard block |
||
226 | 226 | } |
227 | 227 | |
228 | 228 | $level = \Aimeos\MShop\Locale\Manager\Base::SITE_ALL; |
229 | - $cfgPathSearch = $this->getConfigPath() . 'search'; |
|
230 | - $cfgPathCount = $this->getConfigPath() . 'count'; |
|
229 | + $cfgPathSearch = $this->getConfigPath().'search'; |
|
230 | + $cfgPathCount = $this->getConfigPath().'count'; |
|
231 | 231 | $required = array( trim( $this->prefix, '.' ) ); |
232 | 232 | |
233 | 233 | $results = $this->searchItemsBase( $conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level ); |
234 | 234 | while( ( $row = $results->fetch() ) !== false ) { |
235 | - $items[$row[$this->prefix . 'id']] = $this->createItemBase( $row ); |
|
235 | + $items[$row[$this->prefix.'id']] = $this->createItemBase( $row ); |
|
236 | 236 | } |
237 | 237 | |
238 | 238 | $dbm->release( $conn, $dbname ); |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | */ |
257 | 257 | public function getSubManager( $manager, $name = null ) |
258 | 258 | { |
259 | - return $this->getSubManagerBase( 'common', 'type/' . $manager, $name ); |
|
259 | + return $this->getSubManagerBase( 'common', 'type/'.$manager, $name ); |
|
260 | 260 | } |
261 | 261 | |
262 | 262 |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | { |
49 | 49 | if( !isset( self::$aimeos ) ) |
50 | 50 | { |
51 | - require_once dirname( dirname( dirname( __DIR__ ) ) ) . DIRECTORY_SEPARATOR . 'Bootstrap.php'; |
|
51 | + require_once dirname( dirname( dirname( __DIR__ ) ) ).DIRECTORY_SEPARATOR.'Bootstrap.php'; |
|
52 | 52 | |
53 | 53 | self::$aimeos = new \Aimeos\Bootstrap( [], false ); |
54 | 54 | } |
@@ -70,8 +70,8 @@ discard block |
||
70 | 70 | |
71 | 71 | |
72 | 72 | $paths = $aimeos->getConfigPaths(); |
73 | - $paths[] = __DIR__ . DIRECTORY_SEPARATOR . 'config'; |
|
74 | - $file = __DIR__ . DIRECTORY_SEPARATOR . 'confdoc.ser'; |
|
73 | + $paths[] = __DIR__.DIRECTORY_SEPARATOR.'config'; |
|
74 | + $file = __DIR__.DIRECTORY_SEPARATOR.'confdoc.ser'; |
|
75 | 75 | |
76 | 76 | $conf = new \Aimeos\MW\Config\PHPArray( [], $paths ); |
77 | 77 | $conf = new \Aimeos\MW\Config\Decorator\Memory( $conf ); |
@@ -56,11 +56,11 @@ discard block |
||
56 | 56 | { |
57 | 57 | if( ctype_alnum( $name ) === false ) |
58 | 58 | { |
59 | - $classname = is_string( $name ) ? $classprefix . $name : '<not a string>'; |
|
59 | + $classname = is_string( $name ) ? $classprefix.$name : '<not a string>'; |
|
60 | 60 | throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
61 | 61 | } |
62 | 62 | |
63 | - $classname = $classprefix . $name; |
|
63 | + $classname = $classprefix.$name; |
|
64 | 64 | |
65 | 65 | if( class_exists( $classname ) === false ) { |
66 | 66 | throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Class "%1$s" not available', $classname ) ); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * @category Developer |
120 | 120 | */ |
121 | 121 | $decorators = $config->get( 'controller/jobs/common/decorators/default', [] ); |
122 | - $excludes = $config->get( 'controller/jobs/' . $domain . '/decorators/excludes', [] ); |
|
122 | + $excludes = $config->get( 'controller/jobs/'.$domain.'/decorators/excludes', [] ); |
|
123 | 123 | |
124 | 124 | foreach( $decorators as $key => $name ) |
125 | 125 | { |
@@ -132,11 +132,11 @@ discard block |
||
132 | 132 | $controller = self::addDecorators( $context, $aimeos, $controller, $decorators, $classprefix ); |
133 | 133 | |
134 | 134 | $classprefix = '\\Aimeos\\Controller\\Jobs\\Common\\Decorator\\'; |
135 | - $decorators = $config->get( 'controller/jobs/' . $domain . '/decorators/global', [] ); |
|
135 | + $decorators = $config->get( 'controller/jobs/'.$domain.'/decorators/global', [] ); |
|
136 | 136 | $controller = self::addDecorators( $context, $aimeos, $controller, $decorators, $classprefix ); |
137 | 137 | |
138 | - $classprefix = '\\Aimeos\\Controller\\Jobs\\' . ucfirst( $localClass ) . '\\Decorator\\'; |
|
139 | - $decorators = $config->get( 'controller/jobs/' . $domain . '/decorators/local', [] ); |
|
138 | + $classprefix = '\\Aimeos\\Controller\\Jobs\\'.ucfirst( $localClass ).'\\Decorator\\'; |
|
139 | + $decorators = $config->get( 'controller/jobs/'.$domain.'/decorators/local', [] ); |
|
140 | 140 | $controller = self::addDecorators( $context, $aimeos, $controller, $decorators, $classprefix ); |
141 | 141 | |
142 | 142 | return $controller; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | { |
49 | 49 | if( !isset( self::$aimeos ) ) |
50 | 50 | { |
51 | - require_once dirname( dirname( dirname( __DIR__ ) ) ) . DIRECTORY_SEPARATOR . 'Bootstrap.php'; |
|
51 | + require_once dirname( dirname( dirname( __DIR__ ) ) ).DIRECTORY_SEPARATOR.'Bootstrap.php'; |
|
52 | 52 | |
53 | 53 | self::$aimeos = new \Aimeos\Bootstrap( [], false ); |
54 | 54 | } |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | |
82 | 82 | |
83 | 83 | $paths = $aimeos->getConfigPaths(); |
84 | - $paths[] = __DIR__ . DIRECTORY_SEPARATOR . 'config'; |
|
85 | - $file = __DIR__ . DIRECTORY_SEPARATOR . 'confdoc.ser'; |
|
84 | + $paths[] = __DIR__.DIRECTORY_SEPARATOR.'config'; |
|
85 | + $file = __DIR__.DIRECTORY_SEPARATOR.'confdoc.ser'; |
|
86 | 86 | |
87 | 87 | $conf = new \Aimeos\MW\Config\PHPArray( [], $paths ); |
88 | 88 | $conf = new \Aimeos\MW\Config\Decorator\Memory( $conf ); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $ctx->setConfig( $conf ); |
91 | 91 | |
92 | 92 | |
93 | - $logger = new \Aimeos\MW\Logger\File( $site . '.log', \Aimeos\MW\Logger\Base::DEBUG ); |
|
93 | + $logger = new \Aimeos\MW\Logger\File( $site.'.log', \Aimeos\MW\Logger\Base::DEBUG ); |
|
94 | 94 | $ctx->setLogger( $logger ); |
95 | 95 | |
96 | 96 |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public function __construct( $resourcepath, $format, array $options = [] ) |
43 | 43 | { |
44 | - $this->classname = '\\Aimeos\\MW\\Container\\Content\\' . $format; |
|
44 | + $this->classname = '\\Aimeos\\MW\\Container\\Content\\'.$format; |
|
45 | 45 | |
46 | 46 | if( class_exists( $this->classname ) === false ) { |
47 | 47 | throw new \Aimeos\MW\Container\Exception( sprintf( 'Unknown format "%1$s"', $format ) ); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | } |
106 | 106 | |
107 | 107 | // $this->container->getStream( $name ) doesn't work correctly because the stream can't be rewinded |
108 | - return new $this->classname( 'zip://' . $this->resourcepath . '#' . $name, $name, $this->getOptions() ); |
|
108 | + return new $this->classname( 'zip://'.$this->resourcepath.'#'.$name, $name, $this->getOptions() ); |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | } |
150 | 150 | |
151 | 151 | // $this->container->getStream( $name ) doesn't work correctly because the stream can't be rewinded |
152 | - return new $this->classname( 'zip://' . $this->resourcepath . '#' . $name, $name, $this->getOptions() ); |
|
152 | + return new $this->classname( 'zip://'.$this->resourcepath.'#'.$name, $name, $this->getOptions() ); |
|
153 | 153 | } |
154 | 154 | |
155 | 155 |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public function __construct( $resourcepath, $format, array $options = [] ) |
40 | 40 | { |
41 | - $this->classname = '\\Aimeos\\MW\\Container\\Content\\' . $format; |
|
41 | + $this->classname = '\\Aimeos\\MW\\Container\\Content\\'.$format; |
|
42 | 42 | |
43 | 43 | if( class_exists( $this->classname ) === false ) { |
44 | 44 | throw new \Aimeos\MW\Container\Exception( sprintf( 'Unknown format "%1$s"', $format ) ); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | */ |
65 | 65 | public function create( $name ) |
66 | 66 | { |
67 | - $resource = $this->resource->getPath() . DIRECTORY_SEPARATOR . $name; |
|
67 | + $resource = $this->resource->getPath().DIRECTORY_SEPARATOR.$name; |
|
68 | 68 | return new $this->classname( $resource, $name, $this->getOptions() ); |
69 | 69 | } |
70 | 70 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function get( $name ) |
90 | 90 | { |
91 | - return new $this->classname( $this->resource->getPath() . DIRECTORY_SEPARATOR . $name, $name, $this->getOptions() ); |
|
91 | + return new $this->classname( $this->resource->getPath().DIRECTORY_SEPARATOR.$name, $name, $this->getOptions() ); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | public function getMarkerNames() |
118 | 118 | { |
119 | 119 | $matches = []; |
120 | - $regex = '/' . str_replace( '\$', '(.*)', preg_quote( $this->begin, '/' ) ) . '/U'; |
|
120 | + $regex = '/'.str_replace( '\$', '(.*)', preg_quote( $this->begin, '/' ) ).'/U'; |
|
121 | 121 | |
122 | 122 | if( preg_match_all( $regex, $this->text, $matches ) === false ) { |
123 | 123 | throw new \Aimeos\MW\Template\Exception( sprintf( 'Invalid regular expression: %1$s', $regex ) ); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $matches = []; |
187 | 187 | $text = $this->text; |
188 | 188 | |
189 | - $regex = '/' . str_replace( '\$', '(.*)', preg_quote( $this->begin, '/' ) ) . '/U'; |
|
189 | + $regex = '/'.str_replace( '\$', '(.*)', preg_quote( $this->begin, '/' ) ).'/U'; |
|
190 | 190 | if( preg_match_all( $regex, $text, $matches ) === false ) { |
191 | 191 | throw new \Aimeos\MW\Template\Exception( sprintf( 'Invalid regular expression: %1$s', $regex ) ); |
192 | 192 | } |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | $begin = str_replace( '\$', $match, preg_quote( $this->begin, '/' ) ); |
198 | 198 | $end = str_replace( '\$', $match, preg_quote( $this->end, '/' ) ); |
199 | 199 | |
200 | - $regex = '/' . $begin . '.*' . $end . '/smU'; |
|
200 | + $regex = '/'.$begin.'.*'.$end.'/smU'; |
|
201 | 201 | if( ( $text = preg_replace( $regex, '', $text ) ) === null ) { |
202 | 202 | throw new \Aimeos\MW\Template\Exception( sprintf( 'Invalid regular expression: %1$s', $regex ) ); |
203 | 203 | } |