doctrine / orm

@@ -23,7 +23,7 @@
Loading
23 23
    /**
24 24
     * Converts a comparison expression into the target query language output.
25 25
     *
26 -
     * @return void
26 +
     * {@inheritDoc}
27 27
     */
28 28
    public function walkComparison(Comparison $comparison)
29 29
    {
@@ -32,35 +32,39 @@
Loading
32 32
        $operator = $comparison->getOperator();
33 33
34 34
        if (($operator === Comparison::EQ || $operator === Comparison::IS) && $value === null) {
35 -
            return;
35 +
            return null;
36 36
        } elseif ($operator === Comparison::NEQ && $value === null) {
37 -
            return;
37 +
            return null;
38 38
        }
39 39
40 40
        $this->values[] = $value;
41 41
        $this->types[]  = [$field, $value, $operator];
42 +
43 +
        return null;
42 44
    }
43 45
44 46
    /**
45 47
     * Converts a composite expression into the target query language output.
46 48
     *
47 -
     * @return void
49 +
     * {@inheritDoc}
48 50
     */
49 51
    public function walkCompositeExpression(CompositeExpression $expr)
50 52
    {
51 53
        foreach ($expr->getExpressionList() as $child) {
52 54
            $this->dispatch($child);
53 55
        }
56 +
57 +
        return null;
54 58
    }
55 59
56 60
    /**
57 61
     * Converts a value expression into the target query language part.
58 62
     *
59 -
     * @return void
63 +
     * {@inheritDoc}
60 64
     */
61 65
    public function walkValue(Value $value)
62 66
    {
63 -
        return;
67 +
        return null;
64 68
    }
65 69
66 70
    /**

@@ -464,14 +464,14 @@
Loading
464 464
                        break;
465 465
                    }
466 466
467 -
                    if ($value !== null && isset($cacheKeyInfo['enumType'])) {
468 -
                        $value = $this->buildEnum($value, $cacheKeyInfo['enumType']);
469 -
                    }
470 -
471 467
                    $rowData['data'][$dqlAlias][$fieldName] = $type
472 468
                        ? $type->convertToPHPValue($value, $this->_platform)
473 469
                        : $value;
474 470
471 +
                    if ($rowData['data'][$dqlAlias][$fieldName] !== null && isset($cacheKeyInfo['enumType'])) {
472 +
                        $rowData['data'][$dqlAlias][$fieldName] = $this->buildEnum($rowData['data'][$dqlAlias][$fieldName], $cacheKeyInfo['enumType']);
473 +
                    }
474 +
475 475
                    if ($cacheKeyInfo['isIdentifier'] && $value !== null) {
476 476
                        $id[$dqlAlias]                .= '|' . $value;
477 477
                        $nonemptyComponents[$dqlAlias] = true;

@@ -76,12 +76,11 @@
Loading
76 76
    }
77 77
78 78
    /**
79 -
     * Do an optimized search of an element
79 +
     * {@inheritDoc}
80 80
     *
81 -
     * @param object $element
82 -
     * @psalm-param TValue $element
81 +
     * Do an optimized search of an element
83 82
     *
84 -
     * @return bool
83 +
     * @template TMaybeContained
85 84
     */
86 85
    public function contains($element)
87 86
    {

@@ -63,8 +63,8 @@
Loading
63 63
    }
64 64
65 65
    /**
66 -
     * @param object                         $object
67 -
     * @param int|string|int[]|string[]|null $value
66 +
     * @param object                                                 $object
67 +
     * @param int|string|int[]|string[]|BackedEnum|BackedEnum[]|null $value
68 68
     */
69 69
    public function setValue($object, $value = null): void
70 70
    {
@@ -82,11 +82,15 @@
Loading
82 82
    }
83 83
84 84
    /**
85 -
     * @param object     $object
86 -
     * @param int|string $value
85 +
     * @param object                $object
86 +
     * @param int|string|BackedEnum $value
87 87
     */
88 88
    private function initializeEnumValue($object, $value): BackedEnum
89 89
    {
90 +
        if ($value instanceof BackedEnum) {
91 +
            return $value;
92 +
        }
93 +
90 94
        $enumType = $this->enumType;
91 95
92 96
        try {

@@ -393,6 +393,8 @@
Loading
393 393
394 394
    /**
395 395
     * {@inheritdoc}
396 +
     *
397 +
     * @template TMaybeContained
396 398
     */
397 399
    public function contains($element): bool
398 400
    {
Files Coverage
lib/Doctrine/ORM 85.72%
Project Totals (371 files) 85.72%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading