RssEscape   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A escape() 0 5 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: ninoskopac
5
 * Date: 02/05/2018
6
 * Time: 00:02
7
 */
8
declare(strict_types=1);
9
namespace iTunesPodcastFeed\Traits;
10
11
trait RssEscape {
12
    protected function escape(string $str): string {
13
        // https://stackoverflow.com/a/11787940/1325575
14
        $str = str_replace(array('&', '<'), array('&#x26;', '&#x3C;'), $str);
15
16
        return $str;
17
    }
18
}