Toolkit

Runner
in package
Uses ConfigAwareTrait

Toolkit Runner.

Tags
SuppressWarnings

(PHPMD.CouplingBetweenObjects)

Table of Contents

APPLICATION_NAME  = 'Toolkit Runner'
CONFIG_DIR_KEY  = 'runner.config_dir'
REPOSITORY  = 'ec-europa/toolkit'
$application  : Application
The Robo Application.
$classLoader  : ClassLoader
The autoloader class.
$container  : Container|ContainerInterface|null
The container.
$input  : InputInterface
The input.
$output  : OutputInterface
The output.
$overrides  : array<string|int, string>
Configurations that can be replaced by a project.
$runner  : Runner
The Robo Runner.
$workingDir  : mixed
The current working directory.
__construct()  : mixed
Initialize the Toolkit Runner.
run()  : int
Execute the Runner.
getConfigDirFilesPaths()  : array<string|int, string>
Get runner config directory files.
getCurrentConfig()  : ConfigInterface|null
Get current configurations.
getWorkingDir()  : string
Returns the current working directory.
loadConfigurationFromDirFiles()  : void
Load configuration from dir files.
prepareApplication()  : $this
Create and prepare the Application.
prepareConfigurations()  : $this
Create the configurations and process overrides.
prepareContainer()  : $this
Prepare the container with the configurations.
prepareRunner()  : $this
Create and configure the Robo runner.
registerConfigurationCommands()  : mixed
Register commands in the runner.yml under 'commands:'.

Constants

APPLICATION_NAME

public mixed APPLICATION_NAME = 'Toolkit Runner'

CONFIG_DIR_KEY

public mixed CONFIG_DIR_KEY = 'runner.config_dir'

REPOSITORY

public mixed REPOSITORY = 'ec-europa/toolkit'

Properties

$application

The Robo Application.

private Application $application

$classLoader

The autoloader class.

private ClassLoader $classLoader

$container

The container.

private Container|ContainerInterface|null $container

$input

The input.

private InputInterface $input

$output

The output.

private OutputInterface $output

$overrides

Configurations that can be replaced by a project.

private array<string|int, string> $overrides = ['toolkit.build.dist.keep', 'toolkit.test.phpcs.standards', 'toolkit.test.phpcs.ignore_patterns', 'toolkit.test.phpcs.triggered_by', 'toolkit.test.phpcs.files', 'toolkit.test.phpmd.ignore_patterns', 'toolkit.test.phpmd.triggered_by', 'toolkit.test.phpmd.files', 'toolkit.test.phpstan.files', 'toolkit.test.phpstan.ignores', 'toolkit.lint.eslint.ignores', 'toolkit.lint.eslint.extensions_yaml', 'toolkit.lint.eslint.extensions_js', 'toolkit.lint.php.extensions', 'toolkit.lint.php.exclude', 'toolkit.hooks.active', 'toolkit.hooks.prepare-commit-msg.conditions', 'toolkit.hooks.pre-push.commands', 'symlink_project.ignore']

$runner

The Robo Runner.

private Runner $runner

$workingDir

The current working directory.

private mixed $workingDir

Methods

__construct()

Initialize the Toolkit Runner.

public __construct(ClassLoader $classLoader, InputInterface $input, OutputInterface $output) : mixed
Parameters
$classLoader : ClassLoader

The autoload file.

$input : InputInterface

The input from CLI arguments.

$output : OutputInterface

The CLI output.

Return values
mixed

run()

Execute the Runner.

public run() : int
Return values
int

The status code.

getConfigDirFilesPaths()

Get runner config directory files.

private getConfigDirFilesPaths(string $runnerConfigDir) : array<string|int, string>
Parameters
$runnerConfigDir : string
Return values
array<string|int, string>

getCurrentConfig()

Get current configurations.

private getCurrentConfig(string $workingDir, ConfigInterface $defaultConfig) : ConfigInterface|null
Parameters
$workingDir : string
$defaultConfig : ConfigInterface
Return values
ConfigInterface|null

getWorkingDir()

Returns the current working directory.

private getWorkingDir() : string
Return values
string

loadConfigurationFromDirFiles()

Load configuration from dir files.

private loadConfigurationFromDirFiles(ConfigInterface $config[, bool $isToolkitRoot = true ][, string|null $fallbackConfigDir = null ]) : void
Parameters
$config : ConfigInterface
$isToolkitRoot : bool = true
$fallbackConfigDir : string|null = null
Return values
void

prepareApplication()

Create and prepare the Application.

private prepareApplication() : $this
Return values
$this

prepareConfigurations()

Create the configurations and process overrides.

private prepareConfigurations() : $this
Return values
$this

prepareContainer()

Prepare the container with the configurations.

private prepareContainer() : $this
Return values
$this

prepareRunner()

Create and configure the Robo runner.

private prepareRunner() : $this
Return values
$this

registerConfigurationCommands()

Register commands in the runner.yml under 'commands:'.

private registerConfigurationCommands() : mixed
Tags
SuppressWarnings

(PHPMD.CyclomaticComplexity)

SuppressWarnings

(PHPMD.NPathComplexity)

Return values
mixed

Search results