Skip to content

Commit

Permalink
Merge pull request #59 from sebdesign/analysis-4xPV6n
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
sebdesign authored Nov 13, 2021
2 parents 3b260a1 + aea58bc commit 65ac84e
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 46 deletions.
6 changes: 3 additions & 3 deletions src/Callback/ContainerAwareCallback.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class ContainerAwareCallback extends Callback
protected $container;

/**
* @param array $specs Specification for the callback to be called
* @param mixed $callable Closure, callable or string that will be called if specifications pass
* @param \Illuminate\Contracts\Container\Container $container The service container that will be used to resolve the callable
* @param array $specs Specification for the callback to be called
* @param mixed $callable Closure, callable or string that will be called if specifications pass
* @param \Illuminate\Contracts\Container\Container $container The service container that will be used to resolve the callable
*/
public function __construct(array $specs, $callable, ContainerInterface $container)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Callback/ContainerAwareCallbackFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class ContainerAwareCallbackFactory extends CallbackFactory
protected $container;

/**
* @param string $class The CallbackFactory
* @param \Illuminate\Contracts\Container\Container $container The service container that will be used to resolve the callable
* @param string $class The CallbackFactory
* @param \Illuminate\Contracts\Container\Container $container The service container that will be used to resolve the callable
*
* @throws \SM\SMException if the CallbackFactory class does not exist
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Callback/GateCallback.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class GateCallback extends Callback
protected $gate;

/**
* @param array $specs Specification for the callback to be called
* @param \Illuminate\Contracts\Auth\Access\Gate $gate The service container that will be used to resolve the callable
* @param array $specs Specification for the callback to be called
* @param \Illuminate\Contracts\Auth\Access\Gate $gate The service container that will be used to resolve the callable
*/
public function __construct(array $specs, Gate $gate)
{
Expand Down
12 changes: 6 additions & 6 deletions src/Commands/Debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Debug extends Command
/**
* Create a new command instance.
*
* @param array $config
* @param array $config
*/
public function __construct(array $config)
{
Expand Down Expand Up @@ -93,7 +93,7 @@ protected function askForGraph()
/**
* Display the graph states on a table.
*
* @param array $states
* @param array $states
*/
protected function printStates(array $states)
{
Expand All @@ -119,7 +119,7 @@ protected function printStates(array $states)
/**
* Display the graph transitions on a table.
*
* @param array $transitions
* @param array $transitions
*/
protected function printTransitions(array $transitions)
{
Expand All @@ -145,7 +145,7 @@ protected function printTransitions(array $transitions)
/**
* Display the graph callbacks on a table.
*
* @param array $allCallbacks
* @param array $allCallbacks
*/
protected function printCallbacks(array $allCallbacks)
{
Expand All @@ -167,7 +167,7 @@ protected function printCallbacks(array $allCallbacks)
/**
* Format the clauses that satisfy the callback.
*
* @param array $specs
* @param array $specs
* @return string
*/
protected function formatSatisfies(array $specs)
Expand All @@ -188,7 +188,7 @@ protected function formatSatisfies(array $specs)
* Format the callback clause.
*
* @param array $specs
* @param string $clause
* @param string $clause
* @return string
*/
protected function formatClause(array $specs, $clause)
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/Visualize.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Visualize extends Command
/**
* Create a new command instance.
*
* @param array $config
* @param array $config
*/
public function __construct(array $config)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Event/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Dispatcher implements EventDispatcherInterface
protected $dispatcher;

/**
* @param \Illuminate\Contracts\Events\Dispatcher $dispatcher
* @param \Illuminate\Contracts\Events\Dispatcher $dispatcher
*/
public function __construct(DispatcherContract $dispatcher)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Metadata/MetadataStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ public function transition($transition, $key = null, $default = null)
/**
* Get a metadata value from a subject.
*
* @param array $subject
* @param string|null $key
* @param mixed $default
* @param array $subject
* @param string|null $key
* @param mixed $default
* @return mixed
*/
protected function get(array $subject, $key, $default)
Expand Down
22 changes: 12 additions & 10 deletions src/Metadata/MetadataStoreInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,35 @@ interface MetadataStoreInterface
/**
* Get metadata from the graph.
*
* @param string|null $key
* @param mixed $default
* @param string|null $key
* @param mixed $default
* @return mixed
*/
public function graph($key = null, $default = null);

/**
* Get metadata from a state.
*
* @throws \SM\SMException If the state does not exist.
*
* @param string $state
* @param string|null $key
* @param mixed $default
* @param string $state
* @param string|null $key
* @param mixed $default
* @return mixed
*
* @throws \SM\SMException If the state does not exist.
*/
public function state($state, $key = null, $default = null);

/**
* Get metadata from a transaction.
*
* @throws \SM\SMException If the transition does not exist.
*
* @param string $transition
* @param string|null $key
* @param mixed $default
* @param string $transition
* @param string|null $key
* @param mixed $default
* @return mixed
*
* @throws \SM\SMException If the transition does not exist.
*/
public function transition($transition, $key = null, $default = null);
}
28 changes: 14 additions & 14 deletions src/StateMachine/StateMachine.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class StateMachine extends BaseStateMachine
/**
* {@inheritdoc}
*
* @param \Sebdesign\SM\Metadata\MetadataStoreInterface|null $metadataStore
* @param \Sebdesign\SM\Metadata\MetadataStoreInterface|null $metadataStore
*/
public function __construct(
$object,
Expand Down Expand Up @@ -134,7 +134,7 @@ protected function setState($state): void
/**
* Check if the graph has the given state.
*
* @param string $state
* @param string $state
* @return bool
*/
protected function hasState($state)
Expand All @@ -151,10 +151,10 @@ protected function hasState($state)
/**
* Get the metadata.
*
* @param string|null $type
* @param string|null $subject
* @param string|null $key
* @param mixed $default
* @param string|null $type
* @param string|null $subject
* @param string|null $key
* @param mixed $default
* @return \Sebdesign\SM\Metadata\MetadataStoreInterface
*/
public function metadata($type = null, $subject = null, $key = null, $default = null)
Expand All @@ -176,8 +176,8 @@ public function metadata($type = null, $subject = null, $key = null, $default =
}

/**
* @param string|null $key
* @param mixed $default
* @param string|null $key
* @param mixed $default
* @return mixed
*/
protected function getGraphMetadata($key, $default)
Expand All @@ -186,9 +186,9 @@ protected function getGraphMetadata($key, $default)
}

/**
* @param string|null $subject
* @param string|null $key
* @param mixed $default
* @param string|null $subject
* @param string|null $key
* @param mixed $default
* @return mixed
*/
protected function getStateMetadata($subject, $key, $default)
Expand All @@ -205,9 +205,9 @@ protected function getStateMetadata($subject, $key, $default)
}

/**
* @param string|null $subject
* @param string|null $key
* @param mixed $default
* @param string|null $subject
* @param string|null $key
* @param mixed $default
* @return mixed
*/
protected function getTransitionMetadata($subject, $key, $default)
Expand Down
5 changes: 1 addition & 4 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ abstract class TestCase extends BaseTestCase
* Get package providers.
*
* @param \Illuminate\Foundation\Application $app
*
* @return array
*/
protected function getPackageProviders($app)
Expand All @@ -24,7 +23,6 @@ protected function getPackageProviders($app)
* Get package aliases.
*
* @param \Illuminate\Foundation\Application $app
*
* @return array
*/
protected function getPackageAliases($app)
Expand All @@ -35,8 +33,7 @@ protected function getPackageAliases($app)
/**
* Define environment setup.
*
* @param \Illuminate\Foundation\Application $app
*
* @param \Illuminate\Foundation\Application $app
* @return void
*/
protected function getEnvironmentSetUp($app)
Expand Down

0 comments on commit 65ac84e

Please sign in to comment.