Passed
Pull Request — master (#28)
by Yannick
17:53 queued 07:05
created
src/Visitor/AttributeDumper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      */
27 27
     public function visitState(string $name, array $attributes): void
28 28
     {
29
-        if (! isset($this->structure[$name])) {
29
+        if (!isset($this->structure[$name])) {
30 30
             $this->structure[$name] = [];
31 31
         }
32 32
 
Please login to merge, or discard this patch.
src/TransitionRegistry.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             $transition = new ReadOnlyTransition($this->transitions[$name]['to']);
48 48
         }
49 49
 
50
-        if (! $transition) {
50
+        if (!$transition) {
51 51
             throw NotFoundException::transitionNotFound($name);
52 52
         }
53 53
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     private function addAttributes(string $state, array $attributes): void
72 72
     {
73 73
         \array_map(
74
-            function ($attribute) use ($state) {
74
+            function($attribute) use ($state) {
75 75
                 $this->addAttribute($state, $attribute);
76 76
             },
77 77
             $attributes
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
     public function hasAttribute(string $state, string $attribute): bool
92 92
     {
93
-        if (! $this->hasState($state)) {
93
+        if (!$this->hasState($state)) {
94 94
             return false;
95 95
         }
96 96
 
Please login to merge, or discard this patch.
src/StateMachine.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function transit(string $transitionName, $context, TransitionCallback $callback = null): string
54 54
     {
55
-        if (! $callback) {
55
+        if (!$callback) {
56 56
             $callback = new AlwaysThrowExceptionOnFailure();
57 57
         }
58 58
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
         $newState = $transition->getDestinationState();
68 68
         $allowed = $this->states->transitionStartsFrom($transitionName, $this->currentState);
69
-        if (! $allowed) {
69
+        if (!$allowed) {
70 70
             $exception = InvalidStateTransitionException::notAllowedTransition(
71 71
                 $transitionName,
72 72
                 $context,
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public function isInState(string $stateName): bool
102 102
     {
103
-        if (! $this->states->hasState($stateName)) {
103
+        if (!$this->states->hasState($stateName)) {
104 104
             throw NotFoundException::stateNotFound($stateName);
105 105
         }
106 106
 
Please login to merge, or discard this patch.
src/Port/Symfony/EventDispatcherAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
     public function __construct(EventDispatcherInterface $dispatcher = null)
18 18
     {
19
-        if (! $dispatcher) {
19
+        if (!$dispatcher) {
20 20
             $dispatcher = new EventDispatcher();
21 21
         }
22 22
         $this->dispatcher = $dispatcher;
Please login to merge, or discard this patch.
src/Callbacks/CallContextMethodOnFailure.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
      */
63 63
     public function onFailure(InvalidStateTransitionException $exception, $context, StateMachine $machine): string
64 64
     {
65
-        $closure = function (array $args) use ($context) {
65
+        $closure = function(array $args) use ($context) {
66 66
             $context->{$this->method}(...$args);
67 67
         };
68 68
         $closure($this->args);
Please login to merge, or discard this patch.