Completed
Push — develop ( b902d9...86bf56 )
by Jaap
05:59
created

see_function.php ➔ echo_html()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file contains utility functions.
4
 *
5
 * @package Utility Functions
6
 */
7
8
namespace SmartFactory;
9
10
/**
11
 * Echoes the text with escaping of HTML special charaters.
12
 *
13
 * @param string $text
14
 * The text to be escaped.
15
 *
16
 * @return void
17
 *
18
 * @see  escape_html()
19
 *
20
 * @uses escape_html()
21
 */
22
function echo_html($text)
23
{
24
    echo escape_html($text);
25
} // echo_html
26
27
/**
28
 * Escapes the HTML special characters in the text.
29
 *
30
 * @param string $text
31
 * The text to be escaped.
32
 *
33
 * @return string
34
 * Returns the text with escaped HTML special charaters.
35
 */
36
function escape_html($text)
37
{
38
    return htmlspecialchars($text, ENT_QUOTES);
39
} // escape_html
40