mirror of
https://github.com/danog/PHPStruct.git
synced 2024-11-26 19:54:38 +01:00
Apply fixes from StyleCI
This commit is contained in:
parent
cebabbce68
commit
9a774d50b7
@ -141,7 +141,7 @@ class StructTools
|
|||||||
'q' => 'int',
|
'q' => 'int',
|
||||||
'Q' => 'int',
|
'Q' => 'int',
|
||||||
|
|
||||||
// Floating point formats
|
// Floating point formats
|
||||||
'f' => 'float',
|
'f' => 'float',
|
||||||
'd' => 'float',
|
'd' => 'float',
|
||||||
|
|
||||||
@ -381,6 +381,7 @@ class StructTools
|
|||||||
if ($command['modifiers']['FORMAT_ENDIANNESS'] != $command['modifiers']['BIG_ENDIAN']) {
|
if ($command['modifiers']['FORMAT_ENDIANNESS'] != $command['modifiers']['BIG_ENDIAN']) {
|
||||||
$dataarray[$command['datakey']] = strrev($dataarray[$command['datakey']]);
|
$dataarray[$command['datakey']] = strrev($dataarray[$command['datakey']]);
|
||||||
} // Reverse if wrong endianness
|
} // Reverse if wrong endianness
|
||||||
|
|
||||||
try {
|
try {
|
||||||
switch ($command['phpformat']) {
|
switch ($command['phpformat']) {
|
||||||
case 'p':
|
case 'p':
|
||||||
@ -801,7 +802,7 @@ class StructTools
|
|||||||
*
|
*
|
||||||
* @param $n Number to pack
|
* @param $n Number to pack
|
||||||
* @param $blocksize Block size
|
* @param $blocksize Block size
|
||||||
* @param $unsigned Boolean that determines whether to work in signed or unsigned mode
|
* @param $unsigned Boolean that determines whether to work in signed or unsigned mode
|
||||||
*
|
*
|
||||||
* @return Byte string
|
* @return Byte string
|
||||||
**/
|
**/
|
||||||
@ -875,7 +876,7 @@ class StructTools
|
|||||||
*
|
*
|
||||||
* @param $s Data to unpack
|
* @param $s Data to unpack
|
||||||
* @param $blocksize Block size
|
* @param $blocksize Block size
|
||||||
* @param $unsigned Boolean that determines whether to work in signed or unsigned mode
|
* @param $unsigned Boolean that determines whether to work in signed or unsigned mode
|
||||||
*
|
*
|
||||||
* @return float or int with the unpack value
|
* @return float or int with the unpack value
|
||||||
**/
|
**/
|
||||||
|
Loading…
Reference in New Issue
Block a user