Issues (36)

app/Controller/Hello.php (2 issues)

1
<?php
2
/**
3
 * StupidlySimple - A PHP Framework For Lazy Developers.
4
 *
5
 * @author		Fariz Luqman <[email protected]>
6
 * @copyright	2017 Fariz Luqman
7
 * @license		MIT
8
 *
9
 * @link		https://stupidlysimple.github.io/
10
 */
11
12
namespace Controller;
13
14
use Core\Request;
15
16
class Hello
17
{
18
    public function greetWithName($name)
0 ignored issues
show
Comprehensibility introduced by
Avoid variables with short names like $name. Configured minimum length is 5.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
19
    {
20
        echo 'Hello, '.$name.'!';
21
    }
22
23
    public function greetForm()
24
    {
25
        $name = Request::get('name');
0 ignored issues
show
Comprehensibility introduced by
Avoid variables with short names like $name. Configured minimum length is 5.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
26
        if ($name == '') {
27
            echo 'How could you have no name :(';
28
        } else {
29
            echo 'Hello, '.$name.'!';
30
        }
31
    }
32
}
33