railpage/railpagecore

View on GitHub
lib/Railcams/Proxy.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused parameters such as '$action'.
Open

        public function execute($action, $data) {
Severity: Minor
Found in lib/Railcams/Proxy.php by phpmd

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

        public function execute($action, $data) {
Severity: Minor
Found in lib/Railcams/Proxy.php by phpmd

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

        public function setRailcam(Camera $Camera) {
            
            $this->Railcam = $Camera;
            
            $this->cachekey_base = sprintf("railpage:railcam=%d;proxy", $Camera->id);
Severity: Minor
Found in lib/Railcams/Proxy.php by phpmd

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

        }
Severity: Minor
Found in lib/Railcams/Proxy.php by phpcodesniffer

Function closing brace must go on the next line following the body; found 1 blank lines before brace
Open

        }
Severity: Minor
Found in lib/Railcams/Proxy.php by phpcodesniffer

Function closing brace must go on the next line following the body; found 3 blank lines before brace
Open

        }
Severity: Minor
Found in lib/Railcams/Proxy.php by phpcodesniffer

Line indented incorrectly; expected 4 spaces, found 8
Open

        }
Severity: Minor
Found in lib/Railcams/Proxy.php by phpcodesniffer

Line indented incorrectly; expected 4 spaces, found 8
Open

        private $Memcached;
Severity: Minor
Found in lib/Railcams/Proxy.php by phpcodesniffer

Line indented incorrectly; expected 4 spaces, found 8
Open

        private $cachekey_base;
Severity: Minor
Found in lib/Railcams/Proxy.php by phpcodesniffer

Line indented incorrectly; expected 0 spaces, found 4
Open

    class Proxy {
Severity: Minor
Found in lib/Railcams/Proxy.php by phpcodesniffer

Line indented incorrectly; expected 4 spaces, found 8
Open

        public function setRailcam(Camera $Camera) {
Severity: Minor
Found in lib/Railcams/Proxy.php by phpcodesniffer

Line indented incorrectly; expected 4 spaces, found 8
Open

        }
Severity: Minor
Found in lib/Railcams/Proxy.php by phpcodesniffer

Line indented incorrectly; expected 0 spaces, found 4
Open

    }
Severity: Minor
Found in lib/Railcams/Proxy.php by phpcodesniffer

Line indented incorrectly; expected 4 spaces, found 8
Open

        }
Severity: Minor
Found in lib/Railcams/Proxy.php by phpcodesniffer

Line indented incorrectly; expected 4 spaces, found 8
Open

        public function execute($action, $data) {
Severity: Minor
Found in lib/Railcams/Proxy.php by phpcodesniffer

Line indented incorrectly; expected 4 spaces, found 8
Open

        private $Railcam;
Severity: Minor
Found in lib/Railcams/Proxy.php by phpcodesniffer

Line indented incorrectly; expected 4 spaces, found 8
Open

        public function __construct() {
Severity: Minor
Found in lib/Railcams/Proxy.php by phpcodesniffer

There are no issues that match your filters.

Category
Status