Passed
Push — master ( 47699c...d74cf0 )
by Rougin
01:47
created

GreetController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 62.5%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 22
ccs 5
cts 8
cp 0.625
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A scream() 0 3 1
A greet() 0 5 1
1
<?php
2
3
namespace App\Zapheus;
4
5
use App\Facades\View;
6
7
/**
8
 * Greet Controller
9
 *
10
 * @package App
11
 * @author  Rougin Royce Gutib <[email protected]>
12
 */
13
class GreetController
14
{
15
    /**
16
     * Greets a specified name.
17
     *
18
     * @return string
19
     */
20 4
    public function greet($name = 'Stranger')
21
    {
22 4
        $data = array('name' => (string) $name);
23
24 4
        return View::make('greet', $data);
25
    }
26
27
    /**
28
     * Shouts the specified name.
29
     *
30
     * @return string
31
     */
32 2
    public function scream()
33
    {
34 2
        return strtoupper($this->greet());
35
    }
36
}
37