Completed
Push — 1.0 ( a0bf4f...47f9c9 )
by joanhey
01:21
created

libs/filter/base_filter/htmlentities_filter.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * KumbiaPHP web & app Framework
4
 *
5
 * LICENSE
6
 *
7
 * This source file is subject to the new BSD license that is bundled
8
 * with this package in the file LICENSE.txt.
9
 * It is also available through the world-wide-web at this URL:
10
 * http://wiki.kumbiaphp.com/Licencia
11
 * If you did not receive a copy of the license and are unable to
12
 * obtain it through the world-wide-web, please send an email
13
 * to [email protected] so we can send you a copy immediately.
14
 *
15
 * @category   Kumbia
16
 * @package    Filter
17
 * @subpackage BaseFilter
18
 * @copyright  Copyright (c) 2005 - 2017 Kumbia Team (http://www.kumbiaphp.com)
19
 * @license    http://wiki.kumbiaphp.com/Licencia     New BSD License
20
 */
21
22
/**
23
 * Filtra una cadena Htmlentities
24
 *
25
 * @category   Kumbia
26
 * @package    Filter
27
 * @subpackage BaseFilter
28
 */
29 View Code Duplication
class HtmlentitiesFilter implements FilterInterface
0 ignored issues
show
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
30
{
31
32
    /**
33
     * Ejecuta el filtro
34
     *
35
     * @param string $s
36
     * @param array $options
37
     * @return string
38
     */
39
    public static function execute($s, $options)
40
    {
41
        $charset = (isset($options['charset']) && $options['charset']) ? $options['charset'] : APP_CHARSET;
42
        return htmlentities((string) $s, ENT_QUOTES, $charset);
43
    }
44
45
}