midasplatform/Midas

View on GitHub
core/controllers/api/CommunityController.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using undefined variables such as '$apiFunctions' which will lead to PHP notices.
Open

        $apiFunctions['search'] = 'communitySearch';

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$apiFunctions' which will lead to PHP notices.
Open

            $apiFunctions

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$apiFunctions' which will lead to PHP notices.
Open

        $apiFunctions['default'] = 'communityList';

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$apiFunctions' which will lead to PHP notices.
Open

        $apiFunctions['default'] = 'communityCreate';

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$apiFunctions' which will lead to PHP notices.
Open

            $apiFunctions

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$apiFunctions' which will lead to PHP notices.
Open

        $apiFunctions['default'] = 'communityDelete';

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$apiFunctions' which will lead to PHP notices.
Open

            $apiFunctions

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Each class must be in a namespace of at least one level (a top-level vendor name)
Open

class Rest_CommunityController extends ApiController

The class Rest_CommunityController is not named in CamelCase.
Open

class Rest_CommunityController extends ApiController
{
    /**
     * The index action handles index/list requests; it should respond with a
     * list of the requested resources.

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

Class name "Rest_CommunityController" is not in camel caps format
Open

class Rest_CommunityController extends ApiController

There are no issues that match your filters.

Category
Status