From 5bcaa834c9b98c1d00389f6cc2fb3df3ca2d3a23 Mon Sep 17 00:00:00 2001 From: MDW Date: Fri, 8 Mar 2024 15:23:11 +0100 Subject: [PATCH 1/5] Fix: PHPDoc annotations in unappropriate comment # Fix: PHPDoc annotations in unappropriate comment PHPDoc annotations need to be in /** */ or // comments. Fixed that (change type, move comment, add suppress directive) --- htdocs/api/admin/explorer_withredoc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/api/admin/explorer_withredoc.php b/htdocs/api/admin/explorer_withredoc.php index 8c94e7a6f620e..fa370d54c9c31 100644 --- a/htdocs/api/admin/explorer_withredoc.php +++ b/htdocs/api/admin/explorer_withredoc.php @@ -14,14 +14,14 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * - * @deprecated Old explorer. Not using Swagger. See instead explorer in htdocs/api/index.php. */ /** * \defgroup api Module DolibarrApi * \brief API explorer using the swagger.json file * \file htdocs/api/admin/explorer_withredoc.php + * + * @deprecated Old explorer. Not using Swagger. See instead explorer in htdocs/api/index.php. */ require_once '../../main.inc.php'; From 9f8091fd5a98ba7e8f18843b96141bf41d2412b5 Mon Sep 17 00:00:00 2001 From: MDW Date: Fri, 8 Mar 2024 15:23:13 +0100 Subject: [PATCH 2/5] Fix: PHPDoc annotations in unappropriate comment # Fix: PHPDoc annotations in unappropriate comment PHPDoc annotations need to be in /** */ or // comments. Fixed that (change type, move comment, add suppress directive) --- .../class/bonprelevement.class.php | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 9b3b16b60fc0a..abda85280a0a2 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -92,7 +92,7 @@ class BonPrelevement extends CommonObject */ public $file; - /* + /** * @var string filename */ public $filename; @@ -146,21 +146,21 @@ class BonPrelevement extends CommonObject /** * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ - public $fields=array( - 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>0,), - 'ref' => array('type'=>'varchar(12)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>15, 'notnull'=>0, 'visible'=>-1, 'csslist'=>'tdoverflowmax150', 'showoncombobox'=>'1',), - 'datec' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>25, 'notnull'=>0, 'visible'=>-1,), - 'amount' => array('type'=>'double(24,8)', 'label'=>'Amount', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>-1,), - 'statut' => array('type'=>'smallint(6)', 'label'=>'Statut', 'enabled'=>'1', 'position'=>500, 'notnull'=>0, 'visible'=>-1, 'arrayofkeyval'=>array(0=>'Wait', 1=>'Transfered', 2=>'Credited')), - 'credite' => array('type'=>'smallint(6)', 'label'=>'Credite', 'enabled'=>'1', 'position'=>40, 'notnull'=>0, 'visible'=>-1,), - 'note' => array('type'=>'text', 'label'=>'Note', 'enabled'=>'1', 'position'=>45, 'notnull'=>0, 'visible'=>-1,), - 'date_trans' => array('type'=>'datetime', 'label'=>'Datetrans', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>-1,), - 'method_trans' => array('type'=>'smallint(6)', 'label'=>'Methodtrans', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>-1,), - 'fk_user_trans' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fkusertrans', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>-1, 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150',), - 'date_credit' => array('type'=>'datetime', 'label'=>'Datecredit', 'enabled'=>'1', 'position'=>65, 'notnull'=>0, 'visible'=>-1,), - 'fk_user_credit' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fkusercredit', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>-1, 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150',), - 'type' => array('type'=>'varchar(16)', 'label'=>'Type', 'enabled'=>'1', 'position'=>75, 'notnull'=>0, 'visible'=>-1,), - 'fk_bank_account' => array('type'=>'integer', 'label'=>'Fkbankaccount', 'enabled'=>'1', 'position'=>80, 'notnull'=>0, 'visible'=>-1, 'css'=>'maxwidth500 widthcentpercentminusxx',), + public $fields = array( + 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 10, 'notnull' => 1, 'visible' => 0,), + 'ref' => array('type' => 'varchar(12)', 'label' => 'Ref', 'enabled' => '1', 'position' => 15, 'notnull' => 0, 'visible' => -1, 'csslist' => 'tdoverflowmax150', 'showoncombobox' => '1',), + 'datec' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => '1', 'position' => 25, 'notnull' => 0, 'visible' => -1,), + 'amount' => array('type' => 'double(24,8)', 'label' => 'Amount', 'enabled' => '1', 'position' => 30, 'notnull' => 0, 'visible' => -1,), + 'statut' => array('type' => 'smallint(6)', 'label' => 'Statut', 'enabled' => '1', 'position' => 500, 'notnull' => 0, 'visible' => -1, 'arrayofkeyval' => array(0 => 'Wait', 1 => 'Transfered', 2 => 'Credited')), + 'credite' => array('type' => 'smallint(6)', 'label' => 'Credite', 'enabled' => '1', 'position' => 40, 'notnull' => 0, 'visible' => -1,), + 'note' => array('type' => 'text', 'label' => 'Note', 'enabled' => '1', 'position' => 45, 'notnull' => 0, 'visible' => -1,), + 'date_trans' => array('type' => 'datetime', 'label' => 'Datetrans', 'enabled' => '1', 'position' => 50, 'notnull' => 0, 'visible' => -1,), + 'method_trans' => array('type' => 'smallint(6)', 'label' => 'Methodtrans', 'enabled' => '1', 'position' => 55, 'notnull' => 0, 'visible' => -1,), + 'fk_user_trans' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'Fkusertrans', 'enabled' => '1', 'position' => 60, 'notnull' => 0, 'visible' => -1, 'css' => 'maxwidth500 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150',), + 'date_credit' => array('type' => 'datetime', 'label' => 'Datecredit', 'enabled' => '1', 'position' => 65, 'notnull' => 0, 'visible' => -1,), + 'fk_user_credit' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'Fkusercredit', 'enabled' => '1', 'position' => 70, 'notnull' => 0, 'visible' => -1, 'css' => 'maxwidth500 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150',), + 'type' => array('type' => 'varchar(16)', 'label' => 'Type', 'enabled' => '1', 'position' => 75, 'notnull' => 0, 'visible' => -1,), + 'fk_bank_account' => array('type' => 'integer', 'label' => 'Fkbankaccount', 'enabled' => '1', 'position' => 80, 'notnull' => 0, 'visible' => -1, 'css' => 'maxwidth500 widthcentpercentminusxx',), ); public $rowid; public $ref; @@ -1565,7 +1565,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss global $action, $hookmanager; $hookmanager->initHooks(array('banktransferdao')); - $parameters = array('id'=>$this->id, 'getnomurl' => &$result); + $parameters = array('id' => $this->id, 'getnomurl' => &$result); $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook > 0) { $result = $hookmanager->resPrint; From dafbbc8b6f1044fcad22f6e06686c821f17659dc Mon Sep 17 00:00:00 2001 From: MDW Date: Fri, 8 Mar 2024 15:23:15 +0100 Subject: [PATCH 3/5] Fix: PHPDoc annotations in unappropriate comment # Fix: PHPDoc annotations in unappropriate comment PHPDoc annotations need to be in /** */ or // comments. Fixed that (change type, move comment, add suppress directive) --- htdocs/core/class/dolreceiptprinter.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 4d8c8b0f78557..0ac7bba1884d6 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -129,7 +129,7 @@ class dolReceiptPrinter extends Printer */ public $db; - /* + /** * @var string[] array of tags */ public $tags; @@ -800,7 +800,7 @@ public function sendToPrinter($object, $templateid, $printerid) $this->printer->text($title.$spaces.str_pad(price($object->total_ttc), 10, ' ', STR_PAD_LEFT)."\n"); break; case 'DOL_PRINT_CURR_DATE': - if (strlen($vals[$tplline]['value'])<2) { + if (strlen($vals[$tplline]['value']) < 2) { $this->printer->text(date('d/m/Y H:i:s')."\n"); } else { $this->printer->text(date($vals[$tplline]['value'])."\n"); @@ -1056,7 +1056,8 @@ public function initPrinter($printerid) $this->connector = new CupsPrintConnector($parameter); break; default: - $found = false;; + $found = false; + ; break; } if ($found) { From 980749e9ac04f50aab198c4460ecafc952bfee3a Mon Sep 17 00:00:00 2001 From: MDW Date: Fri, 8 Mar 2024 15:23:17 +0100 Subject: [PATCH 4/5] Fix: PHPDoc annotations in unappropriate comment # Fix: PHPDoc annotations in unappropriate comment PHPDoc annotations need to be in /** */ or // comments. Fixed that (change type, move comment, add suppress directive) --- htdocs/core/class/rssparser.class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php index d8ae597f9d36e..c16cc2d300779 100644 --- a/htdocs/core/class/rssparser.class.php +++ b/htdocs/core/class/rssparser.class.php @@ -503,13 +503,13 @@ public function parser($urlRSS, $maxNb = 0, $cachedelay = 60, $cachedir = '') // Add record to result array $this->_rssarray[$i] = array( - 'link'=>$itemLink, - 'title'=>$itemTitle, - 'description'=>$itemDescription, - 'pubDate'=>$itemPubDate, - 'category'=>$itemCategory, - 'id'=>$itemId, - 'author'=>$itemAuthor + 'link' => $itemLink, + 'title' => $itemTitle, + 'description' => $itemDescription, + 'pubDate' => $itemPubDate, + 'category' => $itemCategory, + 'id' => $itemId, + 'author' => $itemAuthor ); //var_dump($this->_rssarray); @@ -812,7 +812,7 @@ private function getAtomImageUrl(array $feed) } } - +// @phan-suppress PhanPluginPHPDocInWrongComment /* * A method for the xml_set_external_entity_ref_handler() * From ec5e55567d719e18740a2c95bdfc78573490b93c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Mar 2024 21:26:39 +0100 Subject: [PATCH 5/5] Update dolreceiptprinter.class.php --- htdocs/core/class/dolreceiptprinter.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 0ac7bba1884d6..bc5d8fc9d4e66 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -1057,7 +1057,6 @@ public function initPrinter($printerid) break; default: $found = false; - ; break; } if ($found) {