Completed
Pull Request — master (#370)
by Christian
09:33 queued 06:19
created

RemoteCategoryRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A deleteById() 0 8 1
1
<?php
2
/**
3
 * (c) shopware AG <[email protected]>
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 */
7
8
namespace Shopware\CustomModels\Connect;
9
10
use Shopware\Components\Model\ModelRepository;
11
12
/**
13
 * Class RemoteCategoryRepository
14
 * @package Shopware\CustomModels\Connect
15
 */
16
class RemoteCategoryRepository extends ModelRepository
17
{
18
    public function deleteById($remoteCategoryId)
19
    {
20
        $builder = $this->createQueryBuilder('rc');
21
        $builder->delete('Shopware\CustomModels\Connect\RemoteCategory', 'rc');
22
        $builder->where('rc.id = :rcid');
23
        $builder->setParameter(':rcid', $remoteCategoryId);
24
        $builder->getQuery()->execute();
25
    }
26
}
27