Passed
Push — master ( d74cf0...1b179d )
by Rougin
02:10
created

GreetController::greet()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 9.4285
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 6
    public function greet($name = 'Stranger')
21
    {
22 6
        $data = array('name' => (string) $name);
23
24 6
        return View::make('greet', $data);
25
    }
26
27
    /**
28
     * Shouts the specified name.
29
     *
30
     * @return string
31
     */
32 3
    public function scream()
33
    {
34 3
        return strtoupper($this->greet());
35
    }
36
}
37