FirstProjectClass   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 26
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A decoding() 0 5 1
A encoding() 0 5 1
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