Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add phpdoc and clean phpstan baseline #31717

Merged
merged 17 commits into from
Nov 7, 2024
Merged

Conversation

frederic34
Copy link
Member

No description provided.

@@ -211,7 +211,7 @@ public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle
}
if ($withlabel == 2 && !empty($this->nature)) {
$key = $langs->trans("AccountingJournalType".$this->nature);
$transferlabel = ($this->nature && $key != "AccountingJournalType".strtoupper($langs->trans($this->nature)) ? $key : $this->label);
$transferlabel = ($key != "AccountingJournalType".strtoupper($langs->trans($this->nature)) ? $key : $this->label);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you confirm we can remove the test on $this->nature
The test was here to avoid error when doing $langs->trans($this->nature) when ->nature is not set or empty.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already a test at line 212

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Nov 6, 2024
@eldy eldy merged commit 41a4f42 into Dolibarr:develop Nov 7, 2024
7 checks passed
@frederic34 frederic34 deleted the phpstan_clean branch November 7, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Some questions or discussions are opened and wait answers of author or other people to be processed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants