@@ -17,11 +17,9 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | if($endianness === true){ // big-endian |
| 19 | 19 | $f = 'N'; |
| 20 | - } |
|
| 21 | - elseif($endianness === false){ // little-endian |
|
| 20 | + } elseif($endianness === false){ // little-endian |
|
| 22 | 21 | $f = 'V'; |
| 23 | - } |
|
| 24 | - else{ // machine byte order |
|
| 22 | + } else{ // machine byte order |
|
| 25 | 23 | $f = 'L'; |
| 26 | 24 | } |
| 27 | 25 | |
@@ -34,11 +32,9 @@ discard block |
||
| 34 | 32 | |
| 35 | 33 | if($endianness === true){ // big-endian |
| 36 | 34 | $f = 'J'; |
| 37 | - } |
|
| 38 | - elseif($endianness === false){ // little-endian |
|
| 35 | + } elseif($endianness === false){ // little-endian |
|
| 39 | 36 | $f = 'P'; |
| 40 | - } |
|
| 41 | - else{ // machine byte order |
|
| 37 | + } else{ // machine byte order |
|
| 42 | 38 | $f = 'Q'; |
| 43 | 39 | } |
| 44 | 40 | |
@@ -51,11 +47,9 @@ discard block |
||
| 51 | 47 | |
| 52 | 48 | if($endianness === true){ // big-endian |
| 53 | 49 | $f = 'G'; |
| 54 | - } |
|
| 55 | - elseif($endianness === false){ // little-endian |
|
| 50 | + } elseif($endianness === false){ // little-endian |
|
| 56 | 51 | $f = 'g'; |
| 57 | - } |
|
| 58 | - else{ // machine byte order |
|
| 52 | + } else{ // machine byte order |
|
| 59 | 53 | $f = 'f'; |
| 60 | 54 | } |
| 61 | 55 | |
@@ -183,8 +183,7 @@ discard block |
||
| 183 | 183 | # $this->errors[$file->Hash] = $file; |
| 184 | 184 | $this->logger->error('error writing '.$dest); |
| 185 | 185 | |
| 186 | - } |
|
| 187 | - elseif($bytesWritten !== $file->SizeUncompressed){ |
|
| 186 | + } elseif($bytesWritten !== $file->SizeUncompressed){ |
|
| 188 | 187 | # $this->warnings[$file->Hash] = $file; |
| 189 | 188 | // throw new WSDBException |
| 190 | 189 | $this->logger->warning( |
@@ -220,11 +219,9 @@ discard block |
||
| 220 | 219 | // $Flags is supposed to be a bitmask |
| 221 | 220 | if($file->Flags === 1){ // no compression |
| 222 | 221 | return $content; |
| 223 | - } |
|
| 224 | - elseif($file->Flags === 3){ // deflate (probably unsed) |
|
| 222 | + } elseif($file->Flags === 3){ // deflate (probably unsed) |
|
| 225 | 223 | return gzinflate($content); |
| 226 | - } |
|
| 227 | - elseif($file->Flags === 5){ // lzma (requires ext-xz) |
|
| 224 | + } elseif($file->Flags === 5){ // lzma (requires ext-xz) |
|
| 228 | 225 | // https://bitbucket.org/mugadr_m/wildstar-studio/issues/23 |
| 229 | 226 | return xzdecode(substr($content, 0, 5).pack('Q', $file->SizeUncompressed).substr($content, 5)); |
| 230 | 227 | } |
@@ -103,8 +103,7 @@ |
||
| 103 | 103 | |
| 104 | 104 | try{ |
| 105 | 105 | $map_tiler->process(mapdir.'/'.$map.'.png', tiledir.'/'.$dir); |
| 106 | - } |
|
| 107 | - catch(ImagetilerException $e){ |
|
| 106 | + } catch(ImagetilerException $e){ |
|
| 108 | 107 | echo $e->getMessage(); |
| 109 | 108 | echo $e->getTraceAsString(); |
| 110 | 109 | } |