lib/Railcams/Proxy.php
Avoid unused parameters such as '$action'. Open
Open
public function execute($action, $data) {
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$data'. Open
Open
public function execute($action, $data) {
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
The parameter $Camera is not named in camelCase. Open
Open
public function setRailcam(Camera $Camera) {
$this->Railcam = $Camera;
$this->cachekey_base = sprintf("railpage:railcam=%d;proxy", $Camera->id);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Function closing brace must go on the next line following the body; found 1 blank lines before brace Open
Open
}
- Exclude checks
Function closing brace must go on the next line following the body; found 1 blank lines before brace Open
Open
}
- Exclude checks
Function closing brace must go on the next line following the body; found 3 blank lines before brace Open
Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private $Memcached;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private $cachekey_base;
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
class Proxy {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
public function setRailcam(Camera $Camera) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
public function execute($action, $data) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private $Railcam;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
public function __construct() {
- Exclude checks