Issues (188)

src/Parser/EmbeddedNode.php (2 issues)

1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cycle\ORM\Parser;
6
7
use Cycle\ORM\Exception\ParserException;
8
9
/**
10
 * @internal
11
 */
12
final class EmbeddedNode extends AbstractNode
13
{
14 264
    protected function push(array &$data): void
15
    {
16 264
        if ($this->parent === null) {
17
            throw new ParserException('Unable to register data tree, parent is missing');
18
        }
19
20 264
        $this->parent->mount(
21 264
            $this->container,
0 ignored issues
show
It seems like $this->container can also be of type null; however, parameter $container of Cycle\ORM\Parser\AbstractNode::mount() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

21
            /** @scrutinizer ignore-type */ $this->container,
Loading history...
22 264
            $this->indexName,
0 ignored issues
show
It seems like $this->indexName can also be of type null; however, parameter $index of Cycle\ORM\Parser\AbstractNode::mount() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

22
            /** @scrutinizer ignore-type */ $this->indexName,
Loading history...
23
            self::LAST_REFERENCE,
24
            $data,
25
        );
26
    }
27
}
28