Completed
Pull Request — master (#77)
by
unknown
09:49
created

Format::escape_cdata()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Spatie\Feed;
4
5
class Format
6
{
7
    /*
8
    * Escape given sequence to remove ending CDATA tags
9
    *
10
    * @param string $value
11
    * @return string
12
    */
13
    public static function escape_cdata($value)
14
    {
15
        return str_replace(']]>', ']]]]><![CDATA[>', $value);
16
    }
17
}
18