Test Failed
Branch main (fda838)
by Rafael
50:22
created

AccountingAccount::getNomUrl()   F

Complexity

Conditions 32
Paths > 20000

Size

Total Lines 97
Code Lines 66

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 32
eloc 66
nc 491520
nop 8
dl 0
loc 97
rs 0
c 0
b 0
f 0

How to fix   Long Method    Complexity    Many Parameters   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

Many Parameters

Methods with many parameters are not only hard to understand, but their parameters also often become inconsistent when you need more, or different data.

There are several approaches to avoid long parameter lists:

1
<?php
2
3
/* Copyright (C) 2013-2014  Olivier Geffroy      <[email protected]>
4
 * Copyright (C) 2013-2024  Alexandre Spangaro   <[email protected]>
5
 * Copyright (C) 2013-2021  Florian Henry        <[email protected]>
6
 * Copyright (C) 2014       Juanjo Menent        <[email protected]>
7
 * Copyright (C) 2015       Ari Elbaz (elarifr)  <[email protected]>
8
 * Copyright (C) 2018       Frédéric France      <[email protected]>
9
 * Copyright (C) 2024		MDW							<[email protected]>
10
 *
11
 * This program is free software; you can redistribute it and/or modify
12
 * it under the terms of the GNU General Public License as published by
13
 * the Free Software Foundation; either version 3 of the License, or
14
 * (at your option) any later version.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU General Public License
22
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
23
 */
24
25
/**
26
 *  \file       htdocs/accountancy/class/accountingaccount.class.php
27
 *  \ingroup    Accountancy (Double entries)
28
 *  \brief      File of class to manage accounting accounts
29
 *
30
 * Replaced by Deprecated/Modules/Accounting/Model/AccountingAccount.php
31
 */
32