Passed
Pull Request — master (#4)
by Michael
03:20
created

Utility::truncateHtml()   F

Complexity

Conditions 19
Paths 194

Size

Total Lines 89
Code Lines 47

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 19
eloc 47
c 0
b 0
f 0
nc 194
nop 5
dl 0
loc 89
rs 3.7333

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
namespace XoopsModules\Blocksadmin;
4
5
/*
6
 Utility Class Definition
7
8
 You may not change or alter any portion of this comment or credits of
9
 supporting developers from this source code or any supporting source code
10
 which is considered copyrighted (c) material of the original comment or credit
11
 authors.
12
13
 This program is distributed in the hope that it will be useful, but
14
 WITHOUT ANY WARRANTY; without even the implied warranty of
15
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
 */
17
18
/**
19
 * Module:  xSitemap
20
 *
21
 * @package      \module\xsitemap\class
22
 * @license      http://www.fsf.org/copyleft/gpl.html GNU public license
23
 * @copyright    https://xoops.org 2001-2017 &copy; XOOPS Project
24
 * @author       ZySpec <[email protected]>
25
 * @author       Mamba <[email protected]>
26
 * @since        File available since version 1.54
27
 */
28
29
use XoopsModules\Blocksadmin;
30
use XoopsModules\Blocksadmin\Common;
31
32
/**
33
 * Class Utility
34
 */
35
class Utility extends Common\SysUtility
36
{
37
    //--------------- Custom module methods -----------------------------
38
39
}
40