Completed
Branch develop (a08546)
by Javier
06:08
created
Category
src/DependencyInjection/CarbonExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public function load(array $configs, ContainerBuilder $container): void
30 30
     {
31
-        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../../config'));
31
+        $loader=new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../../config'));
32 32
 
33 33
         $loader->load(__DIR__ . '/../../config/doctrine.yml');
34 34
     }
Please login to merge, or discard this patch.
src/CarbonBundle.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function getContainerExtension(): ?ExtensionInterface
25 25
     {
26
-        $this->extension = $this->extension ?? new CarbonExtension();
26
+        $this->extension=$this->extension ?? new CarbonExtension();
27 27
         return $this->extension;
28 28
     }
29 29
 }
Please login to merge, or discard this patch.
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   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,30 +31,30 @@
 block discarded – undo
31 31
      */
32 32
     public function apply(Request $request, ParamConverter $configuration): bool
33 33
     {
34
-        $param = $configuration->getName();
34
+        $param=$configuration->getName();
35 35
 
36 36
         if (!$request->attributes->has($param)) {
37 37
             return false;
38 38
         }
39 39
 
40
-        $options = $configuration->getOptions();
41
-        $value   = $request->attributes->get($param);
40
+        $options=$configuration->getOptions();
41
+        $value=$request->attributes->get($param);
42 42
 
43 43
         if (!$value && $configuration->isOptional()) {
44 44
             return false;
45 45
         }
46 46
 
47
-        $format = $options['format'] ?? false;
47
+        $format=$options[ 'format' ] ?? false;
48 48
 
49 49
         if (!$format && \filter_var($value, \FILTER_VALIDATE_INT) !== false) {
50
-            $format = 'U';
50
+            $format='U';
51 51
         }
52 52
 
53 53
         try {
54 54
             if ($format) {
55
-                $carbon = Carbon::createFromFormat($format, $value);
55
+                $carbon=Carbon::createFromFormat($format, $value);
56 56
             } else {
57
-                $carbon = new Carbon($value);
57
+                $carbon=new Carbon($value);
58 58
             }
59 59
         } catch (Exception $e) {
60 60
             throw new NotFoundHttpException(\sprintf('Invalid date given for parameter "%s".', $param));
Please login to merge, or discard this patch.