sebastianmonzel/webfiles-framework-php

View on GitHub
source/core/datastore/types/remote/MRemoteDatastoreEndpoint.php

Summary

Maintainability
D
2 days
Test Coverage
F
0%

getParam accesses the super-global variable $_GET.
Open

    public function getParam( $name ) {
        if ( isset( $_GET[ $name ] ) ) {
            return $_GET[ $name ];
        } else {
            return $_POST[ $name ];

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

getParam accesses the super-global variable $_POST.
Open

    public function getParam( $name ) {
        if ( isset( $_GET[ $name ] ) ) {
            return $_GET[ $name ];
        } else {
            return $_POST[ $name ];

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

handleRemoteCall accesses the super-global variable $_POST.
Open

    public function handleRemoteCall() {

        header("Access-Control-Allow-Headers: *");
        header("Access-Control-Allow-Origin: *");

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

issetParam accesses the super-global variable $_GET.
Open

    public function issetParam( $name ) {
        return isset( $_GET[ $name ] ) || isset( $_POST[ $name ] );
    }

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

handleRemoteCall accesses the super-global variable $_POST.
Open

    public function handleRemoteCall() {

        header("Access-Control-Allow-Headers: *");
        header("Access-Control-Allow-Origin: *");

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

handleRemoteCall accesses the super-global variable $_POST.
Open

    public function handleRemoteCall() {

        header("Access-Control-Allow-Headers: *");
        header("Access-Control-Allow-Origin: *");

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

issetParam accesses the super-global variable $_POST.
Open

    public function issetParam( $name ) {
        return isset( $_GET[ $name ] ) || isset( $_POST[ $name ] );
    }

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

getParam accesses the super-global variable $_GET.
Open

    public function getParam( $name ) {
        if ( isset( $_GET[ $name ] ) ) {
            return $_GET[ $name ];
        } else {
            return $_POST[ $name ];

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

handleRemoteCall accesses the super-global variable $_POST.
Open

    public function handleRemoteCall() {

        header("Access-Control-Allow-Headers: *");
        header("Access-Control-Allow-Origin: *");

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

Function handleRemoteCall has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring.
Open

    public function handleRemoteCall() {

        header("Access-Control-Allow-Headers: *");
        header("Access-Control-Allow-Origin: *");

Severity: Minor
Found in source/core/datastore/types/remote/MRemoteDatastoreEndpoint.php - About 1 day to fix

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

Method handleRemoteCall has 87 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function handleRemoteCall() {

        header("Access-Control-Allow-Headers: *");
        header("Access-Control-Allow-Origin: *");

Severity: Major
Found in source/core/datastore/types/remote/MRemoteDatastoreEndpoint.php - About 3 hrs to fix

The class MRemoteDatastoreEndpoint has 16 fields. Consider redesigning MRemoteDatastoreEndpoint to keep the number of fields under 15.
Open

class MRemoteDatastoreEndpoint {
    /** @var MAbstractDatastore */
    private $m_oDatastore;
    private $m_bOverwriteReadOnlyWithTrue;

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

Avoid too many return statements within this method.
Open

                return;
Severity: Major
Found in source/core/datastore/types/remote/MRemoteDatastoreEndpoint.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

            return;
Severity: Major
Found in source/core/datastore/types/remote/MRemoteDatastoreEndpoint.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

                return;
Severity: Major
Found in source/core/datastore/types/remote/MRemoteDatastoreEndpoint.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

                return;
Severity: Major
Found in source/core/datastore/types/remote/MRemoteDatastoreEndpoint.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

                return;
Severity: Major
Found in source/core/datastore/types/remote/MRemoteDatastoreEndpoint.php - About 30 mins to fix

The method handleRemoteCall() has 123 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    public function handleRemoteCall() {

        header("Access-Control-Allow-Headers: *");
        header("Access-Control-Allow-Origin: *");

The method handleRemoteCall() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10.
Open

    public function handleRemoteCall() {

        header("Access-Control-Allow-Headers: *");
        header("Access-Control-Allow-Origin: *");

CyclomaticComplexity

Since: 0.1

Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

Example

// Cyclomatic Complexity = 11
class Foo {
1   public function example() {
2       if ($a == $b) {
3           if ($a1 == $b1) {
                fiddle();
4           } elseif ($a2 == $b2) {
                fiddle();
            } else {
                fiddle();
            }
5       } elseif ($c == $d) {
6           while ($c == $d) {
                fiddle();
            }
7        } elseif ($e == $f) {
8           for ($n = 0; $n < $h; $n++) {
                fiddle();
            }
        } else {
            switch ($z) {
9               case 1:
                    fiddle();
                    break;
10              case 2:
                    fiddle();
                    break;
11              case 3:
                    fiddle();
                    break;
                default:
                    fiddle();
                    break;
            }
        }
    }
}

Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

The method __construct has a boolean flag argument $overwriteReadOnlyWithTrue, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function __construct( MAbstractDatastore $datastore,  bool $overwriteReadOnlyWithTrue = false ) {

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method handleRemoteCall uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    echo "false";
                }

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method getParam uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            return $_POST[ $name ];
        }

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

Avoid using static access to class '\webfilesframework\core\datasystem\file\format\MWebfile' in method 'handleRemoteCall'.
Open

                $webfile = MWebfile::staticUnmarshall( $_POST[ static::$PAYLOAD_FIELD_NAME_WEBFILE ] );

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

The method handleRemoteCall uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    echo "false";
                }

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method writeOutWebfilesStream uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            header('Content-Type: application/json');
            echo $webfilesStream->getJSON();
        }

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

Avoid using static access to class '\webfilesframework\core\datasystem\file\format\MWebfile' in method 'handleRemoteCall'.
Open

                $template = MWebfile::staticUnmarshall( $_POST[ static::$PAYLOAD_FIELD_NAME_TEMPLATE ] );

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\webfilesframework\core\datasystem\file\format\MWebfile' in method 'handleRemoteCall'.
Open

                $webfile = MWebfile::staticUnmarshall( $this->getParam( static::$PAYLOAD_FIELD_NAME_TEMPLATE ) );

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

The method handleRemoteCall uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {

            $webfilesStream = $this->m_oDatastore->getAllWebfiles();
            $this->writeOutWebfilesStream($webfilesStream);

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

TODO found
Open

        // Write documentation if no case matches: TODO nonsense since "else" always skips this block

Avoid excessively long variable names like $METHOD_NAME_GET_LATEST_WEBFILES. Keep variable name length under 20.
Open

    public static $METHOD_NAME_GET_LATEST_WEBFILES            = "getLatestWebfiles";

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $PAYLOAD_FIELD_NAME_WEBFILE. Keep variable name length under 20.
Open

    public static $PAYLOAD_FIELD_NAME_WEBFILE     = "webfile";

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $PAYLOAD_FIELD_NAME_COUNT. Keep variable name length under 20.
Open

    public static $PAYLOAD_FIELD_NAME_COUNT       = "count";

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $next_webfile_for_timestamp. Keep variable name length under 20.
Open

                $next_webfile_for_timestamp = $this->m_oDatastore->getNextWebfileForTimestamp( $_POST[ static::$PAYLOAD_FIELD_NAME_TIMESTAMP ] );

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $PAYLOAD_FIELD_NAME_METHOD. Keep variable name length under 20.
Open

    public static $PAYLOAD_FIELD_NAME_METHOD      = "method";

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $METHOD_NAME_TRY_CONNECT. Keep variable name length under 20.
Open

    public static $METHOD_NAME_TRY_CONNECT                    = "tryConnect";

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $PAYLOAD_FIELD_NAME_TIMESTAMP. Keep variable name length under 20.
Open

    public static $PAYLOAD_FIELD_NAME_TIMESTAMP   = "timestamp";

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $METHOD_NAME_SEARCH_BY_TEMPLATE. Keep variable name length under 20.
Open

    public static $METHOD_NAME_SEARCH_BY_TEMPLATE             = "searchByTemplate";

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $METHOD_NAME_STORE_WEBFILE. Keep variable name length under 20.
Open

    public static $METHOD_NAME_STORE_WEBFILE = "storeWebfile";

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $overwriteReadOnlyWithTrue. Keep variable name length under 20.
Open

    public function __construct( MAbstractDatastore $datastore,  bool $overwriteReadOnlyWithTrue = false ) {

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $METHOD_NAME_GET_NEXT_WEBFILE_FOR_TIMESTAMP. Keep variable name length under 20.
Open

    public static $METHOD_NAME_GET_NEXT_WEBFILE_FOR_TIMESTAMP = "getNextWebfileForTimestamp";

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $METHOD_NAME_DELETE_BY_TEMPLATE. Keep variable name length under 20.
Open

    public static $METHOD_NAME_DELETE_BY_TEMPLATE = "deleteByTemplate";

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $PAYLOAD_FIELD_NAME_TEMPLATE. Keep variable name length under 20.
Open

    public static $PAYLOAD_FIELD_NAME_TEMPLATE    = "template";

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $m_bOverwriteReadOnlyWithTrue. Keep variable name length under 20.
Open

    private $m_bOverwriteReadOnlyWithTrue;

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $METHOD_NAME_IS_READ_ONLY. Keep variable name length under 20.
Open

    public static $METHOD_NAME_IS_READ_ONLY                   = "isReadOnly";

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $METHOD_NAME_RETRIEVE_WEBFILES. Keep variable name length under 20.
Open

    public static $METHOD_NAME_RETRIEVE_WEBFILES              = "retrieveWebfiles";

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

The property $m_oDatastore is not named in camelCase.
Open

class MRemoteDatastoreEndpoint {
    /** @var MAbstractDatastore */
    private $m_oDatastore;
    private $m_bOverwriteReadOnlyWithTrue;

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $TYPE_XML is not named in camelCase.
Open

class MRemoteDatastoreEndpoint {
    /** @var MAbstractDatastore */
    private $m_oDatastore;
    private $m_bOverwriteReadOnlyWithTrue;

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $METHOD_NAME_DELETE_BY_TEMPLATE is not named in camelCase.
Open

class MRemoteDatastoreEndpoint {
    /** @var MAbstractDatastore */
    private $m_oDatastore;
    private $m_bOverwriteReadOnlyWithTrue;

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $PAYLOAD_FIELD_NAME_TIMESTAMP is not named in camelCase.
Open

class MRemoteDatastoreEndpoint {
    /** @var MAbstractDatastore */
    private $m_oDatastore;
    private $m_bOverwriteReadOnlyWithTrue;

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $METHOD_NAME_GET_NEXT_WEBFILE_FOR_TIMESTAMP is not named in camelCase.
Open

class MRemoteDatastoreEndpoint {
    /** @var MAbstractDatastore */
    private $m_oDatastore;
    private $m_bOverwriteReadOnlyWithTrue;

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $PAYLOAD_FIELD_NAME_COUNT is not named in camelCase.
Open

class MRemoteDatastoreEndpoint {
    /** @var MAbstractDatastore */
    private $m_oDatastore;
    private $m_bOverwriteReadOnlyWithTrue;

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $METHOD_NAME_STORE_WEBFILE is not named in camelCase.
Open

class MRemoteDatastoreEndpoint {
    /** @var MAbstractDatastore */
    private $m_oDatastore;
    private $m_bOverwriteReadOnlyWithTrue;

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $PAYLOAD_FIELD_NAME_METHOD is not named in camelCase.
Open

class MRemoteDatastoreEndpoint {
    /** @var MAbstractDatastore */
    private $m_oDatastore;
    private $m_bOverwriteReadOnlyWithTrue;

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $METHOD_NAME_SEARCH_BY_TEMPLATE is not named in camelCase.
Open

class MRemoteDatastoreEndpoint {
    /** @var MAbstractDatastore */
    private $m_oDatastore;
    private $m_bOverwriteReadOnlyWithTrue;

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $METHOD_NAME_GET_LATEST_WEBFILES is not named in camelCase.
Open

class MRemoteDatastoreEndpoint {
    /** @var MAbstractDatastore */
    private $m_oDatastore;
    private $m_bOverwriteReadOnlyWithTrue;

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $METHOD_NAME_RETRIEVE_WEBFILES is not named in camelCase.
Open

class MRemoteDatastoreEndpoint {
    /** @var MAbstractDatastore */
    private $m_oDatastore;
    private $m_bOverwriteReadOnlyWithTrue;

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $METHOD_NAME_TRY_CONNECT is not named in camelCase.
Open

class MRemoteDatastoreEndpoint {
    /** @var MAbstractDatastore */
    private $m_oDatastore;
    private $m_bOverwriteReadOnlyWithTrue;

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $m_bOverwriteReadOnlyWithTrue is not named in camelCase.
Open

class MRemoteDatastoreEndpoint {
    /** @var MAbstractDatastore */
    private $m_oDatastore;
    private $m_bOverwriteReadOnlyWithTrue;

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $PAYLOAD_FIELD_NAME_WEBFILE is not named in camelCase.
Open

class MRemoteDatastoreEndpoint {
    /** @var MAbstractDatastore */
    private $m_oDatastore;
    private $m_bOverwriteReadOnlyWithTrue;

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $METHOD_NAME_IS_READ_ONLY is not named in camelCase.
Open

class MRemoteDatastoreEndpoint {
    /** @var MAbstractDatastore */
    private $m_oDatastore;
    private $m_bOverwriteReadOnlyWithTrue;

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $PAYLOAD_FIELD_NAME_TEMPLATE is not named in camelCase.
Open

class MRemoteDatastoreEndpoint {
    /** @var MAbstractDatastore */
    private $m_oDatastore;
    private $m_bOverwriteReadOnlyWithTrue;

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The variable $next_webfile_for_timestamp is not named in camelCase.
Open

    public function handleRemoteCall() {

        header("Access-Control-Allow-Headers: *");
        header("Access-Control-Allow-Origin: *");

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $next_webfile_for_timestamp is not named in camelCase.
Open

    public function handleRemoteCall() {

        header("Access-Control-Allow-Headers: *");
        header("Access-Control-Allow-Origin: *");

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

There are no issues that match your filters.

Category
Status