YetiForceCompany/YetiForceCRM

View on GitHub
app/Layout/Icon.php

Summary

Maintainability
A
0 mins
Test Coverage
F
15%

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

        $dir = new \DirectoryIterator($path);
Severity: Minor
Found in app/Layout/Icon.php by phpmd

MissingImport

Since: 2.7.0

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

Example

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

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

Avoid using static access to class '\Vtiger_Theme' in method 'getImageIcons'.
Open

                $images[] = ['type' => 'image', 'name' => $file, 'path' => \Vtiger_Theme::getImagePath($file)];
Severity: Minor
Found in app/Layout/Icon.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\Layout' in method 'getImageIcons'.
Open

        $path = 'public_html' . \DIRECTORY_SEPARATOR . 'layouts' . \DIRECTORY_SEPARATOR . \App\Layout::getActiveLayout() . \DIRECTORY_SEPARATOR . 'images' . \DIRECTORY_SEPARATOR;
Severity: Minor
Found in app/Layout/Icon.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 "far fa-file-excel" 3 times.
Open

        'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'far fa-file-excel',
Severity: Critical
Found in app/Layout/Icon.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.

Define a constant instead of duplicating this literal "far fa-file-powerpoint" 5 times.
Open

        'application/vnd.openxmlformats-officedocument.presentationml.template' => 'far fa-file-powerpoint',
Severity: Critical
Found in app/Layout/Icon.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.

Define a constant instead of duplicating this literal "far fa-file-word" 4 times.
Open

        'application/msword' => 'far fa-file-word',
Severity: Critical
Found in app/Layout/Icon.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.

Define a constant instead of duplicating this literal "far fa-file-archive" 4 times.
Open

        'application/zip' => 'far fa-file-archive',
Severity: Critical
Found in app/Layout/Icon.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.

Define a constant instead of duplicating this literal "far fa-file-code" 4 times.
Open

        'text/json' => 'far fa-file-code',
Severity: Critical
Found in app/Layout/Icon.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.

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

        'text/plain' => 'far fa-file-alt',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'text/html' => 'fab fa-html5',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'text/json' => 'far fa-file-code',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        if (empty($fileIcon)) {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/zip' => 'far fa-file-archive',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        return $fileIcon;
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        if (!isset(static::$icons)) {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/pdf' => 'far fa-file-pdf',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/vnd.oasis.opendocument.text' => 'far fa-file-word',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            $fileIcon = 'yfm-Documents';
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    private static $extensionIcon = [
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/rtf' => 'far fa-file-alt',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'text/vcard' => 'fas fa-calendar-alt',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    ];
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        $explodeExtension = explode('/', $exntension ?? '');
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * Init icons data.
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/vnd.oasis.opendocument.spreadsheet' => 'far fa-file-excel',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/vnd.oasis.opendocument.presentation' => 'far fa-file-powerpoint',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        $explodeExtension = reset($explodeExtension);
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * @return void
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    protected static $icons;
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/vnd.openxmlformats-officedocument.word' => 'far fa-file-word',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/x-7z-compressed' => 'far fa-file-archive',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/msword' => 'far fa-file-word',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/x-compressed-zip' => 'far fa-file-archive',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * Icons.
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'far fa-file-excel',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/x-shockwave-flash' => 'far fa-file-image',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/vnd.oasis.opendocument.text' => 'far fa-file-word',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/javascript' => 'far fa-file-code',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    public static function getIconByFileType($exntension)
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        return $icons;
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        $icons = [];
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        return array_merge(
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            self::getYetiForceIcons(),
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/x-rar-compressed' => 'far fa-file-archive',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'text/css' => 'fab fa-css3',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * Get admin icons.
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        foreach (self::$icons['admin'] as $icon) {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        $icons = [];
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        foreach (self::$icons['mdi'] as $icon) {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    public static function getAll(): array
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'far fa-file-powerpoint',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'video' => 'far fa-file-video',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    public static function init()
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * @return array
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            $icons[] = ['type' => 'icon', 'name' => 'AdditionalIcon-' . $icon];
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * @return array
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * Get all icons and images.
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            $fileIcon = self::$extensionIcon[$explodeExtension];
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        if (isset(self::$extensionIcon[$exntension])) {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            static::$icons = require 'app_data/icons.php';
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * Get mdi icons.
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        foreach (self::$icons['yfm'] as $icon) {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            self::getImageIcons(),
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            self::getMaterialDesignIcons()
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/vnd.ms-powerpointtd>' => 'far fa-file-powerpoint',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'audio' => 'far fa-file-audio',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        $icons = [];
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * @return array
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        return $icons;
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    public static function getImageIcons(): array
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            self::getAdminIcons(),
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/vnd.ms-excel' => 'far fa-file-excel',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'image' => 'far fa-file-image',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'text/xml' => 'far fa-file-code',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        return $icons;
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    public static function getMaterialDesignIcons(): array
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            $icons[] = ['type' => 'icon', 'name' => 'mdi mdi-' . $icon];
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * Get icon images.
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

                $images[] = ['type' => 'image', 'name' => $file, 'path' => \Vtiger_Theme::getImagePath($file)];
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        return array_merge(
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'far fa-file-powerpoint',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'text/calendar' => 'fas fa-calendar-alt',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            $fileIcon = self::$extensionIcon[$exntension];
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    public static function getAdminIcons(): array
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    public static function getAdditionalIcons(): array
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            $icons[] = ['type' => 'icon', 'name' => 'yfm-' . $icon];
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            self::getMaterialDesignIcons()
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * @var array
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/vnd.openxmlformats-officedocument.presentationml.template' => 'far fa-file-powerpoint',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        'application/x-javascript' => 'far fa-file-code',
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        if (isset(self::$extensionIcon[$explodeExtension])) {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            $icons[] = ['type' => 'icon', 'name' => 'adminIcon-' . $icon];
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        $path = 'public_html' . \DIRECTORY_SEPARATOR . 'layouts' . \DIRECTORY_SEPARATOR . \App\Layout::getActiveLayout() . \DIRECTORY_SEPARATOR . 'images' . \DIRECTORY_SEPARATOR;
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * @return array
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            self::getFontAwesomeIcons(),
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        static::init();
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        );
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        $icons = [];
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * Get fa icons.
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        foreach (self::$icons['fa'] as $icon) {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            $icons[] = ['type' => 'icon', 'name' => $icon];
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        return $icons;
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        $dir = new \DirectoryIterator($path);
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        foreach ($dir as $fileinfo) {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * @return array
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        foreach (self::$icons['additional'] as $icon) {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    public static function getFontAwesomeIcons(): array
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * @return array
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            self::getAdditionalIcons(),
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            self::getAdminIcons(),
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * Get additional icons.
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        $icons = [];
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            self::getYetiForceIcons(),
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * Get only icons excluding images.
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        return $icons;
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    public static function getYetiForceIcons(): array
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            $file = $fileinfo->getFilename();
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            self::getFontAwesomeIcons(),
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * @return array
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        foreach (self::$icons['yfi'] as $icon) {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        );
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

    public static function getIcons(): array
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * Get yeti icons.
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            $icons[] = ['type' => 'icon', 'name' => 'yfi-' . $icon];
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     * @return array
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        $images = [];
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

Line exceeds 120 characters; contains 178 characters
Open

        $path = 'public_html' . \DIRECTORY_SEPARATOR . 'layouts' . \DIRECTORY_SEPARATOR . \App\Layout::getActiveLayout() . \DIRECTORY_SEPARATOR . 'images' . \DIRECTORY_SEPARATOR;
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            if (!$fileinfo->isDot()) {
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        return $images;
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

        static::init();
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

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

            self::getAdditionalIcons(),
Severity: Minor
Found in app/Layout/Icon.php by phpcodesniffer

There are no issues that match your filters.

Category
Status