Completed
Push — master ( adef2f...37f76d )
by Beñat
01:35
created

buildListOfIdsSpecification()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 3
1
<?php
2
3
/*
4
 * This file is part of the BenGorFile package.
5
 *
6
 * (c) Beñat Espiña <[email protected]>
7
 * (c) Gorka Laucirica <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace BenGorFile\File\Infrastructure\Persistence\Sql;
14
15
use BenGorFile\File\Domain\Model\FileName;
16
use BenGorFile\File\Domain\Model\FileSpecificationFactory;
17
18
/**
19
 * @author Mikel Etxebarria <[email protected]>
20
 * @author Beñat Espiña <[email protected]>
21
 */
22
class SqlFileSpecificationFactory implements FileSpecificationFactory
23
{
24
    public function buildFilterByNameSpecification($fileName, $offset = 0, $limit = -1)
25
    {
26
        return new SqlFilterByNameSpecification($fileName, $offset, $limit);
27
    }
28
29
    public function buildByNameSpecification(FileName $fileName)
30
    {
31
        return new SqlByNameSpecification($fileName);
32
    }
33
34
    public function buildListOfIdsSpecification(array $ids, $offset = 0, $limit = -1)
35
    {
36
        return new SqlListOfIdsSpecification($ids, $offset, $limit);
37
    }
38
}
39