StringHelper::sanitizeSerialized()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
1
<?php namespace Tequilarapido\Helpers;
2
3
class StringHelper
4
{
5
    public static function replacePlaceHolders($string, $data)
6
    {
7
        foreach ($data as $key => $value) {
8
            $string = str_replace('@' . $key . '@', $value, $string);
9
        }
10
11
        return $string;
12
    }
13
14
15
    public static function sanitizeSerialized($string)
16
    {
17
        $string = str_replace('\"', '"', $string);
18
        $string = str_replace('"', '\"', $string);
19
20
        return $string;
21
    }
22
23
}