Passed
Push — master ( 33ba89...d68d30 )
by Smoren
02:11
created
src/ObjectTypeCaster.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public static function cast(object $sourceObject, string $destinationClass)
21 21
     {
22
-        if(!class_exists($destinationClass)) {
22
+        if (!class_exists($destinationClass)) {
23 23
             throw new TypeError("Class '{$destinationClass}' does not exist");
24 24
         }
25 25
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
         // Unfortunately PHPstan has a problem with function is_subclass_of(). So:
29 29
         // @phpstan-ignore-next-line
30
-        if(!is_subclass_of($sourceClass, $destinationClass) && !is_subclass_of($destinationClass, $sourceClass)) {
30
+        if (!is_subclass_of($sourceClass, $destinationClass) && !is_subclass_of($destinationClass, $sourceClass)) {
31 31
             throw new TypeError("Classes '{$sourceClass}' and '{$destinationClass}' must be relatives");
32 32
         }
33 33
 
Please login to merge, or discard this patch.