HasMany   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 12
ccs 0
cts 4
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A populateQuerySpecific() 0 6 1
1
<?php
2
3
namespace Nip\Records\Relations;
4
5
use Nip\Database\Query\AbstractQuery;
6
use Nip\Database\Query\Select as Query;
7
8
/**
9
 * Class HasMany
10
 * @package Nip\Records\Relations
11
 */
12
class HasMany extends HasOneOrMany
13
{
14
15
    /**
16
     * @inheritdoc
17
     */
18
    public function populateQuerySpecific(AbstractQuery $query)
19
    {
20
        $primaryKey = $this->getManager()->getPrimaryKey();
21
        $query->where('`' . $this->getFK() . '` = ?', $this->getItem()->{$primaryKey});
22
23
        return $query;
24
    }
25
}
26