for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of Cecil.
*
* (c) Arnaud Ligny <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Cecil\Step;
use Cecil\Builder;
use Cecil\Config;
* Abstract step class.
* This class provides a base implementation for steps in the build process.
* It implements the StepInterface and provides common functionality such as
* initialization, checking if the step can be processed, and a constructor
* that accepts a Builder instance.
abstract class AbstractStep implements StepInterface
{
/** @var Builder */
protected $builder;
/** @var Config */
protected $config;
* Configuration options for the step.
* @var Builder::OPTIONS
protected $options;
/** @var bool */
protected $canProcess = false;
* {@inheritdoc}
public function __construct(Builder $builder)
$this->builder = $builder;
$this->config = $builder->getConfig();
}
public function init(array $options): void
$this->options = $options;
$options
array
Cecil\Builder
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..
$this->canProcess = true;
* If init() is used, true by default.
public function canProcess(): bool
return $this->canProcess;
abstract public function process(): void;
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..