Passed
Push — master ( bada6f...d61b94 )
by Aimeos
04:42
created

IndexRebuildPerf::after()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
nc 1
nop 0
dl 0
loc 3
c 0
b 0
f 0
cc 1
rs 10
1
<?php
2
3
/**
4
 * @license LGPLv3, https://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2015-2021
6
 */
7
8
9
namespace Aimeos\Upscheme\Task;
10
11
12
/**
13
 * Rebuilds the index.
14
 */
15
class IndexRebuildPerf extends Base
16
{
17
	/**
18
	 * Returns the list of task names which this task depends on.
19
	 *
20
	 * @return string[] List of task names
21
	 */
22
	public function after() : array
23
	{
24
		return ['MShopSetLocale'];
25
	}
26
27
28
	/**
29
	 * Rebuilds the index.
30
	 */
31
	public function up()
32
	{
33
		$this->info( 'Rebuilding index for performance data', 'v' );
34
35
		\Aimeos\MShop::create( $this->context(), 'index' )->rebuild();
0 ignored issues
show
Bug introduced by
The method context() does not exist on Aimeos\Upscheme\Task\IndexRebuildPerf. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

35
		\Aimeos\MShop::create( $this->/** @scrutinizer ignore-call */ context(), 'index' )->rebuild();
Loading history...
36
	}
37
}
38