@@ -13,11 +13,11 @@ |
||
13 | 13 | |
14 | 14 | function getimagesize($path) |
15 | 15 | { |
16 | - $image = Image\Factory::create($path); |
|
16 | + $image = Image\Factory::create($path); |
|
17 | 17 | |
18 | - if (is_null($image)) { |
|
19 | - return false; |
|
20 | - } |
|
18 | + if (is_null($image)) { |
|
19 | + return false; |
|
20 | + } |
|
21 | 21 | |
22 | - return $image->getSize(); |
|
22 | + return $image->getSize(); |
|
23 | 23 | } |
24 | 24 | \ No newline at end of file |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $type = unpack($this->typeShort, $this->getHeaderPart($offset, self::SHORT_SIZE)); |
82 | 82 | |
83 | 83 | // Get field type of tag |
84 | - $fieldType = unpack($this->typeShort . 'type', $this->getHeaderPart($offset + self::SHORT_SIZE, self::SHORT_SIZE)); |
|
84 | + $fieldType = unpack($this->typeShort.'type', $this->getHeaderPart($offset + self::SHORT_SIZE, self::SHORT_SIZE)); |
|
85 | 85 | |
86 | 86 | // Get IFD entry |
87 | 87 | $ifdValue = $this->getHeaderPart($offset + 2 * self::LONG_SIZE, self::LONG_SIZE); |
@@ -119,9 +119,9 @@ discard block |
||
119 | 119 | |
120 | 120 | // Get actual dimensions from IFD |
121 | 121 | if ($dimensionType === self::TIF_TAG_IMAGE_HEIGHT) { |
122 | - $this->size = array_merge($this->size, unpack($fieldSize . 'height', $ifdValue)); |
|
122 | + $this->size = array_merge($this->size, unpack($fieldSize.'height', $ifdValue)); |
|
123 | 123 | } elseif ($dimensionType === self::TIF_TAG_IMAGE_WIDTH) { |
124 | - $this->size = array_merge($this->size, unpack($fieldSize . 'width', $ifdValue)); |
|
124 | + $this->size = array_merge($this->size, unpack($fieldSize.'width', $ifdValue)); |
|
125 | 125 | } |
126 | 126 | } |
127 | 127 | } |
@@ -160,8 +160,8 @@ |
||
160 | 160 | */ |
161 | 161 | protected function checkForAppMarker($dataLength, &$index) |
162 | 162 | { |
163 | - if ($this->isApp1Marker($this->getHeaderPart($index, 1), $this->getHeaderPart($index+1, 1)) || |
|
164 | - $this->isAppMarker($this->getHeaderPart($index, 1), $this->getHeaderPart($index+1, 1)) |
|
163 | + if ($this->isApp1Marker($this->getHeaderPart($index, 1), $this->getHeaderPart($index + 1, 1)) || |
|
164 | + $this->isAppMarker($this->getHeaderPart($index, 1), $this->getHeaderPart($index + 1, 1)) |
|
165 | 165 | ) { |
166 | 166 | // Extract length from APP marker |
167 | 167 | list(, $unpacked) = unpack("H*", $this->getHeaderPart($index + self::SHORT_SIZE, 2)); |
@@ -52,15 +52,15 @@ |
||
52 | 52 | { |
53 | 53 | // Set type constraints |
54 | 54 | // Maya version |
55 | - $this->btmhd = self::IFF_MAYA_BTMHD; |
|
56 | - $this->btmhdSize = self::LONG_SIZE * 2; |
|
57 | - $this->byteType = self::PACK_UNSIGNED_LONG; |
|
55 | + $this->btmhd = self::IFF_MAYA_BTMHD; |
|
56 | + $this->btmhdSize = self::LONG_SIZE * 2; |
|
57 | + $this->byteType = self::PACK_UNSIGNED_LONG; |
|
58 | 58 | |
59 | 59 | // Amiga version of IFF |
60 | 60 | if ($this->getSignature() === 'FORM') { |
61 | - $this->btmhd = self::IFF_AMIGA_BTMHD; |
|
62 | - $this->btmhdSize = self::LONG_SIZE; |
|
63 | - $this->byteType = self::PACK_UNSIGNED_SHORT; |
|
61 | + $this->btmhd = self::IFF_AMIGA_BTMHD; |
|
62 | + $this->btmhdSize = self::LONG_SIZE; |
|
63 | + $this->byteType = self::PACK_UNSIGNED_SHORT; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | // Get size from data |
@@ -39,7 +39,7 @@ |
||
39 | 39 | public function isSignatureMatch() |
40 | 40 | { |
41 | 41 | //If current header size is smaller than needed size to match than not a match |
42 | - if (strlen($this->getHeaderPart()) < self::LONG_SIZE+2) { |
|
42 | + if (strlen($this->getHeaderPart()) < self::LONG_SIZE + 2) { |
|
43 | 43 | return false; |
44 | 44 | } |
45 | 45 |