Completed
Push — master ( 674d5a...194be7 )
by Gorka
04:12
created

buildBySlugSpecification()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the Kreta 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
declare(strict_types=1);
14
15
namespace Kreta\TaskManager\Infrastructure\Persistence\Doctrine\ORM\Organization;
16
17
use Kreta\SharedKernel\Domain\Model\Identity\Slug;
18
use Kreta\TaskManager\Domain\Model\Organization\OrganizationSpecificationFactory;
19
use Kreta\TaskManager\Domain\Model\User\UserId;
20
21
class DoctrineORMOrganizationSpecificationFactory implements OrganizationSpecificationFactory
22
{
23
    public function buildFilterableSpecification($name, UserId $userId, int $offset = 0, int $limit = -1)
24
    {
25
        return new DoctrineORMFilterableSpecification($name, $userId, $offset, $limit);
26
    }
27
28
    public function buildBySlugSpecification(Slug $slug)
29
    {
30
        return new DoctrineORMBySlugSpecification($slug);
31
    }
32
}
33