YetiForceCompany/YetiForceCRM

View on GitHub
api/webservice/WebservicePremium/ModComments/Record.php

Summary

Maintainability
A
0 mins
Test Coverage
B
85%

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

            throw new \Api\Core\Exception('No permissions for data provided in the request', 403);

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

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

    /** {@inheritdoc} */

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

        $this->recordModel->set('assigned_user_id', $this->getUserData('user_id'));

Line exceeds 120 characters; contains 158 characters
Open

        if ($this->controller->request->has('assigned_user_id') || $this->controller->request->has('customer') || $this->controller->request->has('userid')) {

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

        if ($this->getUserCrmId()) {

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

            $this->recordModel->set('customer', $this->getUserCrmId());

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

        return parent::post();

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

        if ($this->controller->request->has('assigned_user_id') || $this->controller->request->has('customer') || $this->controller->request->has('userid')) {

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

    public function post(): array

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

            throw new \Api\Core\Exception('No permissions for data provided in the request', 403);

There are no issues that match your filters.

Category
Status