Showing 84 of 84 total issues
Expected 0 spaces before opening brace; 1 found Open
Open
{
- Exclude checks
There must be one blank line after the namespace declaration Open
Open
namespace Aisa\Weather;
- Exclude checks
There must be one blank line after the namespace declaration Open
Open
namespace Aisa\Weather;
- Exclude checks
There must be one blank line after the last USE statement; 0 found; Open
Open
use Anax\Commons\ContainerInjectableTrait;
- Exclude checks
There must be one blank line after the namespace declaration Open
Open
namespace Aisa\WeatherRequest;
- Exclude checks
Function multiCurlJson
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
public function multiCurlJson($details)
{
$accessKey = $this->darkKey;
$multiRequests = [];
#future weather
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
There must be one blank line after the last USE statement; 0 found; Open
Open
use Anax\Commons\ContainerInjectableTrait;
- Exclude checks
There must be one blank line after the namespace declaration Open
Open
namespace Aisa\Config;
- Exclude checks
Avoid unused local variables such as '$title'. Open
Open
$title = "Check IP (JSON)";
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$key'. Open
Open
foreach ($weather as $key => $value) {
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$key'. Open
Open
foreach ($weather as $key => $value) {
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$title'. Open
Open
$title = "Check IP (JSON)";
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$page'. Open
Open
$page = $this->di->get("page");
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$page'. Open
Open
$page = $this->di->get("page");
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Line exceeds 120 characters; contains 123 characters Open
Open
"start" => "\n\n\n" . t("Revision history") . " {#revision}\n-------------\n\n<span class=\"revision-history\">\n",
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
Open
$multiRequests[] = $BaseUrl.$accessKey .'/'.$details['latitude'].','.$details['longitude'].','.$unixTime.$apiSetting;
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
Open
$multiRequests[] = $BaseUrl.$accessKey .'/'.$details['latitude'].','.$details['longitude'].','.$unixTime.$apiSetting;
- Exclude checks
Line exceeds 120 characters; contains 196 characters Open
Open
$multiRequests[] = 'https://api.darksky.net/forecast/'.$accessKey .'/'.$details['latitude'].','.$details['longitude'].','.$unixTime.'?exclude=minutely,hourly,daily,flags&units=si';
- Exclude checks
Line exceeds 120 characters; contains 196 characters Open
Open
$multiRequests[] = 'https://api.darksky.net/forecast/'.$accessKey .'/'.$details['latitude'].','.$details['longitude'].','.$unixTime.'?exclude=minutely,hourly,daily,flags&units=si';
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 9 Open
Open
}
- Exclude checks