@@ -47,10 +47,10 @@ discard block |
||
47 | 47 | |
48 | 48 | if (strpos($this->options[0], 'pct:') === false) { |
49 | 49 | // iiif - x,y,w,h |
50 | - $x = (int) $this->options[0]; |
|
51 | - $y = (int) $this->options[1]; |
|
52 | - $w = (int) $this->options[2]; |
|
53 | - $h = (int) $this->options[3]; |
|
50 | + $x = (int)$this->options[0]; |
|
51 | + $y = (int)$this->options[1]; |
|
52 | + $w = (int)$this->options[2]; |
|
53 | + $h = (int)$this->options[3]; |
|
54 | 54 | |
55 | 55 | if (($x + $w) > $this->width) { |
56 | 56 | $w = $w - (($x + $w) - $this->width); |
@@ -65,10 +65,10 @@ discard block |
||
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; |
@@ -33,7 +33,7 @@ |
||
33 | 33 | throw new NotImplementedException("Maximum size is not implemented."); |
34 | 34 | } |
35 | 35 | |
36 | - if (! $this->allow_upscaling && $this->upscale) { |
|
36 | + if (!$this->allow_upscaling && $this->upscale) { |
|
37 | 37 | throw new NotImplementedException("Upscaling is not allowed."); |
38 | 38 | } |
39 | 39 |
@@ -49,7 +49,7 @@ discard block |
||
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 |
||
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 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | { |
110 | 110 | $scaleFactors = []; |
111 | 111 | $maxSize = max($this->image->width(), $this->image->height()); |
112 | - $total = (int) ceil($maxSize / $this->config['tile_width']); |
|
112 | + $total = (int)ceil($maxSize / $this->config['tile_width']); |
|
113 | 113 | $factor = 1; |
114 | 114 | while ($factor / 2 <= $total) { |
115 | 115 | $scaleFactors[] = $factor; |