InstallerScripts   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 6
c 2
b 0
f 0
dl 0
loc 17
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A postUpdateAndInstall() 0 10 2
1
<?php
2
3
/**
4
 * @license LGPLv3, http://www.gnu.org/copyleft/lgpl.html
5
 * @copyright Aimeos (aimeos.org), 2014
6
 * @package flow
7
 */
8
9
10
namespace Aimeos\Shop\Composer;
11
12
use Composer\Script\CommandEvent;
13
14
15
/**
16
 * Class for Composer install scripts
17
 * @package flow
18
 */
19
class InstallerScripts
20
{
21
	/**
22
	 * Post composer install or update tasks
23
	 *
24
	 * @param \Composer\Script\CommandEvent $event
0 ignored issues
show
Bug introduced by
The type Composer\Script\CommandEvent was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
25
	 */
26
	public static function postUpdateAndInstall( CommandEvent $event )
27
	{
28
		$options = array();
29
30
		if( $event->isDevMode() ) {
31
			$options['options'] = 'setup/default/demo:1';
32
		}
33
34
		\Neos\Flow\Core\Booting\Scripts::executeCommand( 'aimeos.shop:aimeos:setup', array(), true, $options );
35
		\Neos\Flow\Core\Booting\Scripts::executeCommand( 'aimeos.shop:aimeos:cache', array() );
36
	}
37
}
38