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);
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
@ -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']);
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user