Some more style fixes

This commit is contained in:
Timothy Warren 2015-11-05 10:41:46 -05:00
parent 6ef8caca00
commit cdb4406e14
5 changed files with 18 additions and 8 deletions

4
sonar-project.properties Normal file
View File

@ -0,0 +1,4 @@
sonar.projectKey=animeclient
sonar.projectName=Anime Client
sonar.projectVersion=1.0
sonar.sources=src

View File

@ -84,8 +84,10 @@ class Config {
{
$this->map->set($key, $value);
}
else throw
new InvalidArgumentException("Key must be integer, string, or array, and cannot be empty");
else
{
throw new InvalidArgumentException("Key must be integer, string, or array, and cannot be empty");
}
return $this;
}

View File

@ -92,9 +92,7 @@ class Dispatcher extends RoutingBase {
'route_path' => $route_path
]);
$route = $this->router->match($route_path, $_SERVER);
return $route;
return $this->router->match($route_path, $_SERVER);
}
/**
@ -230,7 +228,10 @@ class Dispatcher extends RoutingBase {
$route_type = $this->get_controller();
// Return early if invalid route array
if ( ! array_key_exists($route_type, $this->routes)) return [];
if ( ! array_key_exists($route_type, $this->routes))
{
return [];
}
$applied_routes = array_merge($this->routes[$route_type], $this->routes['common']);

View File

@ -13,7 +13,7 @@ class Menu {
/**
* Create the html for the selected menu
*
*
* @param string $menu_name
* @return string
*/

View File

@ -56,7 +56,10 @@ class Model {
$ext = end($ext_parts);
// Workaround for some broken extensions
if ($ext == "jjpg") $ext = "jpg";
if ($ext == "jjpg")
{
$ext = "jpg";
}
// Failsafe for weird urls
if (strlen($ext) > 3) return $api_path;