Skip to content

Commit

Permalink
Fix all phpdoc blocks (tecnickcom#345)
Browse files Browse the repository at this point in the history
* Add a @SInCE on a function

* Refresh phpdoc blocks

Using `@param (\$[a-zA-Z0-9_]+)\s\(([a-z]+)\)`

* Fix phpdoc blocks

* Fix typos and phpdoc mistakes

* More phpdoc block fixes

Co-authored-by: Nicola Asuni <[email protected]>
  • Loading branch information
williamdes and nicolaasuni authored Mar 28, 2021
1 parent 03629b7 commit 4f1d629
Show file tree
Hide file tree
Showing 14 changed files with 1,719 additions and 1,710 deletions.
16 changes: 8 additions & 8 deletions examples/example_010.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ class MC_TCPDF extends TCPDF {

/**
* Print chapter
* @param $num (int) chapter number
* @param $title (string) chapter title
* @param $file (string) name of the file containing the chapter body
* @param $mode (boolean) if true the chapter body is in HTML, otherwise in simple text.
* @param int $num chapter number
* @param string $title chapter title
* @param string $file name of the file containing the chapter body
* @param boolean $mode if true the chapter body is in HTML, otherwise in simple text.
* @public
*/
public function PrintChapter($num, $title, $file, $mode=false) {
Expand All @@ -56,8 +56,8 @@ public function PrintChapter($num, $title, $file, $mode=false) {

/**
* Set chapter title
* @param $num (int) chapter number
* @param $title (string) chapter title
* @param int $num chapter number
* @param string $title chapter title
* @public
*/
public function ChapterTitle($num, $title) {
Expand All @@ -69,8 +69,8 @@ public function ChapterTitle($num, $title) {

/**
* Print chapter body
* @param $file (string) name of the file containing the chapter body
* @param $mode (boolean) if true the chapter body is in HTML, otherwise in simple text.
* @param string $file name of the file containing the chapter body
* @param boolean $mode if true the chapter body is in HTML, otherwise in simple text.
* @public
*/
public function ChapterBody($file, $mode=false) {
Expand Down
116 changes: 58 additions & 58 deletions include/barcodes/datamatrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class Datamatrix {
/**
* This is the class constructor.
* Creates a datamatrix object
* @param $code (string) Code to represent using Datamatrix.
* @param string $code Code to represent using Datamatrix.
* @public
*/
public function __construct($code) {
Expand Down Expand Up @@ -355,11 +355,11 @@ public function getBarcodeArray() {

/**
* Product of two numbers in a Power-of-Two Galois Field
* @param $a (int) first number to multiply.
* @param $b (int) second number to multiply.
* @param $log (array) Log table.
* @param $alog (array) Anti-Log table.
* @param $gf (array) Number of Factors of the Reed-Solomon polynomial.
* @param int $a first number to multiply.
* @param int $b second number to multiply.
* @param array $log Log table.
* @param array $alog Anti-Log table.
* @param array $gf Number of Factors of the Reed-Solomon polynomial.
* @return int product
* @protected
*/
Expand All @@ -372,12 +372,12 @@ protected function getGFProduct($a, $b, $log, $alog, $gf) {

/**
* Add error correction codewords to data codewords array (ANNEX E).
* @param $wd (array) Array of datacodewords.
* @param $nb (int) Number of blocks.
* @param $nd (int) Number of data codewords per block.
* @param $nc (int) Number of correction codewords per block.
* @param $gf (int) numner of fields on log/antilog table (power of 2).
* @param $pp (int) The value of its prime modulus polynomial (301 for ECC200).
* @param array $wd Array of datacodewords.
* @param int $nb Number of blocks.
* @param int $nd Number of data codewords per block.
* @param int $nc Number of correction codewords per block.
* @param int $gf numner of fields on log/antilog table (power of 2).
* @param int $pp The value of its prime modulus polynomial (301 for ECC200).
* @return array data codewords + error codewords
* @protected
*/
Expand Down Expand Up @@ -438,9 +438,9 @@ protected function getErrorCorrection($wd, $nb, $nd, $nc, $gf=256, $pp=301) {

/**
* Return the 253-state codeword
* @param $cwpad (int) Pad codeword.
* @param $cwpos (int) Number of data codewords from the beginning of encoded data.
* @return pad codeword
* @param int $cwpad Pad codeword.
* @param int $cwpos Number of data codewords from the beginning of encoded data.
* @return int pad codeword
* @protected
*/
protected function get253StateCodeword($cwpad, $cwpos) {
Expand All @@ -453,9 +453,9 @@ protected function get253StateCodeword($cwpad, $cwpos) {

/**
* Return the 255-state codeword
* @param $cwpad (int) Pad codeword.
* @param $cwpos (int) Number of data codewords from the beginning of encoded data.
* @return pad codeword
* @param int $cwpad Pad codeword.
* @param int $cwpos Number of data codewords from the beginning of encoded data.
* @return int pad codeword
* @protected
*/
protected function get255StateCodeword($cwpad, $cwpos) {
Expand All @@ -468,8 +468,8 @@ protected function get255StateCodeword($cwpad, $cwpos) {

/**
* Returns true if the char belongs to the selected mode
* @param $chr (int) Character (byte) to check.
* @param $mode (int) Current encoding mode.
* @param int $chr Character (byte) to check.
* @param int $mode Current encoding mode.
* @return boolean true if the char is of the selected mode.
* @protected
*/
Expand Down Expand Up @@ -514,9 +514,9 @@ protected function isCharMode($chr, $mode) {

/**
* The look-ahead test scans the data to be encoded to find the best mode (Annex P - steps from J to S).
* @param $data (string) data to encode
* @param $pos (int) current position
* @param $mode (int) current encoding mode
* @param string $data data to encode
* @param int $pos current position
* @param int $mode current encoding mode
* @return int encoding mode
* @protected
*/
Expand Down Expand Up @@ -646,8 +646,8 @@ protected function lookAheadTest($data, $pos, $mode) {

/**
* Get the switching codeword to a new encoding mode (latch codeword)
* @param $mode (int) New encoding mode.
* @return (int) Switch codeword.
* @param int $mode New encoding mode.
* @return int Switch codeword.
* @protected
*/
protected function getSwitchEncodingCodeword($mode) {
Expand Down Expand Up @@ -685,7 +685,7 @@ protected function getSwitchEncodingCodeword($mode) {

/**
* Choose the minimum matrix size and return the max number of data codewords.
* @param $numcw (int) Number of current codewords.
* @param int $numcw Number of current codewords.
* @return number of data codewords in matrix
* @protected
*/
Expand All @@ -700,7 +700,7 @@ protected function getMaxDataCodewords($numcw) {

/**
* Get high level encoding using the minimum symbol data characters for ECC 200
* @param $data (string) data to encode
* @param string $data data to encode
* @return array of codewords
* @protected
*/
Expand Down Expand Up @@ -970,13 +970,13 @@ protected function getHighLevelEncoding($data) {
/**
* Places "chr+bit" with appropriate wrapping within array[].
* (Annex F - ECC 200 symbol character placement)
* @param $marr (array) Array of symbols.
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param $row (int) Row number.
* @param $col (int) Column number.
* @param $chr (int) Char byte.
* @param $bit (int) Bit.
* @param array $marr Array of symbols.
* @param int $nrow Number of rows.
* @param int $ncol Number of columns.
* @param int $row Row number.
* @param int $col Column number.
* @param int $chr Char byte.
* @param int $bit Bit.
* @return array
* @protected
*/
Expand All @@ -996,12 +996,12 @@ protected function placeModule($marr, $nrow, $ncol, $row, $col, $chr, $bit) {
/**
* Places the 8 bits of a utah-shaped symbol character.
* (Annex F - ECC 200 symbol character placement)
* @param $marr (array) Array of symbols.
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param $row (int) Row number.
* @param $col (int) Column number.
* @param $chr (int) Char byte.
* @param array $marr Array of symbols.
* @param int $nrow Number of rows.
* @param int $ncol Number of columns.
* @param int $row Row number.
* @param int $col Column number.
* @param int $chr Char byte.
* @return array
* @protected
*/
Expand All @@ -1020,10 +1020,10 @@ protected function placeUtah($marr, $nrow, $ncol, $row, $col, $chr) {
/**
* Places the 8 bits of the first special corner case.
* (Annex F - ECC 200 symbol character placement)
* @param $marr (array) Array of symbols.
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param $chr (int) Char byte.
* @param array $marr Array of symbols.
* @param int $nrow Number of rows.
* @param int $ncol Number of columns.
* @param int $chr Char byte.
* @return array
* @protected
*/
Expand All @@ -1042,10 +1042,10 @@ protected function placeCornerA($marr, $nrow, $ncol, $chr) {
/**
* Places the 8 bits of the second special corner case.
* (Annex F - ECC 200 symbol character placement)
* @param $marr (array) Array of symbols.
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param $chr (int) Char byte.
* @param array $marr Array of symbols.
* @param int $nrow Number of rows.
* @param int $ncol Number of columns.
* @param int $chr Char byte.
* @return array
* @protected
*/
Expand All @@ -1064,10 +1064,10 @@ protected function placeCornerB($marr, $nrow, $ncol, $chr) {
/**
* Places the 8 bits of the third special corner case.
* (Annex F - ECC 200 symbol character placement)
* @param $marr (array) Array of symbols.
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param $chr (int) Char byte.
* @param array $marr Array of symbols.
* @param int $nrow Number of rows.
* @param int $ncol Number of columns.
* @param int $chr Char byte.
* @return array
* @protected
*/
Expand All @@ -1086,10 +1086,10 @@ protected function placeCornerC($marr, $nrow, $ncol, $chr) {
/**
* Places the 8 bits of the fourth special corner case.
* (Annex F - ECC 200 symbol character placement)
* @param $marr (array) Array of symbols.
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param $chr (int) Char byte.
* @param array $marr Array of symbols.
* @param int $nrow Number of rows.
* @param int $ncol Number of columns.
* @param int $chr Char byte.
* @return array
* @protected
*/
Expand All @@ -1108,8 +1108,8 @@ protected function placeCornerD($marr, $nrow, $ncol, $chr) {
/**
* Build a placement map.
* (Annex F - ECC 200 symbol character placement)
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param int $nrow Number of rows.
* @param int $ncol Number of columns.
* @return array
* @protected
*/
Expand Down
26 changes: 13 additions & 13 deletions include/barcodes/pdf417.php
Original file line number Diff line number Diff line change
Expand Up @@ -523,10 +523,10 @@ class PDF417 {
/**
* This is the class constructor.
* Creates a PDF417 object
* @param $code (string) code to represent using PDF417
* @param $ecl (int) error correction level (0-8); default -1 = automatic correction level
* @param $aspectratio (float) the width to height of the symbol (excluding quiet zones)
* @param $macro (array) information for macro block
* @param string $code code to represent using PDF417
* @param int $ecl error correction level (0-8); default -1 = automatic correction level
* @param float $aspectratio the width to height of the symbol (excluding quiet zones)
* @param array $macro information for macro block
* @public
*/
public function __construct($code, $ecl=-1, $aspectratio=2, $macro=array()) {
Expand Down Expand Up @@ -734,8 +734,8 @@ public function getBarcodeArray() {

/**
* Returns the error correction level (0-8) to be used
* @param $ecl (int) error correction level
* @param $numcw (int) number of data codewords
* @param int $ecl error correction level
* @param int $numcw number of data codewords
* @return int error correction level
* @protected
*/
Expand Down Expand Up @@ -772,8 +772,8 @@ protected function getErrorCorrectionLevel($ecl, $numcw) {

/**
* Returns the error correction codewords
* @param $cw (array) array of codewords including Symbol Length Descriptor and pad
* @param $ecl (int) error correction level 0-8
* @param array $cw array of codewords including Symbol Length Descriptor and pad
* @param int $ecl error correction level 0-8
* @return array of error correction codewords
* @protected
*/
Expand Down Expand Up @@ -809,8 +809,8 @@ protected function getErrorCorrection($cw, $ecl) {

/**
* Create array of sequences from input
* @param $code (string) code
* @return bidimensional array containing characters and classification
* @param string $code code
* @return array bi-dimensional array containing characters and classification
* @protected
*/
protected function getInputSequences($code) {
Expand Down Expand Up @@ -864,9 +864,9 @@ protected function getInputSequences($code) {

/**
* Compact data by mode.
* @param $mode (int) compaction mode number
* @param $code (string) data to compact
* @param $addmode (boolean) if true add the mode codeword at first position
* @param int $mode compaction mode number
* @param string $code data to compact
* @param boolean $addmode if true add the mode codeword at first position
* @return array of codewords
* @protected
*/
Expand Down
Loading

0 comments on commit 4f1d629

Please sign in to comment.