Completed
Push — master ( bde6a0...48fd94 )
by
unknown
13:22
created

UpdateEntityMergeOptions::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 1 Features 0
Metric Value
dl 0
loc 12
rs 9.4285
c 3
b 1
f 0
cc 1
eloc 8
nc 1
nop 2
1
<?php
2
3
namespace OroCRM\Bundle\AccountBundle\Migrations\Schema\v1_12;
4
5
use Doctrine\DBAL\Schema\Schema;
6
7
use Oro\Bundle\EntityConfigBundle\Migration\UpdateEntityConfigFieldValueQuery;
8
use Oro\Bundle\MigrationBundle\Migration\Migration;
9
use Oro\Bundle\MigrationBundle\Migration\QueryBag;
10
11
use OroCRM\Bundle\AccountBundle\Entity\Account;
12
13
class UpdateEntityMergeOptions implements Migration
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function up(Schema $schema, QueryBag $queries)
19
    {
20
        $queries->addQuery(
21
            new UpdateEntityConfigFieldValueQuery(
22
                Account::class,
23
                'extend_description',
24
                'merge',
25
                'autoescape',
26
                false
0 ignored issues
show
Documentation introduced by
false is of type boolean, but the function expects a string.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
27
            )
28
        );
29
    }
30
}
31