Skip to content

Commit

Permalink
refactor: Updated $scenarioEnabled variabled renamed to `$scenarios…
Browse files Browse the repository at this point in the history
…Enabled`
  • Loading branch information
aydinfatih committed Nov 20, 2023
1 parent 56f0660 commit eb91f56
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Definition/MachineDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class MachineDefinition
public ?StateDefinition $initialStateDefinition = null;

/** Indicates whether the scenario is enabled. */
public bool $scenarioEnabled = false;
public bool $scenariosEnabled = false;

// endregion

Expand All @@ -81,12 +81,12 @@ private function __construct(
public ?array $scenarios,
public string $delimiter = self::STATE_DELIMITER,
) {
$this->scenarioEnabled = isset($this->config['scenario_enabled']) && $this->config['scenario_enabled'] === true;
$this->scenariosEnabled = isset($this->config['scenarios_enabled']) && $this->config['scenarios_enabled'] === true;

$this->root = $this->createRootStateDefinition($config);

// Checks if the scenario is enabled, and if true, creates scenario state definitions.
if ($this->scenarioEnabled) {
if ($this->scenariosEnabled) {
$this->createScenarioStateDefinitions();
}

Expand Down Expand Up @@ -277,7 +277,7 @@ public function getInitialState(EventBehavior|array $event = null): ?State
*/
public function getScenarioStateIfAvailable(State $state, EventBehavior|array $eventBehavior = null): ?State
{
if ($this->scenarioEnabled === false) {
if ($this->scenariosEnabled === false) {
return $state;
}

Expand Down

0 comments on commit eb91f56

Please sign in to comment.