Completed
Pull Request — master (#3)
by Joao
06:17 queued 02:28
created

SqlHelper::getValue()   C

Complexity

Conditions 11
Paths 22

Size

Total Lines 35
Code Lines 26

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 132

Importance

Changes 0
Metric Value
dl 0
loc 35
ccs 0
cts 28
cp 0
rs 5.2653
c 0
b 0
f 0
cc 11
eloc 26
nc 22
nop 4
crap 132

How to fix   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 ByJG\AnyDataset\Store\Helpers;
4
5
class SqlHelper
6
{
7 3
    public static function createSafeSQL($sql, $list)
8
    {
9 3
        return str_replace(array_keys($list), array_values($list), $sql);
10
    }
11
}
12