YetiForceCompany/YetiForceCRM

View on GitHub
app/Utils/Completions.php

Summary

Maintainability
A
1 hr
Test Coverage
F
42%

Function decodeRow has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    private static function decodeRow(string $baseText, string $type, int $id, string $label, string $format = self::FORMAT_HTML): string
    {
        $html = '';
        if (self::RECORD_SEPARATOR === $type) {
            switch ($format) {
Severity: Minor
Found in app/Utils/Completions.php - About 1 hr 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

Method decodeRow has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    private static function decodeRow(string $baseText, string $type, int $id, string $label, string $format = self::FORMAT_HTML): string
Severity: Minor
Found in app/Utils/Completions.php - About 35 mins to fix

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

            } else {
                $html = $recordLabel;
            }
    Severity: Minor
    Found in app/Utils/Completions.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\Json' in method 'getEmojis'.
    Open

                foreach (\App\Json::decode(\file_get_contents(static::PATH_EMOJI_JSON)) as $val) {
    Severity: Minor
    Found in app/Utils/Completions.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\Privilege' in method 'decodeRecord'.
    Open

            } elseif (\App\Privilege::isPermitted($moduleName, 'DetailView', $recordId)) {
    Severity: Minor
    Found in app/Utils/Completions.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\Cache' in method 'getEmojis'.
    Open

                \App\Cache::save('App\Utils\Text', 'emojis', $emojis);
    Severity: Minor
    Found in app/Utils/Completions.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\Cache' in method 'getEmojis'.
    Open

                $emojis = \App\Cache::get('App\Utils\Text', 'emojis');
    Severity: Minor
    Found in app/Utils/Completions.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 getEmojis uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $emojis = [];
            }
    Severity: Minor
    Found in app/Utils/Completions.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 assigning values to variables in if clauses and the like (line '307', column '9').
    Open

        private static function decodeRecord(int $recordId, string $recordLabel): string
        {
            if (!($moduleName = \App\Record::getType($recordId))) {
                $html = static::deletedRecordTemplate($recordLabel);
            } elseif (\App\Privilege::isPermitted($moduleName, 'DetailView', $recordId)) {
    Severity: Minor
    Found in app/Utils/Completions.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\Cache' in method 'getEmojis'.
    Open

            if (\App\Cache::has('App\Utils\Text', 'emojis')) {
    Severity: Minor
    Found in app/Utils/Completions.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 decodeRow uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $html = $baseText;
            }
    Severity: Minor
    Found in app/Utils/Completions.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

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

                    } else {
                        $label = '';
                    }
    Severity: Minor
    Found in app/Utils/Completions.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\Record' in method 'decodeRecordText'.
    Open

            if (\App\Record::isExists($recordId)) {
    Severity: Minor
    Found in app/Utils/Completions.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\Record' in method 'decodeRecord'.
    Open

            if (!($moduleName = \App\Record::getType($recordId))) {
    Severity: Minor
    Found in app/Utils/Completions.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\Record' in method 'decodeRecordText'.
    Open

                $html = \App\Record::getLabel($recordId);
    Severity: Minor
    Found in app/Utils/Completions.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\User' in method 'decodeOwnerText'.
    Open

            if (\App\User::isExists($userId)) {
    Severity: Minor
    Found in app/Utils/Completions.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 decodeOwnerText uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $html = static::deletedRecordTemplate($recordLabel);
            }
    Severity: Minor
    Found in app/Utils/Completions.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\TextUtils' in method 'decodeCustomTag'.
    Open

                    $attributes = \App\TextUtils::getTagAttributes($matches[0]);
    Severity: Minor
    Found in app/Utils/Completions.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\User' in method 'decodeOwner'.
    Open

            if (!\App\User::isExists($userId)) {
    Severity: Minor
    Found in app/Utils/Completions.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 decodeOwner uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $isRecordPermitted = \App\User::getCurrentUserModel()->isAdmin();
                $popoverRecordClass = $isRecordPermitted ? 'js-popover-tooltip--record' : '';
                $popoverRecordHref = $isRecordPermitted ? "index.php?module=Users&view=Detail&record={$userId}" : '#';
                $html = "<a class=\"js-completions__tag $popoverRecordClass\" href=\"$popoverRecordHref\" data-id=\"@$userId\" data-js=\"click\">" .
    Severity: Minor
    Found in app/Utils/Completions.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

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

            } else {
                $html = static::deletedRecordTemplate($recordLabel);
            }
    Severity: Minor
    Found in app/Utils/Completions.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

    syntax error, unexpected '$matches' (T_VARIABLE), expecting '('
    Open

                fn (array $matches) => static::decodeRow($matches[0], $matches[1], (int) $matches[2], $matches[3], $format),
    Severity: Critical
    Found in app/Utils/Completions.php by phan

    Avoid variables with short names like $id. Configured minimum length is 3.
    Open

                    $id = (int) $matches[2];
    Severity: Minor
    Found in app/Utils/Completions.php by phpmd

    ShortVariable

    Since: 0.2

    Detects when a field, local, or parameter has a very short name.

    Example

    class Something {
        private $q = 15; // VIOLATION - Field
        public static function main( array $as ) { // VIOLATION - Formal
            $r = 20 + $this->q; // VIOLATION - Local
            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                $r += $this->q;
            }
        }
    }

    Source https://phpmd.org/rules/naming.html#shortvariable

    Avoid variables with short names like $id. Configured minimum length is 3.
    Open

        private static function decodeRow(string $baseText, string $type, int $id, string $label, string $format = self::FORMAT_HTML): string
    Severity: Minor
    Found in app/Utils/Completions.php by phpmd

    ShortVariable

    Since: 0.2

    Detects when a field, local, or parameter has a very short name.

    Example

    class Something {
        private $q = 15; // VIOLATION - Field
        public static function main( array $as ) { // VIOLATION - Formal
            $r = 20 + $this->q; // VIOLATION - Local
            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                $r += $this->q;
            }
        }
    }

    Source https://phpmd.org/rules/naming.html#shortvariable

    Terminating statement must be on a line by itself
    Open

                    default: break;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

    Terminating statement must be on a line by itself
    Open

                    default: break;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

    The DEFAULT body must start on the line following the statement
    Open

                    default: break;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

    The DEFAULT body must start on the line following the statement
    Open

                    default: break;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

    Only one argument is allowed per line in a multi-line function call
    Open

                fn (array $matches) => static::decodeRow($matches[0], $matches[1], (int) $matches[2], $matches[3], $format),
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

    Only one argument is allowed per line in a multi-line function call
    Open

                fn (array $matches) => static::decodeRow($matches[0], $matches[1], (int) $matches[2], $matches[3], $format),
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

    Only one argument is allowed per line in a multi-line function call
    Open

                fn (array $matches) => static::decodeRow($matches[0], $matches[1], (int) $matches[2], $matches[3], $format),
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

    Only one argument is allowed per line in a multi-line function call
    Open

                fn (array $matches) => static::decodeRow($matches[0], $matches[1], (int) $matches[2], $matches[3], $format),
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @var string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $text
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $text = preg_replace_callback('/<yetiforce\s(.*)><\/yetiforce>/', function (array $matches) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Get text to edit mode.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param string $text
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    } elseif (self::RECORD_SEPARATOR === $type) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param string $text
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        public static function encodeAll(string $text): string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @var string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    $attributes = \App\TextUtils::getTagAttributes($matches[0]);
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    } else {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @return string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param string $text
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    $recordName = strip_tags($matches[0]);
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

    Line exceeds 120 characters; contains 137 characters
    Open

        private static function decodeRow(string $baseText, string $type, int $id, string $label, string $format = self::FORMAT_HTML): string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                        break;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                fn (array $matches) => static::decodeRow($matches[0], $matches[1], (int) $matches[2], $matches[3], $format),
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    return $return;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            return $text;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Get processed text in display mode.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param string $baseText
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        private static function decodeRow(string $baseText, string $type, int $id, string $label, string $format = self::FORMAT_HTML): string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            $html = '';
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    default: break;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    default: break;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        const FORMAT_HTML = 'HTML';
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @return string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Path to emoji.json.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            if (false !== strpos($text, '<yetiforce')) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

    Line exceeds 120 characters; contains 195 characters
    Open

                                    $return = '<img src="file.php?module=Documents&action=DownloadFile&record=' . $attributes['crm-id'] . '&fileid=' . $attributes['attachment-id'] . '&show=true" />';
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        const EMOJI_REGEX = '/\:{2}[^\:]+\:{2}/';
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Record and Users regex patter.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                        $label = static::decodeRecordText($id, '-');
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $textOut
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @var string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                },
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Get processed text in display Emoji.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    if (!empty($attributes['type'])) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                \App\Cache::save('App\Utils\Text', 'emojis', $emojis);
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                        switch ($attributes['type']) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param string $label
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    if (self::OWNER_SEPARATOR === $type) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            if (self::RECORD_SEPARATOR === $type) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param string $text
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            $emojis = array_flip(static::getEmojis());
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            return \preg_replace_callback(
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @see https://github.com/YetiForceCompany/lib_roundcube/tree/developer/plugins/yetiforce/yetiforce.php#:~:text=function%20decodeCustomTag Function: decodeCustomTag
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            return str_replace(array_keys($emojis), $emojis, $text);
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            } else {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        public static function encode(string $text): string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            );
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                        break;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @example FROM: <a href='#' data-id='@115'>text</a> TO: @@115@@
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $emojis = [];
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                        $html = static::decodeRecordText($id, $label);
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        const ROW_REGEX = '/(\##|\@@)(\d+)_([^\##|\@@]+)(\##|\@@)/u';
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                static::ROW_REGEX,
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        public static function decodeEmoji(string $text): string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            return \preg_replace_callback(
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                function (array $matches) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            return static::encodeRow(static::encodeEmoji($text));
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Get array of emojis.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    $emojis[':' . $val['id'] . ':'] = $val['symbol'];
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param string $type
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Format HTML.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        const PATH_EMOJI_JSON = 'public_html/vendor/ckeditor/ckeditor/plugins/emoji/emoji.json';
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            $text = self::decodeEmoji($text);
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            $text = self::decodeCustomTag($text);
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @return string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Decode custom yetiforce tag.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    $type = $matches[1];
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                        $label = static::decodeOwnerText($id, '-');
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                        $label = '';
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        public static function encodeEmoji(string $text): string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    return "{$type}{$type}{$matches[2]}_{$recordName}{$type}{$type}";
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @return string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                switch ($format) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    case static::FORMAT_TEXT:
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Display record text.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @var string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @var string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Record separator.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                fn (array $matches) => $emojis[$matches[0]] ?? $matches[0],
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param string $text
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            $emojis = static::getEmojis();
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @throws \App\Exceptions\AppException
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $emojis = \App\Cache::get('App\Utils\Text', 'emojis');
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                        $html = static::decodeOwnerText($id, $label);
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        const FORMAT_TEXT = 'Text';
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Owner separator.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        public static function decode(string $text, string $format = self::FORMAT_HTML): string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            );
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                static::EMOJI_REGEX,
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                                break;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                        }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    $id = (int) $matches[2];
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                },
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Process before writing to the database.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            return $emojis;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Format Text.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        const OWNER_SEPARATOR = '@@';
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param string $format
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @return string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    $return = '';
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                }, $text);
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Process before writing to the database.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $text
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        private static function getEmojis(): array
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $html = $baseText;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param string $text
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        public static function decodeCustomTag(string $text): string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                                break;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @return string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            );
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @return string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            if (\App\Cache::has('App\Utils\Text', 'emojis')) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                        break;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        const RECORD_SEPARATOR = '##';
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $text
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                            case 'Documents':
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            $textOut = \preg_replace_callback(
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @example FROM: 😀 TO: :grinning_face:
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param string $text
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            } else {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    case static::FORMAT_HTML:
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                switch ($format) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    case static::FORMAT_HTML:
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            return $html;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @var string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Get processed text in display mode.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            );
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @throws \App\Exceptions\AppException
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                fn (array $matches) => $emojis[$matches[0]] ?? $matches[0],
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $text
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            );
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                static::ROW_REGEX,
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @return array
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                foreach (\App\Json::decode(\file_get_contents(static::PATH_EMOJI_JSON)) as $val) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param string $format
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            } elseif (self::OWNER_SEPARATOR === $type) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Emoji regex patter.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

    Line exceeds 120 characters; contains 169 characters
    Open

         * @see https://github.com/YetiForceCompany/lib_roundcube/tree/developer/plugins/yetiforce/yetiforce.php#:~:text=function%20decodeCustomTag Function: decodeCustomTag
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                static::EMOJI_REGEX,
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @throws \App\Exceptions\AppException
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            return \preg_replace_callback(
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                function (array $matches) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    $type = $matches[1];
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            } elseif (\file_exists(static::PATH_EMOJI_JSON)) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param int    $id
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                        $html = static::decodeRecord($id, $label);
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                        $html = static::decodeOwner($id, $label);
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    case static::FORMAT_TEXT:
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @var string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            $emojis = static::getEmojis();
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                                    $return = '<img src="file.php?module=Documents&action=DownloadFile&record=' . $attributes['crm-id'] . '&fileid=' . $attributes['attachment-id'] . '&show=true" />';
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                            default:
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            return \preg_replace_callback(
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    return "<a href=\"#\" data-id=\"{$type}{$id}\">{$label}</a>";
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Process before writing to the database.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @return string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        public static function encodeRow(string $text): string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                "/<a\\s+[^>]*data-id=(?:\"|')(.)(\\d+)(?:\"|')[^>]*>[^<]+<\\/a>/i",
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $emojis = [];
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                        break;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @return string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            if (\App\Record::isExists($recordId)) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Display record.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param int    $userId
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        private static function decodeRecord(int $recordId, string $recordLabel): string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            return $html;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        private static function decodeOwnerText(int $userId, string $recordLabel): string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            } else {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @return string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            if (!\App\User::isExists($userId)) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    \App\User::getUserModel($userId)->getName() .
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    '</a>';
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param int    $userId
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param string $recordLabel
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            } else {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $html = \App\User::getUserModel($userId)->getName();
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param int    $recordId
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $html = static::deletedRecordTemplate($recordLabel);
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            return $html;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            } else {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Display deleted record template.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @return string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            return "<span class=\"text-strike\">{$recordLabel}</span>";
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            if (!($moduleName = \App\Record::getType($recordId))) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            } elseif (\App\Privilege::isPermitted($moduleName, 'DetailView', $recordId)) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

    Line exceeds 120 characters; contains 178 characters
    Open

                $html = "<a href=\"index.php?module={$moduleName}&view=Detail&record={$recordId}\" class=\"js-popover-tooltip--record\" target=\"_blank\" data-id=\"#{$recordId}\">" .
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                    $recordLabel . '</a>&nbsp;';
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $html = $recordLabel;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $popoverRecordClass = $isRecordPermitted ? 'js-popover-tooltip--record' : '';
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

    Line exceeds 120 characters; contains 144 characters
    Open

                $html = "<a class=\"js-completions__tag $popoverRecordClass\" href=\"$popoverRecordHref\" data-id=\"@$userId\" data-js=\"click\">" .
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param string $recordLabel
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $html = static::deletedRecordTemplate($recordLabel);
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Display owner text.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            return $html;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        private static function deletedRecordTemplate(string $recordLabel): string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $html = \App\Record::getLabel($recordId);
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param string $recordLabel
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            } else {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            if (\App\User::isExists($userId)) {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $html = static::deletedRecordTemplate($recordLabel);
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * Display owner.
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        private static function decodeOwner(int $userId, string $recordLabel): string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            return $html;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        private static function decodeRecordText(int $recordId, string $recordLabel): string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param int    $recordId
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @return string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $html = "<a href=\"index.php?module={$moduleName}&view=Detail&record={$recordId}\" class=\"js-popover-tooltip--record\" target=\"_blank\" data-id=\"#{$recordId}\">" .
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $html = "<a class=\"js-completions__tag $popoverRecordClass\" href=\"$popoverRecordHref\" data-id=\"@$userId\" data-js=\"click\">" .
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $html = static::deletedRecordTemplate($recordLabel);
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $popoverRecordHref = $isRecordPermitted ? "index.php?module=Users&view=Detail&record={$userId}" : '#';
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param string $recordLabel
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

                $isRecordPermitted = \App\User::getCurrentUserModel()->isAdmin();
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @return string
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

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

         * @param string $recordLabel
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

    Space before opening parenthesis of function call prohibited
    Open

                fn (array $matches) => $emojis[$matches[0]] ?? $matches[0],
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

    Space before opening parenthesis of function call prohibited
    Open

                fn (array $matches) => static::decodeRow($matches[0], $matches[1], (int) $matches[2], $matches[3], $format),
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

    Space before opening parenthesis of function call prohibited
    Open

                fn (array $matches) => $emojis[$matches[0]] ?? $matches[0],
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

    Closing brace must be on a line by itself
    Open

                    default: break;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

    Closing brace must be on a line by itself
    Open

                    default: break;
    Severity: Minor
    Found in app/Utils/Completions.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status