mirror of
https://github.com/danog/PrimeModule.git
synced 2024-11-26 20:34:37 +01:00
Apply fixes from StyleCI
This commit is contained in:
parent
0f2798dc77
commit
323d930610
@ -22,7 +22,7 @@ class Struct
|
|||||||
*
|
*
|
||||||
* Istantiates the PHPStruct class in a static variable
|
* Istantiates the PHPStruct class in a static variable
|
||||||
*
|
*
|
||||||
* @param $format Format string
|
* @param $format Format string
|
||||||
*/
|
*/
|
||||||
public static function constructor()
|
public static function constructor()
|
||||||
{
|
{
|
||||||
@ -36,8 +36,8 @@ class Struct
|
|||||||
*
|
*
|
||||||
* Packs data into bytes
|
* Packs data into bytes
|
||||||
*
|
*
|
||||||
* @param $format Format string
|
* @param $format Format string
|
||||||
* @param $data Parameters to encode
|
* @param $data Parameters to encode
|
||||||
*
|
*
|
||||||
* @return Encoded data
|
* @return Encoded data
|
||||||
*/
|
*/
|
||||||
@ -53,8 +53,8 @@ class Struct
|
|||||||
*
|
*
|
||||||
* Unpacks data into an array
|
* Unpacks data into an array
|
||||||
*
|
*
|
||||||
* @param $format Format string
|
* @param $format Format string
|
||||||
* @param $data Data to decode
|
* @param $data Data to decode
|
||||||
*
|
*
|
||||||
* @return Decoded data
|
* @return Decoded data
|
||||||
*/
|
*/
|
||||||
@ -71,7 +71,7 @@ class Struct
|
|||||||
* Return the size of the struct (and hence of the string) corresponding to the given format.
|
* Return the size of the struct (and hence of the string) corresponding to the given format.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @param $format Format string
|
* @param $format Format string
|
||||||
*
|
*
|
||||||
* @return int with size of the struct.
|
* @return int with size of the struct.
|
||||||
*/
|
*/
|
||||||
|
@ -38,7 +38,7 @@ class StructClass
|
|||||||
*
|
*
|
||||||
* Packs data into bytes
|
* Packs data into bytes
|
||||||
*
|
*
|
||||||
* @param $data Parameters to encode (may contain format string)
|
* @param $data Parameters to encode (may contain format string)
|
||||||
*
|
*
|
||||||
* @return Encoded data
|
* @return Encoded data
|
||||||
*/
|
*/
|
||||||
@ -58,8 +58,8 @@ class StructClass
|
|||||||
*
|
*
|
||||||
* Unpacks data into an array
|
* Unpacks data into an array
|
||||||
*
|
*
|
||||||
* @param $format_maybe_data Format string (may be data if class is istantiated with format string)
|
* @param $format_maybe_data Format string (may be data if class is istantiated with format string)
|
||||||
* @param $data Data to decode
|
* @param $data Data to decode
|
||||||
*
|
*
|
||||||
* @return Decoded data
|
* @return Decoded data
|
||||||
*/
|
*/
|
||||||
@ -81,7 +81,7 @@ class StructClass
|
|||||||
* Return the size of the struct (and hence of the string) corresponding to the given format.
|
* Return the size of the struct (and hence of the string) corresponding to the given format.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @param $format Format string
|
* @param $format Format string
|
||||||
*
|
*
|
||||||
* @return int with size of the struct.
|
* @return int with size of the struct.
|
||||||
*/
|
*/
|
||||||
|
@ -244,8 +244,8 @@ class StructTools
|
|||||||
*
|
*
|
||||||
* Packs data into bytes
|
* Packs data into bytes
|
||||||
*
|
*
|
||||||
* @param $format Format string
|
* @param $format Format string
|
||||||
* @param $data Parameters to encode
|
* @param $data Parameters to encode
|
||||||
*
|
*
|
||||||
* @return Encoded data
|
* @return Encoded data
|
||||||
*/
|
*/
|
||||||
@ -352,8 +352,8 @@ class StructTools
|
|||||||
*
|
*
|
||||||
* Unpacks data into an array
|
* Unpacks data into an array
|
||||||
*
|
*
|
||||||
* @param $format Format string
|
* @param $format Format string
|
||||||
* @param $data Data to decode
|
* @param $data Data to decode
|
||||||
*
|
*
|
||||||
* @return Decoded data
|
* @return Decoded data
|
||||||
*/
|
*/
|
||||||
@ -492,7 +492,7 @@ class StructTools
|
|||||||
*
|
*
|
||||||
* Parses format string.
|
* Parses format string.
|
||||||
*
|
*
|
||||||
* @param $arraycount Array containing the number of chars contained in each element of the array to pack
|
* @param $arraycount Array containing the number of chars contained in each element of the array to pack
|
||||||
*
|
*
|
||||||
* @throws StructException if format string is too long or there aren't enough parameters or if an unkown format or modifier is supplied.
|
* @throws StructException if format string is too long or there aren't enough parameters or if an unkown format or modifier is supplied.
|
||||||
*
|
*
|
||||||
@ -567,7 +567,7 @@ class StructTools
|
|||||||
*
|
*
|
||||||
* Convert a binary string to an array based on the given format string
|
* Convert a binary string to an array based on the given format string
|
||||||
*
|
*
|
||||||
* @param $data Data to convert to array
|
* @param $data Data to convert to array
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
**/
|
**/
|
||||||
@ -620,7 +620,7 @@ class StructTools
|
|||||||
*
|
*
|
||||||
* Pad format string with x format where needed
|
* Pad format string with x format where needed
|
||||||
*
|
*
|
||||||
* @param $format Format string to pad
|
* @param $format Format string to pad
|
||||||
*
|
*
|
||||||
* @return Padded format string
|
* @return Padded format string
|
||||||
**/
|
**/
|
||||||
@ -669,8 +669,8 @@ class StructTools
|
|||||||
* Returns a string containing a big endian binary representation of the given decimal number.
|
* Returns a string containing a big endian binary representation of the given decimal number.
|
||||||
* Also pads binary number with zeros to match given $length
|
* Also pads binary number with zeros to match given $length
|
||||||
*
|
*
|
||||||
* @param $number Decimal number to turn into binary
|
* @param $number Decimal number to turn into binary
|
||||||
* @param $length Length to reach through padding
|
* @param $length Length to reach through padding
|
||||||
*
|
*
|
||||||
* @return binary version of the given number
|
* @return binary version of the given number
|
||||||
**/
|
**/
|
||||||
@ -707,8 +707,8 @@ class StructTools
|
|||||||
*
|
*
|
||||||
* Converts a binary number to a decimal.
|
* Converts a binary number to a decimal.
|
||||||
*
|
*
|
||||||
* @param $binary binary number to turn into decimal
|
* @param $binary binary number to turn into decimal
|
||||||
* @param $unsigned if set to false will interpret binary string as signed
|
* @param $unsigned if set to false will interpret binary string as signed
|
||||||
*
|
*
|
||||||
* @return deciaml version of the given number
|
* @return deciaml version of the given number
|
||||||
**/
|
**/
|
||||||
@ -736,7 +736,7 @@ class StructTools
|
|||||||
*
|
*
|
||||||
* Performs a NOT operation on every bit in the string (by bit I mean a literal 1 or 0)
|
* Performs a NOT operation on every bit in the string (by bit I mean a literal 1 or 0)
|
||||||
*
|
*
|
||||||
* @param $string String to xor
|
* @param $string String to xor
|
||||||
*
|
*
|
||||||
* @return xored string
|
* @return xored string
|
||||||
**/
|
**/
|
||||||
@ -760,8 +760,8 @@ class StructTools
|
|||||||
*
|
*
|
||||||
* Add two binary numbers
|
* Add two binary numbers
|
||||||
*
|
*
|
||||||
* @param $x First binary number
|
* @param $x First binary number
|
||||||
* @param $y Second binary number
|
* @param $y Second binary number
|
||||||
*
|
*
|
||||||
* @return sum of the two numbers
|
* @return sum of the two numbers
|
||||||
**/
|
**/
|
||||||
@ -802,9 +802,9 @@ class StructTools
|
|||||||
* byte string with binary zeros so that the length is the
|
* byte string with binary zeros so that the length is the
|
||||||
* blocksize.
|
* blocksize.
|
||||||
*
|
*
|
||||||
* @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
|
||||||
**/
|
**/
|
||||||
@ -889,9 +889,9 @@ class StructTools
|
|||||||
* Convert a byte string to an integer.
|
* Convert a byte string to an integer.
|
||||||
* This is (essentially) the inverse of num_pack().
|
* This is (essentially) the inverse of num_pack().
|
||||||
*
|
*
|
||||||
* @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
|
||||||
**/
|
**/
|
||||||
@ -929,7 +929,7 @@ class StructTools
|
|||||||
*
|
*
|
||||||
* Get length of each array element.
|
* Get length of each array element.
|
||||||
*
|
*
|
||||||
* @param $array Array to parse
|
* @param $array Array to parse
|
||||||
*
|
*
|
||||||
* @return array with lengths
|
* @return array with lengths
|
||||||
**/
|
**/
|
||||||
@ -947,7 +947,7 @@ class StructTools
|
|||||||
*
|
*
|
||||||
* Get total length of every array element.
|
* Get total length of every array element.
|
||||||
*
|
*
|
||||||
* @param $array Array to parse
|
* @param $array Array to parse
|
||||||
*
|
*
|
||||||
* @return int with the total length
|
* @return int with the total length
|
||||||
**/
|
**/
|
||||||
@ -966,9 +966,9 @@ class StructTools
|
|||||||
*
|
*
|
||||||
* Generate range
|
* Generate range
|
||||||
*
|
*
|
||||||
* @param $start Beginning of the range (or stop if no other params are specified)
|
* @param $start Beginning of the range (or stop if no other params are specified)
|
||||||
* @param $stop End of the range
|
* @param $stop End of the range
|
||||||
* @param $step Step to use in range
|
* @param $step Step to use in range
|
||||||
*
|
*
|
||||||
* @return array with the range
|
* @return array with the range
|
||||||
**/
|
**/
|
||||||
@ -999,7 +999,7 @@ class StructTools
|
|||||||
*
|
*
|
||||||
* Get the length of a string or of an array
|
* Get the length of a string or of an array
|
||||||
*
|
*
|
||||||
* @param $input String or array to parse
|
* @param $input String or array to parse
|
||||||
*
|
*
|
||||||
* @return int with the length
|
* @return int with the length
|
||||||
**/
|
**/
|
||||||
|
Loading…
Reference in New Issue
Block a user