testRuleAppliesMultipleIfConditions.php ➔ testRuleAppliesMultipleIfConditions()   B
last analyzed

Complexity

Conditions 8
Paths 4

Size

Total Lines 9

Duplication

Lines 3
Ratio 33.33 %

Importance

Changes 0
Metric Value
cc 8
nc 4
nop 0
dl 3
loc 9
rs 8.4444
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of PHP Mess Detector.
4
 *
5
 * Copyright (c) Manuel Pichler <[email protected]>.
6
 * All rights reserved.
7
 *
8
 * Licensed under BSD License
9
 * For full copyright and license information, please see the LICENSE file.
10
 * Redistributions of files must retain the above copyright notice.
11
 *
12
 * @author Manuel Pichler <[email protected]>
13
 * @copyright Manuel Pichler. All rights reserved.
14
 * @license https://opensource.org/licenses/bsd-license.php BSD License
15
 * @link http://phpmd.org/
16
 */
17
18
function testRuleAppliesMultipleIfConditions()
19
{
20
    if (1 || 0) { // not applied
21
        // ...
22
    }
23 View Code Duplication
    if (1 == 1 || 1 && 0 and 4 % 2 || ($foo = 1) xor 5 * 4 * 3 * 2 * 1) { // applied
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
24
        // ...
25
    }
26
}
27