YetiForceCompany/YetiForceCRM

View on GitHub
api/webservice/SMS/SMSAPI/Report.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

Missing class import via use statement (line '67', column '14').
Open

            throw new \Api\Core\Exception('No permissions for module', 403);
Severity: Minor
Found in api/webservice/SMS/SMSAPI/Report.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '59', column '14').
Open

            throw new \Api\Core\Exception('No permission - wrong data', 401);
Severity: Minor
Found in api/webservice/SMS/SMSAPI/Report.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Avoid using static access to class '\Vtiger_Record_Model' in method 'get'.
Open

                && ($recordModel = \Vtiger_Record_Model::getInstanceById($recordId, $this->moduleName))->isEditable()
Severity: Minor
Found in api/webservice/SMS/SMSAPI/Report.php by phpmd

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 assigning values to variables in if clauses and the like (line '66', column '131').
Open

    protected function checkPermissionToModule(): void
    {
        if (!\Api\Core\Module::checkModuleAccess($this->moduleName) || !\App\Privilege::isPermitted($this->moduleName, 'EditView') || !($provider = \App\Integrations\SMSProvider::getDefaultProvider()) || 'SMSAPI' !== $provider->getName()) {
            throw new \Api\Core\Exception('No permissions for module', 403);
        }
Severity: Minor
Found in api/webservice/SMS/SMSAPI/Report.php by phpmd

IfStatementAssignment

Since: 2.7.0

Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

Example

class Foo
{
    public function bar($flag)
    {
        if ($foo = 'bar') { // possible typo
            // ...
        }
        if ($baz = 0) { // always false
            // ...
        }
    }
}

Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

Avoid using static access to class '\App\Privilege' in method 'checkPermissionToModule'.
Open

        if (!\Api\Core\Module::checkModuleAccess($this->moduleName) || !\App\Privilege::isPermitted($this->moduleName, 'EditView') || !($provider = \App\Integrations\SMSProvider::getDefaultProvider()) || 'SMSAPI' !== $provider->getName()) {
Severity: Minor
Found in api/webservice/SMS/SMSAPI/Report.php by phpmd

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 '\App\Integrations\SMSProvider' in method 'checkPermissionToModule'.
Open

        if (!\Api\Core\Module::checkModuleAccess($this->moduleName) || !\App\Privilege::isPermitted($this->moduleName, 'EditView') || !($provider = \App\Integrations\SMSProvider::getDefaultProvider()) || 'SMSAPI' !== $provider->getName()) {
Severity: Minor
Found in api/webservice/SMS/SMSAPI/Report.php by phpmd

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 assigning values to variables in if clauses and the like (line '120', column '9').
Open

    public function get()
    {
        $recordIds = $this->controller->request->getExploded('idx', ',', \App\Purifier::INTEGER);
        $msgIds = $this->controller->request->getExploded('MsgId', ',', \App\Purifier::ALNUM);
        $statuses = $this->controller->request->getExploded('status', ',', \App\Purifier::INTEGER);
Severity: Minor
Found in api/webservice/SMS/SMSAPI/Report.php by phpmd

IfStatementAssignment

Since: 2.7.0

Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

Example

class Foo
{
    public function bar($flag)
    {
        if ($foo = 'bar') { // possible typo
            // ...
        }
        if ($baz = 0) { // always false
            // ...
        }
    }
}

Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

Avoid using static access to class '\App\Record' in method 'get'.
Open

            if (\App\Record::isExists($recordId, $this->moduleName)
Severity: Minor
Found in api/webservice/SMS/SMSAPI/Report.php by phpmd

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 '\Api\Core\Module' in method 'checkPermissionToModule'.
Open

        if (!\Api\Core\Module::checkModuleAccess($this->moduleName) || !\App\Privilege::isPermitted($this->moduleName, 'EditView') || !($provider = \App\Integrations\SMSProvider::getDefaultProvider()) || 'SMSAPI' !== $provider->getName()) {
Severity: Minor
Found in api/webservice/SMS/SMSAPI/Report.php by phpmd

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

Remove this unused "STATUSES" private field.
Open

    private const STATUSES = [

If a private field is declared but not used in the program, it can be considered dead code and should therefore be removed. This will improve maintainability because developers will not wonder what the variable is used for.

Noncompliant Code Example

class MyClass {
  private $foo = 4;                       //foo is unused

  public function compute($a) {
    return $a * 4;
  }
}

Compliant Solution

class MyClass {

  public function compute($a) {
    return $a * 4;
  }
}

See

Define a constant instead of duplicating this literal "PLL_FAILED" 4 times.
Open

        402 => 'PLL_FAILED',
Severity: Critical
Found in api/webservice/SMS/SMSAPI/Report.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

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

use OpenApi\Annotations as OA;
Severity: Minor
Found in api/webservice/SMS/SMSAPI/Report.php by phan

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

        parent::checkPermission();

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

    }

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

     *        path="/webservice/SMS/SMSAPI/Report",

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

     *         security={

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="Method Not Allowed",

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

     *    405 => 'UNDELIVERED',

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

     *    411 => 'RENEWAL',

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

        410 => 'PLL_DELIVERED',

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

    {

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

     *        externalDocs={

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

        $recordIds = $this->controller->request->getExploded('idx', ',', \App\Purifier::INTEGER);

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

        $statuses = $this->controller->request->getExploded('status', ',', \App\Purifier::INTEGER);

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

        echo 'OK';

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

     * Update record status.

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

     *        summary="Report for sms",

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=401,

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

     * @OA\Schema(

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

     *    407 => 'REJECTED',

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

    /** {@inheritdoc}  */

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

    /**

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

     * @return void

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

     * @OA\Post(

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

     *        ),

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

            throw new \Api\Core\Exception('No permission - wrong data', 401);

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

     *        summary="Report for sms",

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

     *            "description" : "SMSApi Documentation",

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

     *                description="Method Not Allowed",

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

     *      },

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

     *                description="Result",

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="Response",

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

     *    406 => 'FAILED',

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

     *    408 => 'UNKNOWN',

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

     *        tags={"SMSAPI"},

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

     *                response=405,

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

     * ),

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

     *        schema="SMS_SMSAPI_Get_Report",

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

     *    403 => 'SENT',

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

     *    404 => 'DELIVERED',

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

     *

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

     *         security={

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

     *            {"ApiKeyAuth" : {}, "token" : {}}

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

     */

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

     *        path="/webservice/SMS/SMSAPI/Report",

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

    }

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

     *    407 => 'REJECTED',

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

     *    409 => 'QUEUE',

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

     * Update record status.

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

     *            "url" : "https://www.smsapi.pl/docs"

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

     *            {"ApiKeyAuth" : {}, "token" : {}}

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/SMS_SMSAPI_Get_Report")

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="Response",

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

     *            "url" : "https://www.smsapi.pl/docs"

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

     *                description="Method Not Allowed",

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

     *        title="Response",

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

     *    410 => 'ACCEPTED',

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

     *                response=401,

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

     *                response=403,

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=405,

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

        $msgIds = $this->controller->request->getExploded('MsgId', ',', \App\Purifier::ALNUM);

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

                && !$recordModel->isEmpty('msgid') && \in_array($recordModel->get('msgid'), $msgIds)

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

                && $recordModel->set('smsnotifier_status', static::STATUSES[$statuses[$key]] ?? 'PLL_UNDEFINED')->getPreviousValue()

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

        $this->get();

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

        402 => 'PLL_FAILED',

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

        405 => 'PLL_FAILED',

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

    /** {@inheritdoc}  */

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

     *        summary="Report for sms",

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

     *                description="`No sent token` OR `Invalid token` OR `wrong data provided in the request`",

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

     *    ),

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

        foreach ($recordIds as $key => $recordId) {

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

     *        summary="Report for sms",

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\Response(

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

     *        type="string",

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

     *    411 => 'RENEWAL',

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

     */

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

        408 => 'PLL_SENT',

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

     * @return void

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

     *        externalDocs={

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="Result",

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

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

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

     *        description="Response",

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

     *        externalDocs={

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

     *            "url" : "https://www.smsapi.pl/docs"

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

     *                description="Result",

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

     *                description="`No sent token` OR `Invalid token` OR `wrong data provided in the request`",

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

     *        title="Response",

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

    public function post()

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

        407 => 'PLL_FAILED',

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

    protected function checkPermissionToModule(): void

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

        if (!\Api\Core\Module::checkModuleAccess($this->moduleName) || !\App\Privilege::isPermitted($this->moduleName, 'EditView') || !($provider = \App\Integrations\SMSProvider::getDefaultProvider()) || 'SMSAPI' !== $provider->getName()) {

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

     *        path="/webservice/SMS/SMSAPI/Report",

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

     *        tags={"SMSAPI"},

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

     *                description="Result",

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

     *            "description" : "SMSApi Documentation",

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

     *            {"ApiKeyAuth" : {}, "token" : {}}

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

     *        ),

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

     *                description="`No sent token` OR `Invalid token` OR `wrong data provided in the request`",

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=403,

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

     * ),

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

     *    ),

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

     *    408 => 'UNKNOWN',

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

     *    410 => 'ACCEPTED',

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

     *

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

     *            "description" : "SMSApi Documentation",

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

     *         },

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

     *        example="OK"

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

    public function get()

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

     *        path="/webservice/SMS/SMSAPI/Report",

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

     *         },

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

     *         security={

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

     *         security={

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

     *            {"ApiKeyAuth" : {}, "token" : {}}

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

     *        ),

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

     *    409 => 'QUEUE',

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

        403 => 'PLL_SENT',

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

        }

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

     *                response=200,

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

     *        title="Response",

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

            if (\App\Record::isExists($recordId, $this->moduleName)

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/SMS_SMSAPI_Post_Report")

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

     *                response=405,

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

     *        schema="SMS_SMSAPI_Post_Report",

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

     *        type="string",

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

     *        example="OK"

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

    private const STATUSES = [

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

        if (!$this->controller->request->getExploded('MsgId', ',', \App\Purifier::ALNUM) || !$this->controller->request->getExploded('status', ',', \App\Purifier::INTEGER) || !$this->controller->request->getExploded('to', ',', \App\Purifier::ALNUM)) {

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

            throw new \Api\Core\Exception('No permissions for module', 403);

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

     * @OA\Get(

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

     *            "url" : "https://www.smsapi.pl/docs"

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

     *                description="`No sent token` OR `Invalid token` OR `wrong data provided in the request`",

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

     *        type="string",

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

     *        example="OK"

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

     *        ),

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

     *        description="Response",

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

     *    405 => 'UNDELIVERED',

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

     *    406 => 'FAILED',

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

     *    412 => 'STOP'.

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

     *    412 => 'STOP'.

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

        404 => 'PLL_DELIVERED',

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

        406 => 'PLL_FAILED',

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

    ];

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

    protected function checkPermission(): void

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

     *                response=403,

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

     *        type="string",

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

            ) {

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

                $recordModel->save();

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

            }

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

     *        tags={"SMSAPI"},

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

     *        tags={"SMSAPI"},

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

     *            "description" : "SMSApi Documentation",

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

     *                description="Method Not Allowed",

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

     *    404 => 'DELIVERED',

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

     *        ),

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\Response(

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

     *        ),

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

     *        schema="SMS_SMSAPI_Get_Report",

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

     *        title="Response",

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

                && ($recordModel = \Vtiger_Record_Model::getInstanceById($recordId, $this->moduleName))->isEditable()

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

     *      },

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

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

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=405,

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

     *        schema="SMS_SMSAPI_Post_Report",

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

     */

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

     *        externalDocs={

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

     *                response=401,

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

     *        example="OK"

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

     *

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

     * Get status for record by code.

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

     *  402 => 'EXPIRED',

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

    /** @var string Module name */

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

     * Statuses from api:

Line exceeds 120 characters; contains 132 characters
Open

                && $recordModel->set('smsnotifier_status', static::STATUSES[$statuses[$key]] ?? 'PLL_UNDEFINED')->getPreviousValue()

Line exceeds 120 characters; contains 240 characters
Open

        if (!\Api\Core\Module::checkModuleAccess($this->moduleName) || !\App\Privilege::isPermitted($this->moduleName, 'EditView') || !($provider = \App\Integrations\SMSProvider::getDefaultProvider()) || 'SMSAPI' !== $provider->getName()) {

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

    public $allowedMethod = ['GET', 'POST'];

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

    /**

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

    private $moduleName = 'SMSNotifier';

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

     *    403 => 'SENT',

Line exceeds 120 characters; contains 251 characters
Open

        if (!$this->controller->request->getExploded('MsgId', ',', \App\Purifier::ALNUM) || !$this->controller->request->getExploded('status', ',', \App\Purifier::INTEGER) || !$this->controller->request->getExploded('to', ',', \App\Purifier::ALNUM)) {

There are no issues that match your filters.

Category
Status