Test Failed
Branch main (fda838)
by Rafael
54:38 queued 11s
created

AccountancyCategory::update()   F

Complexity

Conditions 23
Paths > 20000

Size

Total Lines 71
Code Lines 46

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 23
eloc 46
nc 2097152
nop 2
dl 0
loc 71
rs 0
c 0
b 0
f 0

How to fix   Long Method    Complexity   

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:

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