@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function getName() |
30 | 30 | { |
31 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Product site map' ); |
|
31 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Product site map'); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function getDescription() |
41 | 41 | { |
42 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Creates a product site map for search engines' ); |
|
42 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Creates a product site map for search engines'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | { |
53 | 53 | $container = $this->createContainer(); |
54 | 54 | |
55 | - $files = $this->export( $container ); |
|
56 | - $this->createSitemapIndex( $container, $files ); |
|
55 | + $files = $this->export($container); |
|
56 | + $this->createSitemapIndex($container, $files); |
|
57 | 57 | |
58 | 58 | $container->close(); |
59 | 59 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * @param \Aimeos\MW\Container\Content\Iface $content File content object |
66 | 66 | * @param \Aimeos\MShop\Product\Item\Iface[] $items List of product items |
67 | 67 | */ |
68 | - protected function addItems( \Aimeos\MW\Container\Content\Iface $content, array $items ) |
|
68 | + protected function addItems(\Aimeos\MW\Container\Content\Iface $content, array $items) |
|
69 | 69 | { |
70 | 70 | $config = $this->getContext()->getConfig(); |
71 | 71 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * @see controller/jobs/product/export/sitemap/max-items |
97 | 97 | * @see controller/jobs/product/export/sitemap/max-query |
98 | 98 | */ |
99 | - $changefreq = $config->get( 'controller/jobs/product/export/sitemap/changefreq', 'daily' ); |
|
99 | + $changefreq = $config->get('controller/jobs/product/export/sitemap/changefreq', 'daily'); |
|
100 | 100 | |
101 | 101 | /** controller/jobs/product/export/sitemap/standard/template-items |
102 | 102 | * Relative path to the XML items template of the product site map job controller. |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $view->siteItems = $items; |
130 | 130 | $view->siteFreq = $changefreq; |
131 | 131 | |
132 | - $content->add( $view->render( $context->getConfig()->get( $tplconf, $default ) ) ); |
|
132 | + $content->add($view->render($context->getConfig()->get($tplconf, $default))); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | * @see controller/jobs/product/export/sitemap/max-query |
176 | 176 | * @see controller/jobs/product/export/sitemap/changefreq |
177 | 177 | */ |
178 | - $location = $config->get( 'controller/jobs/product/export/sitemap/location', sys_get_temp_dir() ); |
|
178 | + $location = $config->get('controller/jobs/product/export/sitemap/location', sys_get_temp_dir()); |
|
179 | 179 | |
180 | 180 | /** controller/jobs/product/export/sitemap/container/options |
181 | 181 | * List of file container options for the site map files |
@@ -196,10 +196,10 @@ discard block |
||
196 | 196 | * @see controller/jobs/product/export/sitemap/max-query |
197 | 197 | * @see controller/jobs/product/export/sitemap/changefreq |
198 | 198 | */ |
199 | - $default = array( 'gzip-mode' => 'wb' ); |
|
200 | - $options = $config->get( 'controller/jobs/product/export/sitemap/container/options', $default ); |
|
199 | + $default = array('gzip-mode' => 'wb'); |
|
200 | + $options = $config->get('controller/jobs/product/export/sitemap/container/options', $default); |
|
201 | 201 | |
202 | - return \Aimeos\MW\Container\Factory::getContainer( $location, 'Directory', 'Gzip', $options ); |
|
202 | + return \Aimeos\MW\Container\Factory::getContainer($location, 'Directory', 'Gzip', $options); |
|
203 | 203 | } |
204 | 204 | |
205 | 205 | |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | * @param integer $filenum New file number |
211 | 211 | * @return \Aimeos\MW\Container\Content\Iface New content object |
212 | 212 | */ |
213 | - protected function createContent( \Aimeos\MW\Container\Iface $container, $filenum ) |
|
213 | + protected function createContent(\Aimeos\MW\Container\Iface $container, $filenum) |
|
214 | 214 | { |
215 | 215 | /** controller/jobs/product/export/sitemap/standard/template-header |
216 | 216 | * Relative path to the XML site map header template of the product site map job controller. |
@@ -240,9 +240,9 @@ discard block |
||
240 | 240 | $context = $this->getContext(); |
241 | 241 | $view = $context->getView(); |
242 | 242 | |
243 | - $content = $container->create( $this->getFilename( $filenum ) ); |
|
244 | - $content->add( $view->render( $context->getConfig()->get( $tplconf, $default ) ) ); |
|
245 | - $container->add( $content ); |
|
243 | + $content = $container->create($this->getFilename($filenum)); |
|
244 | + $content->add($view->render($context->getConfig()->get($tplconf, $default))); |
|
245 | + $container->add($content); |
|
246 | 246 | |
247 | 247 | return $content; |
248 | 248 | } |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | * |
254 | 254 | * @param \Aimeos\MW\Container\Content\Iface $content |
255 | 255 | */ |
256 | - protected function closeContent( \Aimeos\MW\Container\Content\Iface $content ) |
|
256 | + protected function closeContent(\Aimeos\MW\Container\Content\Iface $content) |
|
257 | 257 | { |
258 | 258 | /** controller/jobs/product/export/sitemap/standard/template-footer |
259 | 259 | * Relative path to the XML site map footer template of the product site map job controller. |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | $context = $this->getContext(); |
284 | 284 | $view = $context->getView(); |
285 | 285 | |
286 | - $content->add( $view->render( $context->getConfig()->get( $tplconf, $default ) ) ); |
|
286 | + $content->add($view->render($context->getConfig()->get($tplconf, $default))); |
|
287 | 287 | } |
288 | 288 | |
289 | 289 | |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | * @param \Aimeos\MW\Container\Iface $container File container object |
294 | 294 | * @param array $files List of generated site map file names |
295 | 295 | */ |
296 | - protected function createSitemapIndex( \Aimeos\MW\Container\Iface $container, array $files ) |
|
296 | + protected function createSitemapIndex(\Aimeos\MW\Container\Iface $container, array $files) |
|
297 | 297 | { |
298 | 298 | /** controller/jobs/product/export/sitemap/standard/template-index |
299 | 299 | * Relative path to the XML site map index template of the product site map job controller. |
@@ -325,9 +325,9 @@ discard block |
||
325 | 325 | |
326 | 326 | $view->siteFiles = $files; |
327 | 327 | |
328 | - $content = $container->create( 'aimeos-sitemap-index.xml' ); |
|
329 | - $content->add( $view->render( $context->getConfig()->get( $tplconf, $default ) ) ); |
|
330 | - $container->add( $content ); |
|
328 | + $content = $container->create('aimeos-sitemap-index.xml'); |
|
329 | + $content->add($view->render($context->getConfig()->get($tplconf, $default))); |
|
330 | + $container->add($content); |
|
331 | 331 | } |
332 | 332 | |
333 | 333 | |
@@ -338,11 +338,11 @@ discard block |
||
338 | 338 | * @param mixed $default Default value if name is unknown |
339 | 339 | * @return mixed Configuration value |
340 | 340 | */ |
341 | - protected function getConfig( $name, $default = null ) |
|
341 | + protected function getConfig($name, $default = null) |
|
342 | 342 | { |
343 | 343 | $config = $this->getContext()->getConfig(); |
344 | 344 | |
345 | - switch( $name ) |
|
345 | + switch ($name) |
|
346 | 346 | { |
347 | 347 | case 'domain': |
348 | 348 | return []; |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | * @see controller/jobs/product/export/sitemap/max-query |
370 | 370 | * @see controller/jobs/product/export/sitemap/changefreq |
371 | 371 | */ |
372 | - return $config->get( 'controller/jobs/product/export/sitemap/max-items', 50000 ); |
|
372 | + return $config->get('controller/jobs/product/export/sitemap/max-items', 50000); |
|
373 | 373 | |
374 | 374 | case 'max-query': |
375 | 375 | /** controller/jobs/product/export/sitemap/max-query |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | * @see controller/jobs/product/export/sitemap/max-items |
390 | 390 | * @see controller/jobs/product/export/sitemap/changefreq |
391 | 391 | */ |
392 | - return $config->get( 'controller/jobs/product/export/sitemap/max-query', 1000 ); |
|
392 | + return $config->get('controller/jobs/product/export/sitemap/max-query', 1000); |
|
393 | 393 | } |
394 | 394 | |
395 | 395 | return $default; |
@@ -402,8 +402,8 @@ discard block |
||
402 | 402 | * @param integer $number Current file number |
403 | 403 | * @return string New file name |
404 | 404 | */ |
405 | - protected function getFilename( $number ) |
|
405 | + protected function getFilename($number) |
|
406 | 406 | { |
407 | - return sprintf( 'aimeos-sitemap-%d.xml', $number ); |
|
407 | + return sprintf('aimeos-sitemap-%d.xml', $number); |
|
408 | 408 | } |
409 | 409 | } |