Completed
Push — master ( b90e1d...11acf7 )
by Nelson
05:52
created

String   A

Complexity

Total Complexity 14

Size/Duplication

Total Lines 163
Duplicated Lines 11.04 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 64.1%

Importance

Changes 4
Bugs 1 Features 1
Metric Value
dl 18
loc 163
ccs 25
cts 39
cp 0.641
rs 10
c 4
b 1
f 1
wmc 14
lcom 1
cbo 2

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
/**
3
 * PHP: Nelson Martell Library file
4
 *
5
 * Content:
6
 * - Compatibility alias for `NelsonMartell\Extensions\Text` class in PHP <= 7.0 as `String`.
7
 *
8
 * Copyright © 2015-2016 Nelson Martell (http://nelson6e65.github.io)
9
 *
10
 * Licensed under The MIT License (MIT)
11
 * For full copyright and license information, please see the LICENSE
12
 * Redistributions of files must retain the above copyright notice.
13
 *
14
 * @copyright 2015-2017 Nelson Martell
15
 * @link      http://nelson6e65.github.io/php_nml/
16
 * @since     v0.7.0
17
 * @license   http://www.opensource.org/licenses/mit-license.php The MIT License (MIT)
18
 * */
19
20
use NelsonMartell\Extensions\Text;
21
22
if (PHP_VERSION_ID < 70000) {
23
    class_alias(Text::class, 'NelsonMartell\Extensions\String');
24
}
25