Version 5.1 - All the GraphQL #32
4
sonar-project.properties
Normal file
4
sonar-project.properties
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
sonar.projectKey=animeclient
|
||||||
|
sonar.projectName=Anime Client
|
||||||
|
sonar.projectVersion=1.0
|
||||||
|
sonar.sources=src
|
@ -84,8 +84,10 @@ class Config {
|
|||||||
{
|
{
|
||||||
$this->map->set($key, $value);
|
$this->map->set($key, $value);
|
||||||
}
|
}
|
||||||
else throw
|
else
|
||||||
new InvalidArgumentException("Key must be integer, string, or array, and cannot be empty");
|
{
|
||||||
|
throw new InvalidArgumentException("Key must be integer, string, or array, and cannot be empty");
|
||||||
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -92,9 +92,7 @@ class Dispatcher extends RoutingBase {
|
|||||||
'route_path' => $route_path
|
'route_path' => $route_path
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$route = $this->router->match($route_path, $_SERVER);
|
return $this->router->match($route_path, $_SERVER);
|
||||||
|
|
||||||
return $route;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -230,7 +228,10 @@ class Dispatcher extends RoutingBase {
|
|||||||
$route_type = $this->get_controller();
|
$route_type = $this->get_controller();
|
||||||
|
|
||||||
// Return early if invalid route array
|
// 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']);
|
$applied_routes = array_merge($this->routes[$route_type], $this->routes['common']);
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ class Menu {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create the html for the selected menu
|
* Create the html for the selected menu
|
||||||
*
|
*
|
||||||
* @param string $menu_name
|
* @param string $menu_name
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
@ -56,7 +56,10 @@ class Model {
|
|||||||
$ext = end($ext_parts);
|
$ext = end($ext_parts);
|
||||||
|
|
||||||
// Workaround for some broken extensions
|
// Workaround for some broken extensions
|
||||||
if ($ext == "jjpg") $ext = "jpg";
|
if ($ext == "jjpg")
|
||||||
|
{
|
||||||
|
$ext = "jpg";
|
||||||
|
}
|
||||||
|
|
||||||
// Failsafe for weird urls
|
// Failsafe for weird urls
|
||||||
if (strlen($ext) > 3) return $api_path;
|
if (strlen($ext) > 3) return $api_path;
|
||||||
|
Loading…
Reference in New Issue
Block a user