Passed
Push — master ( f68793...1e735e )
by Olivier
10:02
created
lib/VoterProvider.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@
 block discarded – undo
13 13
 
14 14
 interface VoterProvider
15 15
 {
16
-    /**
17
-     * Returns a voter for a permission.
18
-     *
19
-     * The dispatcher should fail if the function returns `null`, but a chain of voter providers
20
-     * could invoke the next voter provider instead.
21
-     */
22
-    public function getVoterForPermission(string $permission): ?Voter;
16
+	/**
17
+	 * Returns a voter for a permission.
18
+	 *
19
+	 * The dispatcher should fail if the function returns `null`, but a chain of voter providers
20
+	 * could invoke the next voter provider instead.
21
+	 */
22
+	public function getVoterForPermission(string $permission): ?Voter;
23 23
 }
Please login to merge, or discard this patch.
lib/VoterNotFound.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
  */
20 20
 class VoterNotFound extends LogicException implements Exception
21 21
 {
22
-    public function __construct(
23
-        public string $permission,
24
-        ?Throwable $previous = null
25
-    ) {
26
-        parent::__construct("Voter not found for permission: $permission", previous: $previous);
27
-    }
22
+	public function __construct(
23
+		public string $permission,
24
+		?Throwable $previous = null
25
+	) {
26
+		parent::__construct("Voter not found for permission: $permission", previous: $previous);
27
+	}
28 28
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,6 +23,6 @@
 block discarded – undo
23 23
         public string $permission,
24 24
         ?Throwable $previous = null
25 25
     ) {
26
-        parent::__construct("Voter not found for permission: $permission", previous: $previous);
26
+        parent::__construct("Voter not found for permission: $permission", previous : $previous);
27 27
     }
28 28
 }
Please login to merge, or discard this patch.
lib/HandlerProvider.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -16,15 +16,15 @@
 block discarded – undo
16 16
  */
17 17
 interface HandlerProvider
18 18
 {
19
-    /**
20
-     * @param object $message
21
-     *   A message for which to return the relevant handler.
22
-     *
23
-     * @return callable
24
-     *   A callable that MUST be type-compatible with $message.
25
-     *
26
-     * @throws HandlerNotFound
27
-     *   The handler for the message cannot the found.
28
-     */
29
-    public function getHandlerForMessage(object $message): callable;
19
+	/**
20
+	 * @param object $message
21
+	 *   A message for which to return the relevant handler.
22
+	 *
23
+	 * @return callable
24
+	 *   A callable that MUST be type-compatible with $message.
25
+	 *
26
+	 * @throws HandlerNotFound
27
+	 *   The handler for the message cannot the found.
28
+	 */
29
+	public function getHandlerForMessage(object $message): callable;
30 30
 }
Please login to merge, or discard this patch.
lib/SimpleHandlerProvider.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -18,19 +18,19 @@
 block discarded – undo
18 18
  */
19 19
 final class SimpleHandlerProvider implements HandlerProvider
20 20
 {
21
-    /**
22
-     * @param array<string, callable> $handlers
23
-     */
24
-    public function __construct(
25
-        private array $handlers
26
-    ) {
27
-    }
21
+	/**
22
+	 * @param array<string, callable> $handlers
23
+	 */
24
+	public function __construct(
25
+		private array $handlers
26
+	) {
27
+	}
28 28
 
29
-    public function getHandlerForMessage(object $message): callable
30
-    {
31
-        $class = get_class($message);
29
+	public function getHandlerForMessage(object $message): callable
30
+	{
31
+		$class = get_class($message);
32 32
 
33
-        return $this->handlers[$class]
34
-            ?? throw new HandlerNotFound("No handler for messages of type `$class`.");
35
-    }
33
+		return $this->handlers[$class]
34
+			?? throw new HandlerNotFound("No handler for messages of type `$class`.");
35
+	}
36 36
 }
Please login to merge, or discard this patch.
lib/NotFound.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
  */
22 22
 class NotFound extends LogicException implements Exception
23 23
 {
24
-    public function __construct(string $message, Throwable $previous = null)
25
-    {
26
-        parent::__construct($message, 0, $previous);
27
-    }
24
+	public function __construct(string $message, Throwable $previous = null)
25
+	{
26
+		parent::__construct($message, 0, $previous);
27
+	}
28 28
 }
Please login to merge, or discard this patch.