Test Failed
Push — master ( d17908...cbac2e )
by Adam
02:03
created

SafeString::makeSafe()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace DBAL\Modifiers;
4
5
class SafeString{
0 ignored issues
show
Coding Style introduced by
SafeString does not seem to conform to the naming convention (Utils?$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
6
    
7
    /**
8
     * Make any SQL field names safe
9
     * @param string $string The string that you wish to make safe
10
     * @return string Will return the safe value
11
     */
12
    public static function makeSafe($string){
13
        return preg_replace("/^[a-z0-9_]+$/i", "", $string);
14
    }
15
}
16