Completed
Push — master ( 31c245...6903f3 )
by Javier
03:11
created
src/Type/CarbonType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             return $value->format($platform->getDateTimeFormatString());
58 58
         }
59 59
 
60
-        throw ConversionException::conversionFailedInvalidType($value, $this->getName(), ['null', 'Carbon']);
60
+        throw ConversionException::conversionFailedInvalidType($value, $this->getName(), [ 'null', 'Carbon' ]);
61 61
     }
62 62
 
63 63
     /**
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         }
76 76
 
77 77
         try {
78
-            $carbon = Carbon::createFromFormat($platform->getDateTimeFormatString(), $value);
78
+            $carbon=Carbon::createFromFormat($platform->getDateTimeFormatString(), $value);
79 79
         } catch (InvalidArgumentException $e) {
80 80
             throw ConversionException::conversionFailedFormat(
81 81
                 $value,
Please login to merge, or discard this patch.
src/Request/ParamConverter/CarbonParamConverter.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
             return false;
36 36
         }
37 37
 
38
-        $param   = $configuration->getName();
39
-        $options = $configuration->getOptions();
40
-        $value   = $request->attributes->get($param);
41
-        $format  = $this->loadFormat($options, $value);
42
-        $carbon  = $this->getCarbon($format, $value, $param);
38
+        $param=$configuration->getName();
39
+        $options=$configuration->getOptions();
40
+        $value=$request->attributes->get($param);
41
+        $format=$this->loadFormat($options, $value);
42
+        $carbon=$this->getCarbon($format, $value, $param);
43 43
 
44 44
         $request->attributes->set($param, $carbon);
45 45
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      */
71 71
     private function isValidInput(Request $request, ParamConverter $configuration): bool
72 72
     {
73
-        $param = $configuration->getName();
73
+        $param=$configuration->getName();
74 74
 
75 75
         return !(
76 76
             (!$request->attributes->has($param)) ||
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
      */
88 88
     private function loadFormat(array $options, string $value): ?string
89 89
     {
90
-        $format = $options['format'] ?? null;
90
+        $format=$options[ 'format' ] ?? null;
91 91
 
92 92
         if (!$format && \filter_var($value, \FILTER_VALIDATE_INT) !== false) {
93
-            $format = 'U';
93
+            $format='U';
94 94
         }
95 95
 
96 96
         return $format;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      *
106 106
      * @throws NotFoundHttpException
107 107
      */
108
-    private function getCarbon(?string $format, string $value, string $param): Carbon
108
+    private function getCarbon(?string $format, string $value, string $param) : Carbon
109 109
     {
110 110
         try {
111 111
             if ($format) {
Please login to merge, or discard this patch.