@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - /** |
|
2 | + /** |
|
3 | 3 | ##DOC-SIGNATURE## |
4 | 4 | |
5 | 5 | This file is part of WideImage. |
@@ -17,9 +17,8 @@ discard block |
||
17 | 17 | You should have received a copy of the GNU Lesser General Public License |
18 | 18 | along with WideImage; if not, write to the Free Software |
19 | 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
20 | - |
|
21 | - * @package Internal/Mappers |
|
22 | - **/ |
|
20 | + * @package Internal/Mappers |
|
21 | + **/ |
|
23 | 22 | |
24 | 23 | namespace WideImage\Mapper; |
25 | 24 | |
@@ -30,23 +29,23 @@ discard block |
||
30 | 29 | */ |
31 | 30 | class GIF |
32 | 31 | { |
33 | - public function load($uri) |
|
34 | - { |
|
35 | - return @imagecreatefromgif($uri); |
|
36 | - } |
|
32 | + public function load($uri) |
|
33 | + { |
|
34 | + return @imagecreatefromgif($uri); |
|
35 | + } |
|
37 | 36 | |
38 | - public function save($handle, $uri = null) |
|
39 | - { |
|
40 | - // This is a workaround for a bug, for which PHP devs claim it's not |
|
41 | - // really a bug. Well, it IS. |
|
42 | - // You can't pass null as the second parameter, because php is |
|
43 | - // then trying to save an image to a '' location (which results in an |
|
44 | - // error, of course). And the same thing works fine for imagepng() and |
|
45 | - // imagejpeg(). It's a bug! ;) |
|
46 | - if ($uri) { |
|
47 | - return imagegif($handle, $uri); |
|
48 | - } |
|
37 | + public function save($handle, $uri = null) |
|
38 | + { |
|
39 | + // This is a workaround for a bug, for which PHP devs claim it's not |
|
40 | + // really a bug. Well, it IS. |
|
41 | + // You can't pass null as the second parameter, because php is |
|
42 | + // then trying to save an image to a '' location (which results in an |
|
43 | + // error, of course). And the same thing works fine for imagepng() and |
|
44 | + // imagejpeg(). It's a bug! ;) |
|
45 | + if ($uri) { |
|
46 | + return imagegif($handle, $uri); |
|
47 | + } |
|
49 | 48 | |
50 | - return imagegif($handle); |
|
51 | - } |
|
49 | + return imagegif($handle); |
|
50 | + } |
|
52 | 51 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - /** |
|
2 | + /** |
|
3 | 3 | ##DOC-SIGNATURE## |
4 | 4 | |
5 | 5 | This file is part of WideImage. |
@@ -17,9 +17,8 @@ discard block |
||
17 | 17 | You should have received a copy of the GNU Lesser General Public License |
18 | 18 | along with WideImage; if not, write to the Free Software |
19 | 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
20 | - |
|
21 | - * @package Internal/Mappers |
|
22 | - **/ |
|
20 | + * @package Internal/Mappers |
|
21 | + **/ |
|
23 | 22 | |
24 | 23 | namespace WideImage\Mapper; |
25 | 24 | |
@@ -32,22 +31,22 @@ discard block |
||
32 | 31 | */ |
33 | 32 | class BMP |
34 | 33 | { |
35 | - public function load($uri) |
|
36 | - { |
|
37 | - return de77\BMP::imagecreatefrombmp($uri); |
|
38 | - } |
|
34 | + public function load($uri) |
|
35 | + { |
|
36 | + return de77\BMP::imagecreatefrombmp($uri); |
|
37 | + } |
|
39 | 38 | |
40 | - public function loadFromString($data) |
|
41 | - { |
|
42 | - return de77\BMP::imagecreatefromstring($data); |
|
43 | - } |
|
39 | + public function loadFromString($data) |
|
40 | + { |
|
41 | + return de77\BMP::imagecreatefromstring($data); |
|
42 | + } |
|
44 | 43 | |
45 | - public function save($handle, $uri = null) |
|
46 | - { |
|
47 | - if ($uri == null) { |
|
48 | - return de77\BMP::imagebmp($handle); |
|
49 | - } |
|
44 | + public function save($handle, $uri = null) |
|
45 | + { |
|
46 | + if ($uri == null) { |
|
47 | + return de77\BMP::imagebmp($handle); |
|
48 | + } |
|
50 | 49 | |
51 | - return de77\BMP::imagebmp($handle, $uri); |
|
52 | - } |
|
50 | + return de77\BMP::imagebmp($handle, $uri); |
|
51 | + } |
|
53 | 52 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - /** |
|
2 | + /** |
|
3 | 3 | ##DOC-SIGNATURE## |
4 | 4 | |
5 | 5 | This file is part of WideImage. |
@@ -17,9 +17,8 @@ discard block |
||
17 | 17 | You should have received a copy of the GNU Lesser General Public License |
18 | 18 | along with WideImage; if not, write to the Free Software |
19 | 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
20 | - |
|
21 | - * @package Internal/Mappers |
|
22 | - **/ |
|
20 | + * @package Internal/Mappers |
|
21 | + **/ |
|
23 | 22 | |
24 | 23 | namespace WideImage\Mapper; |
25 | 24 | |
@@ -30,13 +29,13 @@ discard block |
||
30 | 29 | */ |
31 | 30 | class PNG |
32 | 31 | { |
33 | - public function load($uri) |
|
34 | - { |
|
35 | - return @imagecreatefrompng($uri); |
|
36 | - } |
|
32 | + public function load($uri) |
|
33 | + { |
|
34 | + return @imagecreatefrompng($uri); |
|
35 | + } |
|
37 | 36 | |
38 | - public function save($handle, $uri = null, $compression = 9, $filters = PNG_ALL_FILTERS) |
|
39 | - { |
|
40 | - return imagepng($handle, $uri, $compression, $filters); |
|
41 | - } |
|
37 | + public function save($handle, $uri = null, $compression = 9, $filters = PNG_ALL_FILTERS) |
|
38 | + { |
|
39 | + return imagepng($handle, $uri, $compression, $filters); |
|
40 | + } |
|
42 | 41 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - /** |
|
2 | + /** |
|
3 | 3 | ##DOC-SIGNATURE## |
4 | 4 | |
5 | 5 | This file is part of WideImage. |
@@ -17,10 +17,9 @@ discard block |
||
17 | 17 | You should have received a copy of the GNU Lesser General Public License |
18 | 18 | along with WideImage; if not, write to the Free Software |
19 | 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
20 | - |
|
21 | - * @package Internal/Mappers |
|
22 | - * @author Krzysztof Bednarczyk |
|
23 | - **/ |
|
20 | + * @package Internal/Mappers |
|
21 | + * @author Krzysztof Bednarczyk |
|
22 | + **/ |
|
24 | 23 | |
25 | 24 | namespace WideImage\Mapper; |
26 | 25 | |
@@ -31,13 +30,13 @@ discard block |
||
31 | 30 | */ |
32 | 31 | class WEBP |
33 | 32 | { |
34 | - public function load($uri) |
|
35 | - { |
|
36 | - return @imagecreatefromwebp($uri); |
|
37 | - } |
|
33 | + public function load($uri) |
|
34 | + { |
|
35 | + return @imagecreatefromwebp($uri); |
|
36 | + } |
|
38 | 37 | |
39 | - public function save($handle, $uri = null) |
|
40 | - { |
|
41 | - return imagewebp($handle, $uri); |
|
42 | - } |
|
38 | + public function save($handle, $uri = null) |
|
39 | + { |
|
40 | + return imagewebp($handle, $uri); |
|
41 | + } |
|
43 | 42 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - /** |
|
2 | + /** |
|
3 | 3 | ##DOC-SIGNATURE## |
4 | 4 | |
5 | 5 | This file is part of WideImage. |
@@ -17,9 +17,8 @@ discard block |
||
17 | 17 | You should have received a copy of the GNU Lesser General Public License |
18 | 18 | along with WideImage; if not, write to the Free Software |
19 | 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
20 | - |
|
21 | - * @package Internal/Mappers |
|
22 | - **/ |
|
20 | + * @package Internal/Mappers |
|
21 | + **/ |
|
23 | 22 | |
24 | 23 | namespace WideImage\Mapper; |
25 | 24 | |
@@ -30,13 +29,13 @@ discard block |
||
30 | 29 | */ |
31 | 30 | class JPEG |
32 | 31 | { |
33 | - public function load($uri) |
|
34 | - { |
|
35 | - return @imagecreatefromjpeg($uri); |
|
36 | - } |
|
32 | + public function load($uri) |
|
33 | + { |
|
34 | + return @imagecreatefromjpeg($uri); |
|
35 | + } |
|
37 | 36 | |
38 | - public function save($handle, $uri = null, $quality = 100) |
|
39 | - { |
|
40 | - return imagejpeg($handle, $uri, $quality); |
|
41 | - } |
|
37 | + public function save($handle, $uri = null, $quality = 100) |
|
38 | + { |
|
39 | + return imagejpeg($handle, $uri, $quality); |
|
40 | + } |
|
42 | 41 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | { |
22 | 22 | if (method_exists('ReflectionParameter', 'getType')) { |
23 | 23 | if ($type = $param->getType()) { |
24 | - $this->type_hint = (string) $type; |
|
24 | + $this->type_hint = (string)$type; |
|
25 | 25 | } |
26 | 26 | } else { |
27 | 27 | if ($param->isArray()) { |
@@ -37,7 +37,7 @@ |
||
37 | 37 | if (KINT_PHP70) { |
38 | 38 | $this->returntype = $method->getReturnType(); |
39 | 39 | if ($this->returntype) { |
40 | - $this->returntype = (string) $this->returntype; |
|
40 | + $this->returntype = (string)$this->returntype; |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 |
@@ -62,7 +62,7 @@ |
||
62 | 62 | |
63 | 63 | private static function sort(Kint_Object_Method $a, Kint_Object_Method $b) |
64 | 64 | { |
65 | - $sort = ((int) $a->static) - ((int) $b->static); |
|
65 | + $sort = ((int)$a->static) - ((int)$b->static); |
|
66 | 66 | if ($sort) { |
67 | 67 | return $sort; |
68 | 68 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | if (!$o->size) { |
106 | 106 | $o->size = null; |
107 | 107 | |
108 | - if (strlen((string) $var)) { |
|
108 | + if (strlen((string)$var)) { |
|
109 | 109 | $base_obj = new Kint_Object_Blob(); |
110 | 110 | $base_obj->depth = $o->depth + 1; |
111 | 111 | $base_obj->name = $o->name; |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $base_obj->access_path = '(string) '.$o->access_path; |
114 | 114 | } |
115 | 115 | |
116 | - $value = (string) $var; |
|
116 | + $value = (string)$var; |
|
117 | 117 | |
118 | 118 | $depth_stash = $this->parser->max_depth; |
119 | 119 | $this->parser->max_depth = 0; |