stupidlysimple /
php
| 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
|
|||
| 19 | { |
||
| 20 | echo 'Hello, '.$name.'!'; |
||
| 21 | } |
||
| 22 | |||
| 23 | public function greetForm() |
||
| 24 | { |
||
| 25 | $name = Request::get('name'); |
||
|
0 ignored issues
–
show
|
|||
| 26 | if ($name == '') { |
||
| 27 | echo 'How could you have no name :('; |
||
| 28 | } else { |
||
| 29 | echo 'Hello, '.$name.'!'; |
||
| 30 | } |
||
| 31 | } |
||
| 32 | } |
||
| 33 |
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.