Better documentation
These changes have been automatically suggested by scrutinizer-ci.com
This commit is contained in:
@@ -9,6 +9,10 @@ namespace Core;
|
||||
* @author Frederic Guillot
|
||||
*/
|
||||
interface Listener {
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function execute(array $data);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,9 @@ class Response
|
||||
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $status_code
|
||||
*/
|
||||
public function status($status_code)
|
||||
{
|
||||
if (strpos(php_sapi_name(), 'apache') !== false) {
|
||||
|
||||
@@ -20,11 +20,18 @@ class Router
|
||||
$this->action = empty($_GET['action']) ? $controller : $_GET['action'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $default_value
|
||||
*/
|
||||
public function sanitize($value, $default_value)
|
||||
{
|
||||
return ! ctype_alpha($value) || empty($value) ? $default_value : strtolower($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
* @param string $class
|
||||
*/
|
||||
public function load($filename, $class, $method)
|
||||
{
|
||||
if (file_exists($filename)) {
|
||||
|
||||
Reference in New Issue
Block a user