Completed
Push — master ( 3e7a96...9ec6b9 )
by ARCANEDEV
9s
created

Str::escape()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 2
crap 1
1
<?php namespace Arcanedev\LaravelHtml\Helpers;
2
3
/**
4
 * Class     Str
5
 *
6
 * @package  Arcanedev\LaravelHtml\Helpers
7
 * @author   ARCANEDEV <[email protected]>
8
 */
9
class Str
10
{
11
    /**
12
     * Convert all applicable characters to HTML entities
13
     *
14
     * @param  string  $value
15
     * @param  bool    $doubleEncode
16
     *
17
     * @return string
18
     */
19 357
    public static function escape($value, $doubleEncode = true)
20
    {
21 357
        return htmlentities($value, ENT_QUOTES, 'UTF-8', $doubleEncode);
22
    }
23
}
24