YetiForceCompany/YetiForceCRM

View on GitHub
tests/Gui/ViewsTest.php

Summary

Maintainability
A
1 hr
Test Coverage
A
100%

Method testListView has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testListView(): void
    {
        $this->url('index.php?module=Accounts&view=List');
        static::assertSame('Accounts', $this->driver->findElement(WebDriverBy::id('module'))->getAttribute('value'));
        $this->logs = self::$recordId = $this->driver->findElement(WebDriverBy::id('Accounts_listView_row_1'))->getAttribute('data-id');
Severity: Minor
Found in tests/Gui/ViewsTest.php - About 1 hr to fix

    Avoid using static access to class '\vtlib\Functions' in method 'testListView'.
    Open

    }
    Severity: Minor
    Found in tests/Gui/ViewsTest.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 '\Facebook\WebDriver\WebDriverBy' in method 'testAllModules'.
    Open

                static::assertSame('List', $this->driver->findElement(WebDriverBy::id('view'))->getAttribute('value'));
    Severity: Minor
    Found in tests/Gui/ViewsTest.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 '\Facebook\WebDriver\WebDriverBy' in method 'testListView'.
    Open

            static::assertSame('Accounts', $this->driver->findElement(WebDriverBy::id('module'))->getAttribute('value'));
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Json' in method 'testListView'.
    Open

            static::assertSame([[['accountname', 'a', 'YetiForce']]], \App\Json::decode($searchParams));
    Severity: Minor
    Found in tests/Gui/ViewsTest.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 'vtlib\Functions' in method 'testAllModules'.
    Open

            foreach (vtlib\Functions::getAllModules() as $module) {
    Severity: Minor
    Found in tests/Gui/ViewsTest.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 '\vtlib\Functions' in method 'testListView'.
    Open

    }
    Severity: Minor
    Found in tests/Gui/ViewsTest.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 '\Facebook\WebDriver\WebDriverBy' in method 'testListView'.
    Open

            $this->driver->findElement(WebDriverBy::name('accountname'))->sendKeys('YetiForce');
    Severity: Minor
    Found in tests/Gui/ViewsTest.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 '\vtlib\Functions' in method 'testListView'.
    Open

    }
    Severity: Minor
    Found in tests/Gui/ViewsTest.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 '\vtlib\Functions' in method 'testListView'.
    Open

    }
    Severity: Minor
    Found in tests/Gui/ViewsTest.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 '\Facebook\WebDriver\WebDriverBy' in method 'testListView'.
    Open

            $this->logs = self::$recordId = $this->driver->findElement(WebDriverBy::id('Accounts_listView_row_1'))->getAttribute('data-id');
    Severity: Minor
    Found in tests/Gui/ViewsTest.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 '\Facebook\WebDriver\WebDriverBy' in method 'testAllModules'.
    Open

                static::assertSame($module['name'], $this->driver->findElement(WebDriverBy::id('module'))->getAttribute('value'));
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Remove this commented out code.
    Open

        // {
    Severity: Major
    Found in tests/Gui/ViewsTest.php by sonar-php

    Programmers should not comment out code as it bloats programs and reduces readability.

    Unused code should be deleted and can be retrieved from source control history if required.

    See

    • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
    • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
    • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
    • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

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

                static::assertSame($module['name'], $this->driver->findElement(WebDriverBy::id('module'))->getAttribute('value'));
    Severity: Critical
    Found in tests/Gui/ViewsTest.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 "search_params" 3 times.
    Open

                'search_params' => \vtlib\Functions::getQueryParams($this->driver->getCurrentURL())['search_params'],
    Severity: Critical
    Found in tests/Gui/ViewsTest.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.

    Remove this commented out code.
    Open

        // {
    Severity: Major
    Found in tests/Gui/ViewsTest.php by sonar-php

    Programmers should not comment out code as it bloats programs and reduces readability.

    Unused code should be deleted and can be retrieved from source control history if required.

    See

    • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
    • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
    • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
    • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

    Remove this commented out code.
    Open

        //     $this->driver->findElement(WebDriverBy::cssSelector('[data-type="App\RecordCollectors\Vies"]'))->click();
    Severity: Major
    Found in tests/Gui/ViewsTest.php by sonar-php

    Programmers should not comment out code as it bloats programs and reduces readability.

    Unused code should be deleted and can be retrieved from source control history if required.

    See

    • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
    • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
    • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
    • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

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

            $this->driver->findElement(WebDriverBy::name('accountname'))->sendKeys('YetiForce');
    Severity: Critical
    Found in tests/Gui/ViewsTest.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 "orderby" 3 times.
    Open

                'orderby' => \vtlib\Functions::getQueryParams($this->driver->getCurrentURL())['orderby'],
    Severity: Critical
    Found in tests/Gui/ViewsTest.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.

    Remove this commented out code.
    Open

        //     foreach ($this->driver->findElements(WebDriverBy::cssSelector('.js-tabdrop li')) as $element) {
    Severity: Major
    Found in tests/Gui/ViewsTest.php by sonar-php

    Programmers should not comment out code as it bloats programs and reduces readability.

    Unused code should be deleted and can be retrieved from source control history if required.

    See

    • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
    • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
    • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
    • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

    Remove this commented out code.
    Open

        //     $this->driver->findElement(WebDriverBy::className('js-form-submit-btn'))->click();
    Severity: Major
    Found in tests/Gui/ViewsTest.php by sonar-php

    Programmers should not comment out code as it bloats programs and reduces readability.

    Unused code should be deleted and can be retrieved from source control history if required.

    See

    • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
    • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
    • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
    • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

    Remove this commented out code.
    Open

        // {
    Severity: Major
    Found in tests/Gui/ViewsTest.php by sonar-php

    Programmers should not comment out code as it bloats programs and reduces readability.

    Unused code should be deleted and can be retrieved from source control history if required.

    See

    • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
    • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
    • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
    • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

    Call to method id from undeclared class \Facebook\WebDriver\WebDriverBy
    Open

                static::assertSame('List', $this->driver->findElement(WebDriverBy::id('view'))->getAttribute('value'));
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method executeScript from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

            $this->driver->executeScript('Vtiger_List_Js.triggerListSearch()');
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method getCurrentURL from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

                'url' => $this->driver->getCurrentURL(),
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Static call to undeclared method \Gui_ViewsTest::assertSame
    Open

            static::assertSame([[['accountname', 'a', 'YetiForce']]], \App\Json::decode($searchParams));
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Static call to undeclared method \Gui_ViewsTest::assertSame
    Open

                static::assertSame($module['name'], $this->driver->findElement(WebDriverBy::id('module'))->getAttribute('value'));
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Static call to undeclared method \Gui_ViewsTest::assertSame
    Open

            static::assertSame('Accounts', $this->driver->findElement(WebDriverBy::id('module'))->getAttribute('value'));
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Static call to undeclared method \Gui_ViewsTest::assertNotEmpty
    Open

            static::assertNotEmpty(self::$recordId);
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method id from undeclared class \Facebook\WebDriver\WebDriverBy
    Open

                static::assertSame($module['name'], $this->driver->findElement(WebDriverBy::id('module'))->getAttribute('value'));
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method getCurrentURL from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

            $searchParams = \vtlib\Functions::getQueryParams($this->driver->getCurrentURL())['search_params'] ?? '[]';
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method getCurrentURL from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

                'url' => $this->driver->getCurrentURL(),
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method executeScript from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

            $this->driver->executeScript("$('.Accounts_listViewHeader_action_LBL_SHOW_MAP').click()");
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method findElement from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

                static::assertSame('List', $this->driver->findElement(WebDriverBy::id('view'))->getAttribute('value'));
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method name from undeclared class \Facebook\WebDriver\WebDriverBy
    Open

            $this->driver->findElement(WebDriverBy::name('accountname'))->sendKeys('YetiForce');
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method findElement from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

            $this->driver->findElement(WebDriverBy::name('accountname'))->sendKeys('YetiForce');
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method id from undeclared class \Facebook\WebDriver\WebDriverBy
    Open

            static::assertSame('Accounts', $this->driver->findElement(WebDriverBy::id('module'))->getAttribute('value'));
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method executeScript from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

            $this->driver->executeScript("$('.js-change-order[data-columnname=\"accountname\"]').click()");
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method executeScript from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

            $this->driver->executeScript("$('.Accounts_listViewHeader_action_LBL_SEND_NOTIFICATION').click()");
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method findElement from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

                static::assertSame($module['name'], $this->driver->findElement(WebDriverBy::id('module'))->getAttribute('value'));
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method findElement from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

            static::assertSame('Accounts', $this->driver->findElement(WebDriverBy::id('module'))->getAttribute('value'));
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method findElement from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

            $this->logs = self::$recordId = $this->driver->findElement(WebDriverBy::id('Accounts_listView_row_1'))->getAttribute('data-id');
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method getCurrentURL from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

                'url' => $this->driver->getCurrentURL(),
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method getCurrentURL from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

                'search_params' => \vtlib\Functions::getQueryParams($this->driver->getCurrentURL())['search_params'],
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method id from undeclared class \Facebook\WebDriver\WebDriverBy
    Open

            $this->logs = self::$recordId = $this->driver->findElement(WebDriverBy::id('Accounts_listView_row_1'))->getAttribute('data-id');
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method getCurrentURL from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

                'url' => $this->driver->getCurrentURL(),
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method getCurrentURL from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

                'orderby' => \vtlib\Functions::getQueryParams($this->driver->getCurrentURL())['orderby'],
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method getCurrentURL from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

            static::assertSame('ASC', \vtlib\Functions::getQueryParams($this->driver->getCurrentURL())['orderby']['accountname'] ?? '');
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method getCurrentURL from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

                'url' => $this->driver->getCurrentURL(),
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method executeScript from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

            $this->driver->executeScript("$('#menubar_quickCreate_Accounts').click()");
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method executeScript from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

            $this->driver->executeScript("$('.Accounts_listViewHeader_action_BTN_PERMISSION_INSPECTOR').click()");
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Call to method getCurrentURL from undeclared class \Facebook\WebDriver\Remote\RemoteWebDriver
    Open

                'url' => $this->driver->getCurrentURL(),
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Static call to undeclared method \Gui_ViewsTest::assertSame
    Open

            static::assertSame('ASC', \vtlib\Functions::getQueryParams($this->driver->getCurrentURL())['orderby']['accountname'] ?? '');
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Static call to undeclared method \Gui_ViewsTest::assertSame
    Open

                static::assertSame('List', $this->driver->findElement(WebDriverBy::id('view'))->getAttribute('value'));
    Severity: Critical
    Found in tests/Gui/ViewsTest.php by phan

    Each class must be in a namespace of at least one level (a top-level vendor name)
    Open

    final class Gui_ViewsTest extends \Tests\GuiBase
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

    The class Gui_ViewsTest is not named in CamelCase.
    Open

    final class Gui_ViewsTest extends \Tests\GuiBase
    {
        /** @var int Record ID */
        private static $recordId;
    
    
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpmd

    CamelCaseClassName

    Since: 0.2

    It is considered best practice to use the CamelCase notation to name classes.

    Example

    class class_name {
    }

    Source

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

         * @return void
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            static::assertSame('Accounts', $this->driver->findElement(WebDriverBy::id('module'))->getAttribute('value'));
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->driver->executeScript("$('.js-change-order[data-columnname=\"accountname\"]').click()");
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                'test' => __METHOD__,
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            foreach (vtlib\Functions::getAllModules() as $module) {
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        private static $recordId;
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        public function testAllModules(): void
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

    Line exceeds 120 characters; contains 136 characters
    Open

            $this->logs = self::$recordId = $this->driver->findElement(WebDriverBy::id('Accounts_listView_row_1'))->getAttribute('data-id');
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->logs = [
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

         * Testing the record list all modules.
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                static::assertSame($module['name'], $this->driver->findElement(WebDriverBy::id('module'))->getAttribute('value'));
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                'test' => __METHOD__,
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

    Line exceeds 120 characters; contains 132 characters
    Open

            static::assertSame('ASC', \vtlib\Functions::getQueryParams($this->driver->getCurrentURL())['orderby']['accountname'] ?? '');
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->driver->executeScript('Vtiger_List_Js.triggerListSearch()');
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->findError();
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->driver->executeScript("$('.Accounts_listViewHeader_action_BTN_PERMISSION_INSPECTOR').click()");
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                static::assertSame('List', $this->driver->findElement(WebDriverBy::id('view'))->getAttribute('value'));
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->url('index.php?module=Accounts&view=List');
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

         * Testing the record list.
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            static::assertSame([[['accountname', 'a', 'YetiForce']]], \App\Json::decode($searchParams));
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->findError();
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

         * @return void
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $searchParams = \vtlib\Functions::getQueryParams($this->driver->getCurrentURL())['search_params'] ?? '[]';
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     $this->url('index.php?module=Accounts&view=Edit&record=' . $accountModel->getId());
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     $this->findError();
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     static::assertSame('Accounts', $this->driver->findElement(WebDriverBy::id('module'))->getAttribute('value'));
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        /** @var int Record ID */
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->driver->executeScript("$('.Accounts_listViewHeader_action_LBL_SEND_NOTIFICATION').click()");
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                'test' => __METHOD__,
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->findError();
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

    Line exceeds 120 characters; contains 126 characters
    Open

                static::assertSame($module['name'], $this->driver->findElement(WebDriverBy::id('module'))->getAttribute('value'));
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                'orderby' => \vtlib\Functions::getQueryParams($this->driver->getCurrentURL())['orderby'],
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->findError();
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                'url' => $this->driver->getCurrentURL(),
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        // {
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        // }
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     $this->findError();
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                $this->logs = $module['name'];
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        public function testListView(): void
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->logs = self::$recordId = $this->driver->findElement(WebDriverBy::id('Accounts_listView_row_1'))->getAttribute('data-id');
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            ];
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        // {
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     $this->url('index.php?module=Accounts&view=ListPreview');
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     $this->findError();
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     static::assertSame('Edit', $this->driver->findElement(WebDriverBy::tagName('fromView'))->getAttribute('value'));
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     $this->driver->findElement(WebDriverBy::cssSelector('[data-type="App\RecordCollectors\Vies"]'))->click();
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     $this->driver->findElement(WebDriverBy::className('js-form-submit-btn'))->click();
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                'url' => $this->driver->getCurrentURL(),
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                'test' => __METHOD__,
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->driver->executeScript("$('#menubar_quickCreate_Accounts').click()");
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        /*
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                $this->findError();
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->driver->findElement(WebDriverBy::name('accountname'))->sendKeys('YetiForce');
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->logs = [
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                'search_params' => \vtlib\Functions::getQueryParams($this->driver->getCurrentURL())['search_params'],
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        /*
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     $this->url('index.php?module=Accounts&view=Detail&record=' . $accountModel->getId());
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //         $element->click();
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        // public function testDetailView(): void
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                'url' => $this->driver->getCurrentURL(),
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            static::assertSame('ASC', \vtlib\Functions::getQueryParams($this->driver->getCurrentURL())['orderby']['accountname'] ?? '');
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->driver->executeScript("$('.Accounts_listViewHeader_action_LBL_SHOW_MAP').click()");
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            ];
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        // {
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     static::assertSame($accountModel->getId(), $this->driver->findElement(WebDriverBy::tagName('recordId'))->getAttribute('value'));
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     $this->findError();
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                $this->url("index.php?module={$module['name']}&view=List");
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            static::assertNotEmpty(self::$recordId);
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            ];
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            ];
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->logs = [
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            ];
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     }
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

    Line exceeds 120 characters; contains 136 characters
    Open

        //     static::assertSame($accountModel->getId(), $this->driver->findElement(WebDriverBy::tagName('recordId'))->getAttribute('value'));
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                'test' => __METHOD__,
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                'url' => $this->driver->getCurrentURL(),
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     static::assertSame('Detail', $this->driver->findElement(WebDriverBy::id('view'))->getAttribute('value'));
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        // public function testListViews(): void
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     static::assertCount(1, \count($this->driver->findElement(WebDriverBy::className('detailViewContainer'))));
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

    Line exceeds 120 characters; contains 136 characters
    Open

        //     static::assertSame($accountModel->getId(), $this->driver->findElement(WebDriverBy::tagName('recordId'))->getAttribute('value'));
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     $accountModel = \Tests\Base\C_RecordActions::createAccountRecord();
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->logs = [
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->logs = [
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->logs = [
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                'url' => $this->driver->getCurrentURL(),
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //         $this->findError();
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                'url' => $this->driver->getCurrentURL(),
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        // public function testEditView(): void
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     static::assertSame('Accounts', $this->driver->findElement(WebDriverBy::id('module'))->getAttribute('value'));
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        /*
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        // }
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            ];
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->findError();
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

                'test' => __METHOD__,
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

            $this->findError();
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     static::assertSame($accountModel->getId(), $this->driver->findElement(WebDriverBy::tagName('recordId'))->getAttribute('value'));
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     foreach ($this->driver->findElements(WebDriverBy::cssSelector('.js-tabdrop li')) as $element) {
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        // }
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

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

        //     $accountModel = \Tests\Base\C_RecordActions::createAccountRecord();
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

    Class name "Gui_ViewsTest" is not in camel caps format
    Open

    final class Gui_ViewsTest extends \Tests\GuiBase
    Severity: Minor
    Found in tests/Gui/ViewsTest.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status