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

RemoteCategoryRepository::deleteById()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 1
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
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