From 52ebbdaa6f8e724531cc7a476223780a067f42c5 Mon Sep 17 00:00:00 2001 From: YunusEmreNalbant Date: Mon, 22 Jan 2024 09:24:39 +0000 Subject: [PATCH] chore: Fix styling --- src/Actor/Machine.php | 23 ++++----- src/Actor/State.php | 20 ++++---- src/Behavior/EventBehavior.php | 10 ++-- src/Behavior/InvokableBehavior.php | 22 ++++---- src/ContextManager.php | 24 ++++----- src/Definition/MachineDefinition.php | 50 +++++++++---------- src/Definition/StateDefinition.php | 8 +-- src/Definition/TransitionBranch.php | 6 +-- src/Definition/TransitionDefinition.php | 10 ++-- src/Enums/InternalEvent.php | 4 +- .../InvalidFinalStateDefinitionException.php | 4 +- .../MissingMachineContextException.php | 2 +- .../NoTransitionDefinitionFoundException.php | 4 +- src/Exceptions/RestoringStateException.php | 2 +- src/MachineServiceProvider.php | 2 +- src/Models/MachineEvent.php | 2 +- src/Transformers/ModelTransformer.php | 4 +- 17 files changed, 98 insertions(+), 99 deletions(-) diff --git a/src/Actor/Machine.php b/src/Actor/Machine.php index f3315dc7..ca69194e 100644 --- a/src/Actor/Machine.php +++ b/src/Actor/Machine.php @@ -47,7 +47,7 @@ class Machine implements Castable, JsonSerializable, Stringable * It takes a `MachineDefinition` object as a parameter and * assigns it to the `$definition` property of the instance. * - * @param MachineDefinition $definition The machine definition object. + * @param MachineDefinition $definition The machine definition object. */ protected function __construct( MachineDefinition $definition, @@ -62,7 +62,7 @@ protected function __construct( * `MachineDefinition`. It returns a new instance of the `Machine` class, * encapsulating the provided definition. * - * @param MachineDefinition $definition The definition to initialize the machine with. + * @param MachineDefinition $definition The definition to initialize the machine with. * * @return self The newly created machine instance. */ @@ -101,8 +101,8 @@ public static function definition(): ?MachineDefinition * provided definition and state. If the definition is `null`, it attempts * to retrieve the definition using the `definition()` method. * - * @param \Tarfinlabs\EventMachine\Definition\MachineDefinition|array|null $definition The definition to initialize the machine with. - * @param \Tarfinlabs\EventMachine\Actor\State|string|null $state The initial state of the machine. + * @param \Tarfinlabs\EventMachine\Definition\MachineDefinition|array|null $definition The definition to initialize the machine with. + * @param \Tarfinlabs\EventMachine\Actor\State|string|null $state The initial state of the machine. * * @return self The newly created and initialized machine instance. */ @@ -131,7 +131,7 @@ public static function create( * it uses the machine's initial state. If a string is provided, it restores * the state using the `restoreStateFromRootEventId()` method. * - * @param \Tarfinlabs\EventMachine\Actor\State|string|null $state The initial state or root event identifier. + * @param \Tarfinlabs\EventMachine\Actor\State|string|null $state The initial state or root event identifier. * * @return self The started machine instance. */ @@ -153,8 +153,7 @@ public function start(State|string|null $state = null): self * updates the machine's state and handles validation guards. If the event * should be persisted, it calls the `persist()` method. * - * @param \Tarfinlabs\EventMachine\Behavior\EventBehavior|array|string $event The event to send to the machine. - * @param bool $shouldPersist Whether to persist the state change. + * @param \Tarfinlabs\EventMachine\Behavior\EventBehavior|array|string $event The event to send to the machine. * * @return State The updated state of the machine. * @@ -264,7 +263,7 @@ public function persist(): ?State * identifier. It reconstructs the state of the machine from the queried * events and returns the restored state. * - * @param string $key The root event identifier to restore state from. + * @param string $key The root event identifier to restore state from. * * @return State The restored state of the machine. * @@ -298,7 +297,7 @@ public function restoreStateFromRootEventId(string $key): State * context data. It utilizes the behavior configuration of the machine's * definition or defaults to the `ContextManager` class. * - * @param array $persistedContext The persisted context data. + * @param array $persistedContext The persisted context data. * * @return ContextManager The restored context manager instance. */ @@ -320,7 +319,7 @@ protected function restoreContext(array $persistedContext): ContextManager * This method retrieves the current state definition from the machine's * definition ID map using the provided machine value. * - * @param array $machineValue The machine value containing the ID of the state definition. + * @param array $machineValue The machine value containing the ID of the state definition. * * @return StateDefinition The restored current state definition. */ @@ -336,7 +335,7 @@ protected function restoreCurrentStateDefinition(array $machineValue): StateDefi * MachineEvent. It determines the source type and constructs the EventBehavior * object accordingly. * - * @param MachineEvent $machineEvent The MachineEvent object representing the event. + * @param MachineEvent $machineEvent The MachineEvent object representing the event. * * @return EventBehavior The restored EventBehavior object. */ @@ -379,7 +378,7 @@ protected function restoreCurrentEventBehavior(MachineEvent $machineEvent): Even * failures. If any guard fails, it constructs and throws a * `MachineValidationException` with detailed error messages. * - * @param int $lastPreviousEventNumber The last previous event sequence number. + * @param int $lastPreviousEventNumber The last previous event sequence number. * * @throws MachineValidationException If any validation guards fail. */ diff --git a/src/Actor/State.php b/src/Actor/State.php index b0bde697..14690e87 100644 --- a/src/Actor/State.php +++ b/src/Actor/State.php @@ -33,10 +33,10 @@ class State /** * Constructs a new instance of the class. * - * @param ContextManager $context The context manager instance. - * @param StateDefinition|null $currentStateDefinition The current state definition, or null if not set. - * @param EventBehavior|null $currentEventBehavior The current event behavior, or null if not set. - * @param Collection|null $history The history collection, or null if not set. + * @param ContextManager $context The context manager instance. + * @param StateDefinition|null $currentStateDefinition The current state definition, or null if not set. + * @param EventBehavior|null $currentEventBehavior The current event behavior, or null if not set. + * @param Collection|null $history The history collection, or null if not set. */ public function __construct( public ContextManager $context, @@ -60,7 +60,7 @@ protected function updateMachineValueFromState(): void /** * Sets the current state definition for the machine. * - * @param StateDefinition $stateDefinition The state definition to set. + * @param StateDefinition $stateDefinition The state definition to set. * * @return self The current object instance. */ @@ -75,9 +75,9 @@ public function setCurrentStateDefinition(StateDefinition $stateDefinition): sel /** * Sets the internal event behavior for the machine. * - * @param InternalEvent $type The internal event type. - * @param string|null $placeholder The optional placeholder parameter. - * @param array|null $payload The optional payload array. + * @param InternalEvent $type The internal event type. + * @param string|null $placeholder The optional placeholder parameter. + * @param array|null $payload The optional payload array. * * @return self The current object instance. */ @@ -102,7 +102,7 @@ public function setInternalEventBehavior( /** * Sets the current event behavior for the machine. * - * @param EventBehavior $currentEventBehavior The event behavior to set. + * @param EventBehavior $currentEventBehavior The event behavior to set. * * @return self The current object instance. */ @@ -142,7 +142,7 @@ public function setCurrentEventBehavior(EventBehavior $currentEventBehavior, boo /** * Checks if the given value matches the current state's value. * - * @param string $value The value to be checked. + * @param string $value The value to be checked. * * @return bool Returns true if the value matches the current state's value; otherwise, returns false. */ diff --git a/src/Behavior/EventBehavior.php b/src/Behavior/EventBehavior.php index dae38587..cfa8fc83 100644 --- a/src/Behavior/EventBehavior.php +++ b/src/Behavior/EventBehavior.php @@ -27,11 +27,11 @@ abstract class EventBehavior extends Data /** * Creates a new instance of the class. * - * @param null|string|Optional $type The type of the object. Default is null. - * @param null|array|Optional $payload The payload to be associated with the object. Default is null. - * @param mixed $actor Actor performing the event. Default is null. - * @param int|Optional $version The version number of the object. Default is 1. - * @param SourceType $source The source type of the object. Default is SourceType::EXTERNAL. + * @param null|string|Optional $type The type of the object. Default is null. + * @param null|array|Optional $payload The payload to be associated with the object. Default is null. + * @param mixed $actor Actor performing the event. Default is null. + * @param int|Optional $version The version number of the object. Default is 1. + * @param SourceType $source The source type of the object. Default is SourceType::EXTERNAL. * * @return void */ diff --git a/src/Behavior/InvokableBehavior.php b/src/Behavior/InvokableBehavior.php index 3f165efc..6d923fc4 100644 --- a/src/Behavior/InvokableBehavior.php +++ b/src/Behavior/InvokableBehavior.php @@ -30,7 +30,7 @@ abstract class InvokableBehavior /** * Constructs a new instance of the class. * - * @param Collection|null $eventQueue The event queue collection. Default is null. + * @param Collection|null $eventQueue The event queue collection. Default is null. * * @return void */ @@ -44,7 +44,7 @@ public function __construct(protected ?Collection $eventQueue = null) /** * Raises an event by adding it to the event queue. * - * @param \Tarfinlabs\EventMachine\Behavior\EventBehavior|array $eventBehavior The event definition object to be raised. + * @param \Tarfinlabs\EventMachine\Behavior\EventBehavior|array $eventBehavior The event definition object to be raised. */ public function raise(EventBehavior|array $eventBehavior): void { @@ -58,10 +58,10 @@ public function raise(EventBehavior|array $eventBehavior): void * "$requiredContext" property are present in the given context. It returns * the key of the first missing attribute if any, otherwise it returns null. * - * @param ContextManager $context The context to be checked. + * @param ContextManager $context The context to be checked. * - * @return string|null The key of the first missing attribute, or null if all - * required attributes are present. + * @return string|null The key of the first missing attribute, or null if all + * required attributes are present. */ public function hasMissingContext(ContextManager $context): ?string { @@ -91,7 +91,7 @@ public function hasMissingContext(ContextManager $context): ?string * in the given ContextManager instance. If any required context property is missing, * it throws a MissingMachineContextException. * - * @param ContextManager $context The context to be validated. + * @param ContextManager $context The context to be validated. */ public function validateRequiredContext(ContextManager $context): void { @@ -125,12 +125,12 @@ public static function getType(): string * based on the provided state, event behavior, and action arguments. * The injected values are added to an array and returned. * - * @param callable $actionBehavior The invokable behavior to inject parameters for. - * @param State $state The state object used for parameter matching. - * @param EventBehavior|null $eventBehavior The event behavior used for parameter matching. (Optional) - * @param array|null $actionArguments The action arguments used for parameter matching. (Optional) + * @param callable $actionBehavior The invokable behavior to inject parameters for. + * @param State $state The state object used for parameter matching. + * @param EventBehavior|null $eventBehavior The event behavior used for parameter matching. (Optional) + * @param array|null $actionArguments The action arguments used for parameter matching. (Optional) * - * @return array The injected invokable behavior parameters. + * @return array The injected invokable behavior parameters. * * @throws \ReflectionException */ diff --git a/src/ContextManager.php b/src/ContextManager.php index fd9122a9..1d659724 100644 --- a/src/ContextManager.php +++ b/src/ContextManager.php @@ -34,7 +34,7 @@ public function __construct( /** * Get a value from the context by its key. * - * @param string $key The key of the value to retrieve. + * @param string $key The key of the value to retrieve. * * @return mixed The value associated with the given key, or null if the key does not exist. */ @@ -55,8 +55,8 @@ public function get(string $key): mixed * subclass of the class of the object, the value is set as * a property of the object. * - * @param string $key The key for which to set the value. - * @param mixed $value The value to set for the given key. + * @param string $key The key for which to set the value. + * @param mixed $value The value to set for the given key. */ public function set(string $key, mixed $value): mixed { @@ -82,10 +82,10 @@ public function set(string $key, mixed $value): mixed * * @param string $key The key to check for existence. * @param string|null $type The type to check for the value. If null, - * only existence is checked. + * only existence is checked. * - * @return bool True if the key exists and (if a type is specified) - * its value is of the given type. False otherwise. + * @return bool True if the key exists and (if a type is specified) + * its value is of the given type. False otherwise. */ public function has(string $key, ?string $type = null): bool { @@ -107,7 +107,7 @@ public function has(string $key, ?string $type = null): bool /** * Remove a key-value pair from the context by its key. * - * @param string $key The key to remove from the context. + * @param string $key The key to remove from the context. */ public function remove(string $key): void { @@ -137,7 +137,7 @@ public function selfValidate(): void * static from() method and returns it. * If validation fails, it throws a MachineContextValidationException. * - * @param array|Arrayable $payload The payload to be validated and created from. + * @param array|Arrayable $payload The payload to be validated and created from. * * @return static A new instance of the class created from the payload. */ @@ -157,8 +157,8 @@ public static function validateAndCreate(array|Arrayable $payload): static /** * Set a value in the context by its name. * - * @param string $name The name of the value to set. - * @param mixed $value The value to set. + * @param string $name The name of the value to set. + * @param mixed $value The value to set. */ public function __set(string $name, mixed $value): void { @@ -168,7 +168,7 @@ public function __set(string $name, mixed $value): void /** * Magic method to dynamically retrieve a value from the context by its key. * - * @param string $name The key of the value to retrieve. + * @param string $name The key of the value to retrieve. * * @return mixed The value associated with the given key, or null if the key does not exist. */ @@ -180,7 +180,7 @@ public function __get(string $name): mixed /** * Checks if a property is set on the object. * - * @param string $name The name of the property to check. + * @param string $name The name of the property to check. * * @return bool True if the property exists and is set, false otherwise. */ diff --git a/src/Definition/MachineDefinition.php b/src/Definition/MachineDefinition.php index 2395ec58..bb88c096 100644 --- a/src/Definition/MachineDefinition.php +++ b/src/Definition/MachineDefinition.php @@ -70,10 +70,10 @@ class MachineDefinition /** * Create a new machine definition with the given arguments. * - * @param array|null $config The raw configuration array used to create the machine definition. - * @param array|null $behavior The implementation of the machine behavior that defined in the machine definition. - * @param string $id The id of the machine. - * @param string|null $version The version of the machine. + * @param array|null $config The raw configuration array used to create the machine definition. + * @param array|null $behavior The implementation of the machine behavior that defined in the machine definition. + * @param string $id The id of the machine. + * @param string|null $version The version of the machine. * @param string $delimiter The string delimiter for serializing the path to a string. */ private function __construct( @@ -116,8 +116,8 @@ private function __construct( /** * Define a new machine with the given configuration and behavior. * - * @param ?array $config The raw configuration array used to create the machine. - * @param array|null $behavior An array of behavior options. + * @param ?array $config The raw configuration array used to create the machine. + * @param array|null $behavior An array of behavior options. * * @return self The created machine definition. */ @@ -143,7 +143,7 @@ public static function define( /** * Initializes an empty behavior array with empty events, actions and guard arrays. * - * @return array An empty behavior array with empty events, actions and guard arrays. + * @return array An empty behavior array with empty events, actions and guard arrays. */ protected static function initializeEmptyBehavior(): array { @@ -163,7 +163,7 @@ protected static function initializeEmptyBehavior(): array * If no configuration is provided, the configuration will be set to null. * The $options parameter is set with the current `Machine` and machine id. * - * @param array|null $config The configuration for the root state definition. + * @param array|null $config The configuration for the root state definition. * * @return StateDefinition The created root state definition. */ @@ -275,8 +275,8 @@ public function getInitialState(EventBehavior|array|null $event = null): ?State /** * Retrieves the scenario state if scenario is enabled and available; otherwise, returns the current state. * - * @param State $state The current state. - * @param EventBehavior|array|null $eventBehavior The optional event behavior or event data. + * @param State $state The current state. + * @param EventBehavior|array|null $eventBehavior The optional event behavior or event data. * * @return State|null The scenario state if scenario is enabled and found, otherwise returns the current state. */ @@ -332,7 +332,7 @@ protected function buildCurrentState( * Otherwise, lookup the state in the `MachineDefinition` states array. * If the state is not found, return the initial state. * - * @param string|State|null $state The state to retrieve the definition for. + * @param string|State|null $state The state to retrieve the definition for. * * @return mixed The state definition. */ @@ -397,8 +397,8 @@ public function setupContextManager(): void * provided behavior type map. If the behavior is still not found, it returns * null. * - * @param string $behaviorDefinition The behavior definition to look up. - * @param BehaviorType $behaviorType The type of the behavior (e.g., guard or action). + * @param string $behaviorDefinition The behavior definition to look up. + * @param BehaviorType $behaviorType The type of the behavior (e.g., guard or action). * * @return callable|null The invokable behavior instance or callable, or null if not found. */ @@ -437,8 +437,8 @@ public function getInvokableBehavior(string $behaviorDefinition, BehaviorType $b * state. If no behavior is defined for the event type, a default * EventDefinition instance is returned. * - * @param EventBehavior|array $event The event to initialize. - * @param State $state The state in which the event is occurring. + * @param EventBehavior|array $event The event to initialize. + * @param State $state The state in which the event is occurring. * * @return EventBehavior The initialized EventBehavior instance. */ @@ -466,7 +466,7 @@ protected function initializeEvent( /** * Retrieves the nearest `StateDefinition` by string. * - * @param string $stateDefinitionId The state string. + * @param string $stateDefinitionId The state string. * * @return StateDefinition|null The nearest StateDefinition or null if it is not found. */ @@ -507,13 +507,13 @@ public function checkFinalStatesForTransitions(): void * definition in the parent state definition. If no transition definition is found and the current * state definition is not the initial state, throw an exception. * - * @param \Tarfinlabs\EventMachine\Definition\StateDefinition $currentStateDefinition The current state definition. - * @param \Tarfinlabs\EventMachine\Behavior\EventBehavior $eventBehavior The event behavior. - * @param string|null $firstStateDefinitionId The ID of the first state definition encountered during recursion. + * @param \Tarfinlabs\EventMachine\Definition\StateDefinition $currentStateDefinition The current state definition. + * @param \Tarfinlabs\EventMachine\Behavior\EventBehavior $eventBehavior The event behavior. + * @param string|null $firstStateDefinitionId The ID of the first state definition encountered during recursion. * - * @return \Tarfinlabs\EventMachine\Definition\TransitionDefinition|null The found transition definition, or null if none is found. + * @return \Tarfinlabs\EventMachine\Definition\TransitionDefinition|null The found transition definition, or null if none is found. * - * @throws \Tarfinlabs\EventMachine\Exceptions\NoTransitionDefinitionFoundException If no transition definition is found for the event type. + * @throws \Tarfinlabs\EventMachine\Exceptions\NoTransitionDefinitionFoundException If no transition definition is found for the event type. */ protected function findTransitionDefinition( StateDefinition $currentStateDefinition, @@ -550,8 +550,8 @@ protected function findTransitionDefinition( /** * Transition the state machine to a new state based on an event. * - * @param EventBehavior|array $event The event that triggers the transition. - * @param State|null $state The current state or state name, or null to use the initial state. + * @param EventBehavior|array $event The event that triggers the transition. + * @param State|null $state The current state or state name, or null to use the initial state. * * @return State The new state after the transition. */ @@ -687,8 +687,8 @@ public function transition( * action definition, and if the action behavior is callable, it * executes it using the context and event payload. * - * @param string $actionDefinition The action definition, either a class - * @param EventBehavior|null $eventBehavior The event (optional). + * @param string $actionDefinition The action definition, either a class + * @param EventBehavior|null $eventBehavior The event (optional). * * @throws \ReflectionException */ diff --git a/src/Definition/StateDefinition.php b/src/Definition/StateDefinition.php index 2cf56c0e..60a9a49b 100644 --- a/src/Definition/StateDefinition.php +++ b/src/Definition/StateDefinition.php @@ -99,8 +99,8 @@ class StateDefinition /** * Create a new state definition with the given configuration and options. * - * @param ?array $config The raw configuration array used to create the state definition. - * @param ?array $options The `options` array for configuring the state definition. + * @param ?array $config The raw configuration array used to create the state definition. + * @param ?array $options The `options` array for configuring the state definition. */ public function __construct( public ?array $config, @@ -235,7 +235,7 @@ protected function initializeResults(): void * corresponding {@see \Tarfinlabs\EventMachine\Definition\TransitionDefinition} objects for * each event. * - * @param StateDefinition $stateDefinition The state definition to process. + * @param StateDefinition $stateDefinition The state definition to process. * * @return array|null An array of TransitionDefinition objects, keyed by event names. */ @@ -455,7 +455,7 @@ public function runExitActions(State $state): void /** * Runs the entry actions of the current state definition with the given event. * - * @param \Tarfinlabs\EventMachine\Behavior\EventBehavior|null $eventBehavior The event to be processed. + * @param \Tarfinlabs\EventMachine\Behavior\EventBehavior|null $eventBehavior The event to be processed. */ public function runEntryActions(State $state, ?EventBehavior $eventBehavior = null): void { diff --git a/src/Definition/TransitionBranch.php b/src/Definition/TransitionBranch.php index 3c0a7431..73d04a70 100644 --- a/src/Definition/TransitionBranch.php +++ b/src/Definition/TransitionBranch.php @@ -137,8 +137,8 @@ protected function initializeActions(): void /** * Adds inline behavior definitions to machine's behavior. * - * @param array $inlineBehaviors An array of inline behaviors. - * @param BehaviorType $behaviorType The type of behavior. + * @param array $inlineBehaviors An array of inline behaviors. + * @param BehaviorType $behaviorType The type of behavior. */ protected function initializeInlineBehaviors(array $inlineBehaviors, BehaviorType $behaviorType): void { @@ -165,7 +165,7 @@ protected function initializeInlineBehaviors(array $inlineBehaviors, BehaviorTyp * * If there are no actions associated with the transition definition, do nothing. * - * @param EventBehavior|null $eventBehavior The event or null if none is provided. + * @param EventBehavior|null $eventBehavior The event or null if none is provided. * * @throws \ReflectionException */ diff --git a/src/Definition/TransitionDefinition.php b/src/Definition/TransitionDefinition.php index 1c8fb6c6..d7c1fe6d 100644 --- a/src/Definition/TransitionDefinition.php +++ b/src/Definition/TransitionDefinition.php @@ -41,9 +41,9 @@ class TransitionDefinition /** * Constructs a new TransitionDefinition instance. * - * @param null|string|array $transitionConfig The configuration for this transition. - * @param StateDefinition $source The source state definition for this transition. - * @param string $event The event triggering this transition. + * @param null|string|array $transitionConfig The configuration for this transition. + * @param StateDefinition $source The source state definition for this transition. + * @param string $event The event triggering this transition. */ public function __construct( public null|string|array $transitionConfig, @@ -132,10 +132,10 @@ protected function isAMultiPathGuardedTransition(null|array|string $transitionCo * to true, it is considered eligible. The method returns the first * eligible transition encountered or null if none is found. * - * @param EventBehavior $eventBehavior The event used to evaluate guards. + * @param EventBehavior $eventBehavior The event used to evaluate guards. * * @return TransitionDefinition|null The first eligible transition or - * null if no eligible transition is found. + * null if no eligible transition is found. * * @throws \ReflectionException */ diff --git a/src/Enums/InternalEvent.php b/src/Enums/InternalEvent.php index ac29a9b4..f373491b 100644 --- a/src/Enums/InternalEvent.php +++ b/src/Enums/InternalEvent.php @@ -37,8 +37,8 @@ enum InternalEvent: string /** * Generate an internal event name based on the machine ID and an optional placeholder. * - * @param string $machineId The ID of the machine. - * @param string|null $placeholder An optional placeholder. + * @param string $machineId The ID of the machine. + * @param string|null $placeholder An optional placeholder. * * @return string The generated internal event name. */ diff --git a/src/Exceptions/InvalidFinalStateDefinitionException.php b/src/Exceptions/InvalidFinalStateDefinitionException.php index bb39ece0..db0606f5 100644 --- a/src/Exceptions/InvalidFinalStateDefinitionException.php +++ b/src/Exceptions/InvalidFinalStateDefinitionException.php @@ -14,7 +14,7 @@ class InvalidFinalStateDefinitionException extends LogicException /** * Creates an instance of the class with an error message indicating that the specified final state should not have child states. * - * @param string $stateDefinition The definition of the final state. + * @param string $stateDefinition The definition of the final state. * * @return self The instance of the class with the error message. */ @@ -28,7 +28,7 @@ public static function noChildStates(string $stateDefinition): self /** * Creates an instance of the class with an error message indicating that the specified final state should not have transitions. * - * @param string $stateDefinition The definition of the final state. + * @param string $stateDefinition The definition of the final state. * * @return self The instance of the class with the error message. */ diff --git a/src/Exceptions/MissingMachineContextException.php b/src/Exceptions/MissingMachineContextException.php index f00c407a..ca22654f 100644 --- a/src/Exceptions/MissingMachineContextException.php +++ b/src/Exceptions/MissingMachineContextException.php @@ -17,7 +17,7 @@ class MissingMachineContextException extends RuntimeException /** * Builds and returns a new instance of the class. * - * @param string $key The missing key in context. + * @param string $key The missing key in context. * * @return self A new instance of the class with the missing key in context. */ diff --git a/src/Exceptions/NoTransitionDefinitionFoundException.php b/src/Exceptions/NoTransitionDefinitionFoundException.php index a2f67f8c..691112d1 100644 --- a/src/Exceptions/NoTransitionDefinitionFoundException.php +++ b/src/Exceptions/NoTransitionDefinitionFoundException.php @@ -17,8 +17,8 @@ class NoTransitionDefinitionFoundException extends LogicException /** * Builds an instance of self. * - * @param string $eventType The event type. - * @param string $stateDefinitionId The state definition id. + * @param string $eventType The event type. + * @param string $stateDefinitionId The state definition id. * * @return self The newly created instance of self. */ diff --git a/src/Exceptions/RestoringStateException.php b/src/Exceptions/RestoringStateException.php index 67327626..4afbc07b 100644 --- a/src/Exceptions/RestoringStateException.php +++ b/src/Exceptions/RestoringStateException.php @@ -17,7 +17,7 @@ class RestoringStateException extends RuntimeException /** * Build a new instance of the class with the given error message. * - * @param string $errorMessage The error message. + * @param string $errorMessage The error message. * * @return self The new instance of the class with the given error message. */ diff --git a/src/MachineServiceProvider.php b/src/MachineServiceProvider.php index 788b4e4e..66a56234 100644 --- a/src/MachineServiceProvider.php +++ b/src/MachineServiceProvider.php @@ -19,7 +19,7 @@ class MachineServiceProvider extends PackageServiceProvider * * This method is responsible for setting up the necessary configurations and assets for the given package. * - * @param Package $package The package to be configured. + * @param Package $package The package to be configured. */ public function configurePackage(Package $package): void { diff --git a/src/Models/MachineEvent.php b/src/Models/MachineEvent.php index 3c6ad868..cae4b119 100644 --- a/src/Models/MachineEvent.php +++ b/src/Models/MachineEvent.php @@ -86,7 +86,7 @@ protected static function newFactory(): MachineEventFactory * EventCollection. This allows for additional methods to be available * on the collection of MachineEvent models. * - * @param array $models An array of MachineEvent models. + * @param array $models An array of MachineEvent models. * * @return EventCollection A new instance of EventCollection. */ diff --git a/src/Transformers/ModelTransformer.php b/src/Transformers/ModelTransformer.php index 7f9d61fc..dc26b2c7 100644 --- a/src/Transformers/ModelTransformer.php +++ b/src/Transformers/ModelTransformer.php @@ -18,8 +18,8 @@ class ModelTransformer implements Transformer /** * Transforms the value of a DataProperty object. * - * @param DataProperty $property The DataProperty object. - * @param mixed $value The value to be transformed. + * @param DataProperty $property The DataProperty object. + * @param mixed $value The value to be transformed. * * @return mixed The transformed value. */