FirstProjectClass::decoding()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * File containing FirstProjectClass
4
 *
5
 * @author Christian Varela <[email protected]>
6
 * @copyright (c) 2017, Conqueror Soft Inc (http://www.conquerorsoft.com)
7
 */
8
namespace conquerorsoft\my_first_project;
9
10
use conquerorsoft\my_first_library\FirstClass;
11
12
/**
13
 * This class is part of my_first_project and uses my_first_library
14
 *
15
 * @author Christian Varela <[email protected]>
16
 */
17
class FirstProjectClass
18
{
19
    /**
20
     * Returns a message with the result of the encoded string
21
     *
22
     * @param string $string_to_encode
23
     * @return string
24
     */
25 3
    public function encoding($string_to_encode)
26
    {
27 3
        $my_first_library=new FirstClass();
28 3
        $encoded=$my_first_library->encodeString($string_to_encode);
29 3
        return "The string '$string_to_encode' is encoded as '$encoded'";
30
    }
31
32
    /**
33
     * Returns a message with the result of the decoded string
34
     *
35
     * @param string $string_to_decode
36
     * @return string
37
     */
38 3
    public function decoding($string_to_decode)
39
    {
40 3
        $my_first_library=new FirstClass();
41 3
        $decoded=$my_first_library->decodeString($string_to_decode);
42 3
        return "The string '$string_to_decode' is decoded as '$decoded'";
43
    }
44
}
45