Passed
Push — PAC-894 ( d22899 )
by
unknown
21:13 queued 16:49
created

EeCleanUpGroupedObserver::getLastPrimaryKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Copyright (c) 2024 TechDivision GmbH <[email protected]> - TechDivision GmbH
4
 * All rights reserved
5
 *
6
 * This product includes proprietary software developed at TechDivision GmbH, Germany
7
 * For more information see https://www.techdivision.com
8
 *
9
 * To obtain a valid license for using this software, please contact us at
10
 * [email protected]
11
 */
12
declare(strict_types=1);
13
14
namespace TechDivision\Import\Product\Grouped\Ee\Observers;
15
16
use TechDivision\Import\Product\Grouped\Observers\CleanUpGroupedProductRelationObserver;
0 ignored issues
show
Bug introduced by
The type TechDivision\Import\Prod...ProductRelationObserver was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
17
18
/**
19
 * @copyright Copyright (c) 2024 TechDivision GmbH <[email protected]> - TechDivision GmbH
20
 * @link http://www.techdivision.com
21
 * @author MET <[email protected]>
22
 */
23
class EeCleanUpGroupedObserver extends CleanUpGroupedProductRelationObserver
24
{
25
    /**
26
     * Return's the PK to create the grouped product => child relation.
27
     *
28
     * @return int The PK to create the relation with
29
     */
30
    protected function getLastPrimaryKey(): int
31
    {
32
        return $this->getSubject()->getLastRowId();
33
    }
34
}
35