Passed
Branch main (24e4f5)
by Jeremy
10:45
created
Category
src/Validators/ValidatorShared.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     {
11 11
         if (is_float($value + 0)) {
12 12
             // if less than zero and doesn't start with a zero
13
-            if ($value + 0 < 1 && ! str_starts_with($value, '0')) {
13
+            if ($value + 0 < 1 && !str_starts_with($value, '0')) {
14 14
                 throw new BadRequestException('Region values less than one require a leading zero.');
15 15
             }
16 16
             // option should not have an extra trailing zero
Please login to merge, or discard this patch.
src/Filters/SizeFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         return $image->resize(
62 62
             $width,
63 63
             $height,
64
-            function ($constraint) use ($constrainAspectRatio, $width, $height) {
64
+            function($constraint) use ($constrainAspectRatio, $width, $height) {
65 65
                 if ($constrainAspectRatio || is_null($width) || is_null($height)) {
66 66
                     $constraint->aspectRatio();
67 67
                 }
Please login to merge, or discard this patch.
src/Filters/RegionFilter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,10 +65,10 @@
 block discarded – undo
65 65
         }
66 66
 
67 67
         // iiif - x,y,w,h
68
-        $x = (int) round($this->width * substr($this->options[0], 4) / 100);
69
-        $y = (int) round($this->height * $this->options[1] / 100);
70
-        $w = (int) round($this->width * $this->options[2] / 100);
71
-        $h = (int) round($this->height * $this->options[3] / 100);
68
+        $x = (int)round($this->width * substr($this->options[0], 4) / 100);
69
+        $y = (int)round($this->height * $this->options[1] / 100);
70
+        $w = (int)round($this->width * $this->options[2] / 100);
71
+        $h = (int)round($this->height * $this->options[3] / 100);
72 72
 
73 73
         if ($this->options[2] + substr($this->options[0], 4) > 100) {
74 74
             $w = $this->width - $x;
Please login to merge, or discard this patch.
src/ImageIIIF.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         ];
50 50
 
51 51
         foreach ($parameters as $parameter => $options) {
52
-            if (! in_array($parameter, array_keys($iiifParameters))) {
52
+            if (!in_array($parameter, array_keys($iiifParameters))) {
53 53
                 continue;
54 54
             }
55 55
 
@@ -68,11 +68,11 @@  discard block
 block discarded – undo
68 68
         ];
69 69
 
70 70
         foreach ($parameters as $parameter => $value) {
71
-            if (! in_array($parameter, array_keys($validators))) {
71
+            if (!in_array($parameter, array_keys($validators))) {
72 72
                 continue;
73 73
             }
74 74
 
75
-            if (! (new $validators[$parameter]($this->config, $this->image))->valid($value)) {
75
+            if (!(new $validators[$parameter]($this->config, $this->image))->valid($value)) {
76 76
                 return false;
77 77
 
78 78
                 break;
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     {
112 112
         $scaleFactors = [];
113 113
         $maxSize = max($this->image->width(), $this->image->height());
114
-        $total = (int) ceil($maxSize / $this->config->get('tile_width'));
114
+        $total = (int)ceil($maxSize / $this->config->get('tile_width'));
115 115
         $factor = 1;
116 116
         while ($factor / 2 <= $total) {
117 117
             $scaleFactors[] = $factor;
Please login to merge, or discard this patch.