YetiForceCompany/YetiForceCRM

View on GitHub
app/Integrations/Pbx.php

Summary

Maintainability
A
45 mins
Test Coverage
F
28%

Function getConnectors has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    public static function getConnectors()
    {
        $connectors = [];
        foreach ((new \DirectoryIterator(__DIR__ . \DIRECTORY_SEPARATOR . 'Pbx')) as $fileInfo) {
            $fileName = $fileInfo->getBasename('.php');
Severity: Minor
Found in app/Integrations/Pbx.php - About 45 mins 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

Missing class import via use statement (line '57', column '15').
Open

        return (new \App\Db\Query())->from('s_#__pbx')->where(['default' => 1])->exists();
Severity: Minor
Found in app/Integrations/Pbx.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 '92', column '14').
Open

            throw new \App\Exceptions\AppException('No user phone number');
Severity: Minor
Found in app/Integrations/Pbx.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 '95', column '14').
Open

            throw new \App\Exceptions\AppException('No target phone number');
Severity: Minor
Found in app/Integrations/Pbx.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 '31', column '17').
Open

        foreach ((new \DirectoryIterator(__DIR__ . \DIRECTORY_SEPARATOR . 'Pbx')) as $fileInfo) {
Severity: Minor
Found in app/Integrations/Pbx.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 '100', column '14').
Open

            throw new \App\Exceptions\AppException('No PBX connector found');
Severity: Minor
Found in app/Integrations/Pbx.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 '67', column '16').
Open

        $data = (new \App\Db\Query())->from('s_#__pbx')->where(['default' => 1])->one();
Severity: Minor
Found in app/Integrations/Pbx.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 '\App\Log' in method 'getConnectors'.
Open

                    \App\Log::warning('Not found Pbx class');
Severity: Minor
Found in app/Integrations/Pbx.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

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

        } else {
            return static::$connectors[$className] = new $className();
        }
Severity: Minor
Found in app/Integrations/Pbx.php by phpmd

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 '\App\Log' in method 'getConnectorInstance'.
Open

            \App\Log::warning('Not found Pbx class');
Severity: Minor
Found in app/Integrations/Pbx.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\Json' in method 'getConfig'.
Open

            $this->set('paramArray', \App\Json::decode($this->get('param')));
Severity: Minor
Found in app/Integrations/Pbx.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

Define a constant instead of duplicating this literal "paramArray" 3 times.
Open

        if ($this->isEmpty('paramArray')) {
Severity: Critical
Found in app/Integrations/Pbx.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.

Return type of getConnectorInstance() is undeclared type \App\Integrations\className
Open

    public static function getConnectorInstance($name)
Severity: Minor
Found in app/Integrations/Pbx.php by phan

Return type of getDefaultInstance() is undeclared type \self
Open

    public static function getDefaultInstance()
Severity: Minor
Found in app/Integrations/Pbx.php by phan

Call to undeclared method \App\Db\Query::from
Open

        $data = (new \App\Db\Query())->from('s_#__pbx')->where(['default' => 1])->one();
Severity: Critical
Found in app/Integrations/Pbx.php by phan

Call to method getCurrentUserModel from undeclared class \App\User (Did you mean class \Tests\App\User)
Open

        $this->set('sourcePhone', \App\User::getCurrentUserModel()->getDetail('phone_crm_extension_extra'));
Severity: Critical
Found in app/Integrations/Pbx.php by phan

Call to method getCurrentUserModel from undeclared class \App\User (Did you mean class \Tests\App\User)
Open

        $phone = \App\User::getCurrentUserModel()->getDetail('phone_crm_extension');
Severity: Critical
Found in app/Integrations/Pbx.php by phan

Call to undeclared method \App\Db\Query::from
Open

        return (new \App\Db\Query())->from('s_#__pbx')->where(['default' => 1])->exists();
Severity: Critical
Found in app/Integrations/Pbx.php by phan

Return type of getConnectors() is undeclared type \App\Integrations\className
Open

    public static function getConnectors()
Severity: Minor
Found in app/Integrations/Pbx.php by phan

Property \App\Integrations\Pbx::$connectors has undeclared type \App\Integrations\className[]
Open

    private static $connectors = [];
Severity: Minor
Found in app/Integrations/Pbx.php by phan

Call to method warning from undeclared class \App\Log
Open

                    \App\Log::warning('Not found Pbx class');
Severity: Critical
Found in app/Integrations/Pbx.php by phan

Call to method performCall from undeclared class \App\Integrations\className
Open

        $connector->performCall($this);
Severity: Critical
Found in app/Integrations/Pbx.php by phan

Returning type array{}|object[] but getConnectors() is declared to return \App\Integrations\className
Open

        return $connectors;
Severity: Minor
Found in app/Integrations/Pbx.php by phan

Call to method warning from undeclared class \App\Log
Open

            \App\Log::warning('Not found Pbx class');
Severity: Critical
Found in app/Integrations/Pbx.php by phan

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

     * @return \App\Integrations\className
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     * @var \App\Integrations\className[]
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

                    \App\Log::warning('Not found Pbx class');
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

                    continue;
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     * Whether a call is active with the PBX integration.
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     * @return bool
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        $instance->setData($data);
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        $phone = \App\User::getCurrentUserModel()->getDetail('phone_crm_extension');
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        return (new \App\Db\Query())->from('s_#__pbx')->where(['default' => 1])->exists();
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        return $instance;
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     * Connector Instances.
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        if (empty($phone)) {
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        $instance = new self();
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        $connectors = [];
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        $this->set('sourcePhone', \App\User::getCurrentUserModel()->getDetail('phone_crm_extension_extra'));
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        return $connectors;
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     * Load user phone.
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     * Perform phone call.
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    public function performCall($targetPhone)
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     * Get pbx connectors.
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     * Get default pbx instance.
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     * @param string $targetPhone
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        $this->set('targetPhone', $targetPhone);
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

                if (!class_exists($className)) {
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     * @return \self
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        if (isset(static::$connectors[$className])) {
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

            $fileName = $fileInfo->getBasename('.php');
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

            if ('dir' !== $fileInfo->getType() && 'Base' !== $fileName && 'php' === $fileInfo->getExtension()) {
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        $data = (new \App\Db\Query())->from('s_#__pbx')->where(['default' => 1])->one();
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

            throw new \App\Exceptions\AppException('No user phone number');
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

                }
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

                $connectors[$fileName] = $instance;
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

            }
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    public static function getDefaultInstance()
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    public function loadUserPhone()
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    public static function getConnectorInstance($name)
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        $className = '\App\Integrations\Pbx\\' . $name;
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        $param = $this->get('paramArray');
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

                $instance = new $className();
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

            return false;
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        if (empty($targetPhone)) {
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    public static function getConnectors()
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

                $className = '\App\Integrations\Pbx\\' . $fileName;
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    public static function isActive()
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        } else {
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     * Function to get the confog param for a given key.
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    private static $connectors = [];
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        foreach ((new \DirectoryIterator(__DIR__ . \DIRECTORY_SEPARATOR . 'Pbx')) as $fileInfo) {
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     * @throws \Exception
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

            throw new \App\Exceptions\AppException('No target phone number');
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        $connector = static::getConnectorInstance($this->get('type'));
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        $connector->performCall($this);
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        if (empty($connector)) {
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     * Get connector instance.
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     * @param string $name
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        return false;
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

            \App\Log::warning('Not found Pbx class');
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     * @return mixed Value for the given key
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

            return static::$connectors[$className];
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

            $this->set('paramArray', \App\Json::decode($this->get('param')));
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

            throw new \App\Exceptions\AppException('No PBX connector found');
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        if (!class_exists($className)) {
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

            return static::$connectors[$className] = new $className();
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        if ($this->isEmpty('sourcePhone')) {
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     * @param string $key
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        return $param[$key] ?? null;
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

     * @return \App\Integrations\className|bool
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    public function getConfig($key)
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

        if ($this->isEmpty('paramArray')) {
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Integrations/Pbx.php by phpcodesniffer

There are no issues that match your filters.

Category
Status