YetiForceCompany/YetiForceCRM

View on GitHub
api/webservice/WebserviceStandard/BaseAction/Modules.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Avoid using static access to class '\Api\Core\Module' in method 'get'.
Open

        return \Api\Core\Module::getPermittedModules();

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

Possibly zero references to use statement for classlike/namespace OA (\OpenApi\Annotations)
Open

use OpenApi\Annotations as OA;

Spaces must be used for alignment; tabs are not allowed
Open

     *            @OA\JsonContent(ref="#/components/schemas/BaseAction_Modules_ResponseBody"),

Spaces must be used for alignment; tabs are not allowed
Open

     *            response=401,

Spaces must be used for alignment; tabs are not allowed
Open

     *            description="`No sent token` OR `Invalid token`",

Spaces must be used for alignment; tabs are not allowed
Open

     *            @OA\JsonContent(ref="#/components/schemas/Exception"),

Spaces must be used for alignment; tabs are not allowed
Open

     *        title="Base action - List of permitted modules",

Spaces must be used for alignment; tabs are not allowed
Open

     *        @OA\Property(

Spaces must be used for alignment; tabs are not allowed
Open

     *         ),

Spaces must be used for alignment; tabs are not allowed
Open

     */

Spaces must be used for alignment; tabs are not allowed
Open

    {

Spaces must be used for alignment; tabs are not allowed
Open

     *        path="/webservice/WebserviceStandard/Modules",

Spaces must be used for alignment; tabs are not allowed
Open

     *        @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),

Spaces must be used for alignment; tabs are not allowed
Open

     *        ),

Spaces must be used for alignment; tabs are not allowed
Open

     *            response=403,

Spaces must be used for alignment; tabs are not allowed
Open

     *        security={{"basicAuth" : {}, "ApiKeyAuth" : {}, "token" : {}}},

Spaces must be used for alignment; tabs are not allowed
Open

     *            @OA\JsonContent(ref="#/components/schemas/Exception"),

Spaces must be used for alignment; tabs are not allowed
Open

     *            @OA\XmlContent(ref="#/components/schemas/Exception")

Spaces must be used for alignment; tabs are not allowed
Open

     *        schema="BaseAction_Modules_ResponseBody",

Spaces must be used for alignment; tabs are not allowed
Open

     *            property="result",

Spaces must be used for alignment; tabs are not allowed
Open

     *            description="List of permitted modules",

Spaces must be used for alignment; tabs are not allowed
Open

        return \Api\Core\Module::getPermittedModules();

Spaces must be used for alignment; tabs are not allowed
Open

     *            @OA\XmlContent(ref="#/components/schemas/BaseAction_Modules_ResponseBody"),

Spaces must be used for alignment; tabs are not allowed
Open

     *            response=401,

Spaces must be used for alignment; tabs are not allowed
Open

     *            description="No permissions for module",

Spaces must be used for alignment; tabs are not allowed
Open

     *            @OA\JsonContent(ref="#/components/schemas/Exception"),

Spaces must be used for alignment; tabs are not allowed
Open

     *        description="Get the permitted module list action, along with their translated action",

Spaces must be used for alignment; tabs are not allowed
Open

     *        summary="The allowed actions of the module list",

Spaces must be used for alignment; tabs are not allowed
Open

     *        @OA\Response(

Spaces must be used for alignment; tabs are not allowed
Open

     *            @OA\JsonContent(ref="#/components/schemas/BaseAction_Modules_ResponseBody"),

Spaces must be used for alignment; tabs are not allowed
Open

     *        ),

Spaces must be used for alignment; tabs are not allowed
Open

     *        title="Base action - List of permitted modules",

Spaces must be used for alignment; tabs are not allowed
Open

    }

Spaces must be used for alignment; tabs are not allowed
Open

     *            description="List of permitted modules",

Spaces must be used for alignment; tabs are not allowed
Open

     *            @OA\XmlContent(ref="#/components/schemas/Exception")

Spaces must be used for alignment; tabs are not allowed
Open

     *        schema="BaseAction_Modules_ResponseBody",

Spaces must be used for alignment; tabs are not allowed
Open

     *        @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),

Spaces must be used for alignment; tabs are not allowed
Open

     *            type="object",

Spaces must be used for alignment; tabs are not allowed
Open

     *        @OA\Response(

Spaces must be used for alignment; tabs are not allowed
Open

     *        description="List of available modules",

Spaces must be used for alignment; tabs are not allowed
Open

     *            @OA\AdditionalProperties(description="Module name", type="string", example="Accounts"),

Spaces must be used for alignment; tabs are not allowed
Open

     *            description="List of permitted modules",

Spaces must be used for alignment; tabs are not allowed
Open

     *            @OA\XmlContent(ref="#/components/schemas/BaseAction_Modules_ResponseBody"),

Spaces must be used for alignment; tabs are not allowed
Open

     *            description="`No sent token` OR `Invalid token`",

Spaces must be used for alignment; tabs are not allowed
Open

     *            description="List of permitted modules",

Spaces must be used for alignment; tabs are not allowed
Open

     *        security={{"basicAuth" : {}, "ApiKeyAuth" : {}, "token" : {}}},

Spaces must be used for alignment; tabs are not allowed
Open

     *            @OA\XmlContent(ref="#/components/schemas/Exception")

Spaces must be used for alignment; tabs are not allowed
Open

     *        ),

Spaces must be used for alignment; tabs are not allowed
Open

     *        type="object",

Spaces must be used for alignment; tabs are not allowed
Open

     *        @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),

Spaces must be used for alignment; tabs are not allowed
Open

     *        tags={"BaseAction"},

Spaces must be used for alignment; tabs are not allowed
Open

     *            @OA\XmlContent(ref="#/components/schemas/Exception")

Spaces must be used for alignment; tabs are not allowed
Open

     *            type="object",

Spaces must be used for alignment; tabs are not allowed
Open

     *    ),

Spaces must be used for alignment; tabs are not allowed
Open

    public function get(): array

Spaces must be used for alignment; tabs are not allowed
Open

     *        tags={"BaseAction"},

Spaces must be used for alignment; tabs are not allowed
Open

     *        @OA\Response(

Spaces must be used for alignment; tabs are not allowed
Open

     *            response=200,

Spaces must be used for alignment; tabs are not allowed
Open

     *            @OA\JsonContent(ref="#/components/schemas/Exception"),

Spaces must be used for alignment; tabs are not allowed
Open

     *        ),

Spaces must be used for alignment; tabs are not allowed
Open

     *        ),

Spaces must be used for alignment; tabs are not allowed
Open

     *        description="List of available modules",

Spaces must be used for alignment; tabs are not allowed
Open

     *        description="Get the permitted module list action, along with their translated action",

Spaces must be used for alignment; tabs are not allowed
Open

     *        @OA\Response(

Spaces must be used for alignment; tabs are not allowed
Open

     * ),

Spaces must be used for alignment; tabs are not allowed
Open

     * @OA\Schema(

Spaces must be used for alignment; tabs are not allowed
Open

     *        type="object",

Spaces must be used for alignment; tabs are not allowed
Open

     *        @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),

Spaces must be used for alignment; tabs are not allowed
Open

     *        @OA\Property(

Spaces must be used for alignment; tabs are not allowed
Open

     *        ),

Spaces must be used for alignment; tabs are not allowed
Open

     *        @OA\Response(

Spaces must be used for alignment; tabs are not allowed
Open

     *            property="result",

Spaces must be used for alignment; tabs are not allowed
Open

     *            @OA\AdditionalProperties(description="Module name", type="string", example="Accounts"),

Spaces must be used for alignment; tabs are not allowed
Open

     *    ),

Spaces must be used for alignment; tabs are not allowed
Open

     *        summary="The allowed actions of the module list",

Spaces must be used for alignment; tabs are not allowed
Open

     *            response=200,

Spaces must be used for alignment; tabs are not allowed
Open

     *            response=403,

Spaces must be used for alignment; tabs are not allowed
Open

     *            description="No permissions for module",

Spaces must be used for alignment; tabs are not allowed
Open

     *        @OA\Response(

Spaces must be used for alignment; tabs are not allowed
Open

     *         ),

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

     *        path="/webservice/WebserviceStandard/Modules",

Spaces must be used to indent lines; tabs are not allowed
Open

     * Get permitted modules.

Spaces must be used to indent lines; tabs are not allowed
Open

     * @api

Line exceeds 120 characters; contains 131 characters
Open

     *        @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),

Line exceeds 120 characters; contains 189 characters
Open

     *        @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),

Spaces must be used to indent lines; tabs are not allowed
Open

    /** {@inheritdoc}  */

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

    public $allowedMethod = ['GET'];

Spaces must be used to indent lines; tabs are not allowed
Open

     * @OA\Get(

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return array

There are no issues that match your filters.

Category
Status