YetiForceCompany/YetiForceCRM

View on GitHub
tests/App/FieldModel.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Missing class import via use statement (line '138', column '18').
Open

        $request = new \App\Request([], false);
Severity: Minor
Found in tests/App/FieldModel.php by phpmd

MissingImport

Since: 2.7.0

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

Example

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

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

Missing class import via use statement (line '116', column '18').
Open

        $request = new \App\Request([], false);
Severity: Minor
Found in tests/App/FieldModel.php by phpmd

MissingImport

Since: 2.7.0

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

Example

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

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

Missing class import via use statement (line '41', column '24').
Open

        $fieldInstance = new \vtlib\Field();
Severity: Minor
Found in tests/App/FieldModel.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_Field_Model' in method 'createFieldModel'.
Open

        return self::$fields[$key] = \Vtiger_Field_Model::getInstanceFromFieldObject($fieldInstance);
Severity: Minor
Found in tests/App/FieldModel.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 "varchar(255)" 20 times.
Open

            [5, 'D~O', 'varchar(255)', '2018-07-02'],
Severity: Critical
Found in tests/App/FieldModel.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.

Assigning 'custom_sender' to property but \vtlib\Field->column is false
Open

        $fieldInstance->column = 'custom_sender';
Severity: Minor
Found in tests/App/FieldModel.php by phan

Call to undeclared method \Tests\App\FieldModel::expectExceptionCode
Open

        $this->expectExceptionCode(406);
Severity: Critical
Found in tests/App/FieldModel.php by phan

Call to undeclared method \Tests\App\FieldModel::expectExceptionCode
Open

        $this->expectExceptionCode(406);
Severity: Critical
Found in tests/App/FieldModel.php by phan

Assigning 'vtiger_contactsubdetails' to property but \vtlib\Field->table is false
Open

        $fieldInstance->table = 'vtiger_contactsubdetails';
Severity: Minor
Found in tests/App/FieldModel.php by phan

Call to undeclared method \Tests\App\FieldModel::expectExceptionCode
Open

        $this->expectExceptionCode(406);
Severity: Critical
Found in tests/App/FieldModel.php by phan

Call to undeclared method \Tests\App\FieldModel::assertNull
Open

        $this->assertNull($fieldModel->getUITypeModel()->setDefaultValueFromRequest($request));
Severity: Critical
Found in tests/App/FieldModel.php by phan

Call to undeclared method \Tests\App\FieldModel::assertNull
Open

        $this->assertNull($fieldModel->getUITypeModel()->validate($value, true));
Severity: Critical
Found in tests/App/FieldModel.php by phan

Call to undeclared method \Tests\App\FieldModel::assertSame
Open

        $this->assertSame($value, $fieldModel->get('defaultvalue'));
Severity: Critical
Found in tests/App/FieldModel.php by phan

Call to undeclared method \Tests\App\FieldModel::assertNull
Open

        $this->assertNull($fieldModel->getUITypeModel()->validate($value, false));
Severity: Critical
Found in tests/App/FieldModel.php by phan

Assigning string to property but \vtlib\Field->columntype is false
Open

        $fieldInstance->columntype = $columnType;
Severity: Minor
Found in tests/App/FieldModel.php by phan

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

     */
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param string $columnType
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * Test validate for wrong data.
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        ];
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    public function providerGoodDataForDefault()
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    protected static $fields;
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $request->set('val', $value);
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * Data provider for the test of correct data. For the "setDefaultValueFromRequest" method test.
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    protected function createFieldModel(int $uiType, string $typeOfData, string $columnType)
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @dataProvider providerGoodData
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $this->assertNull($fieldModel->getUITypeModel()->validate($value, false));
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param string $typeOfData
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * Test default value for wrong data.
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param mixed  $value
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @throws \App\Exceptions\Security
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @return array
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @return array
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', '2018-07-02'],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', '$(date : first day of next month)$'],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    public function testValidateGoodData(int $uiType, string $typeOfData, string $columnType, $value)
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * Test validate for user format.
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    public function testValidateWrongData(int $uiType, string $typeOfData, string $columnType, $value)
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $fieldModel = self::createFieldModel($uiType, $typeOfData, $columnType);
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        ];
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', '201872a'],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', '$date : now$'],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', '$(date)$'],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $fieldInstance->label = 'FL_LABEL';
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param int    $uiType
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    public function testValidateUserFormatWrongData(int $uiType, string $typeOfData, string $columnType, $value)
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $fieldModel->getUITypeModel()->validate($value, true);
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    public function testDefaultValueGoodData(int $uiType, string $typeOfData, string $columnType, $value)
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $request = new \App\Request([], false);
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    public function providerWrongData()
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', '(date : now)'],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $fieldModel->getUITypeModel()->setDefaultValueFromRequest($request);
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * Data provider for the test of wrong data. For the "validate" method test.
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', '$(date : yesterday)$'],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $this->expectExceptionCode(406);
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        return [
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', '2018-72-12'],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', '$(date : monday next week)$'],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', '$(date : last day of this month)$'],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', '201807o2'],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $fieldInstance = new \vtlib\Field();
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $this->expectExceptionCode(406);
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $this->expectExceptionCode(406);
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * Data provider for the test of correct data. For the "validate" method test.
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @return array
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @var \Vtiger_Field_Model[]
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param int    $uiType
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $fieldInstance->name = 'custom_sender';
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $fieldInstance->uitype = $uiType;
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param string $columnType
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $this->assertNull($fieldModel->getUITypeModel()->validate($value, true));
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param mixed  $value
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @dataProvider providerWrongData
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    public function providerGoodData()
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @return array
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @codeCoverageIgnore
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * Data provider for the test of wrong data. For the "setDefaultValueFromRequest" method test.
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        return [
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        return self::$fields[$key] = \Vtiger_Field_Model::getInstanceFromFieldObject($fieldInstance);
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * Test validate for good data.
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param mixed  $value
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * Create Vtiger_Field_Model for tests.
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param int    $uiType
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        }
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param string $typeOfData
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $fieldModel = self::createFieldModel($uiType, $typeOfData, $columnType);
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param mixed  $value
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param string $columnType
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $fieldModel = self::createFieldModel($uiType, $typeOfData, $columnType);
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $request->set('val', $value);
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $fieldModel->name = 'val';
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param string $columnType
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        ];
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @codeCoverageIgnore
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', 20180612],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', '$(date : tomorrow)$'],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', '$(date : first day of this month)$'],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', 20180612],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $key = \md5($uiType . $typeOfData . $columnType);
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $fieldInstance->typeofdata = $typeOfData;
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $fieldModel = self::createFieldModel($uiType, $typeOfData, $columnType);
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param string $typeOfData
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param string $columnType
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @dataProvider providerWrongData
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $fieldModel = self::createFieldModel($uiType, $typeOfData, $columnType);
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $fieldModel->name = 'val';
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $request = new \App\Request([], false);
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param int    $uiType
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', '2018-07-02'],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @return \Vtiger_Field_Model
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        if (isset(self::$fields[$key])) {
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $fieldInstance->column = 'custom_sender';
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param int    $uiType
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @throws \App\Exceptions\Security
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @dataProvider providerGoodDataForDefault
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    public function testDefaultValueWrongData(int $uiType, string $typeOfData, string $columnType, $value)
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        return [
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param string $typeOfData
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @codeCoverageIgnore
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            return self::$fields[$key];
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $fieldInstance->table = 'vtiger_contactsubdetails';
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $fieldInstance->columntype = $columnType;
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param string $typeOfData
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param mixed  $value
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param string $columnType
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $fieldModel->getUITypeModel()->validate($value, false);
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $this->assertNull($fieldModel->getUITypeModel()->setDefaultValueFromRequest($request));
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        $this->assertSame($value, $fieldModel->get('defaultvalue'));
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param string $typeOfData
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @dataProvider providerWrongDataForDefault
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', '$(date : monday this week)$'],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @codeCoverageIgnore
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    public function providerWrongDataForDefault()
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        return [
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @codeCoverageIgnore
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', '$(date : now)$'],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

        ];
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * @param int    $uiType
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

     * Test default value for good data.
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', '-2018-02-12'],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

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

            [5, 'D~O', 'varchar(255)', 'abc'],
Severity: Minor
Found in tests/App/FieldModel.php by phpcodesniffer

There are no issues that match your filters.

Category
Status