PunchoutCatalogsToCompanyBusinessUnitFacadeBridge   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 5
c 2
b 0
f 0
dl 0
loc 33
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getCompanyBusinessUnitCollection() 0 3 1
A findCompanyBusinessUnitById() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
/**
4
 * Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\PunchoutCatalogs\Dependency\Facade;
9
10
use Generated\Shared\Transfer\CompanyBusinessUnitCollectionTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...sUnitCollectionTransfer 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...
11
use Generated\Shared\Transfer\CompanyBusinessUnitCriteriaFilterTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...tCriteriaFilterTransfer 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...
12
use Generated\Shared\Transfer\CompanyBusinessUnitTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...anyBusinessUnitTransfer 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...
13
14
class PunchoutCatalogsToCompanyBusinessUnitFacadeBridge implements PunchoutCatalogsToCompanyBusinessUnitFacadeInterface
15
{
16
    /**
17
     * @var \Spryker\Zed\CompanyBusinessUnit\Business\CompanyBusinessUnitFacadeInterface
18
     */
19
    protected $companyBusinessUnitFacade;
20
21
    /**
22
     * @param \Spryker\Zed\CompanyBusinessUnit\Business\CompanyBusinessUnitFacadeInterface $companyBusinessUnitFacade
23
     */
24
    public function __construct($companyBusinessUnitFacade)
25
    {
26
        $this->companyBusinessUnitFacade = $companyBusinessUnitFacade;
27
    }
28
29
    /**
30
     * @param \Generated\Shared\Transfer\CompanyBusinessUnitCriteriaFilterTransfer $companyBusinessUnitCriteriaFilterTransfer
31
     *
32
     * @return \Generated\Shared\Transfer\CompanyBusinessUnitCollectionTransfer
33
     */
34
    public function getCompanyBusinessUnitCollection(CompanyBusinessUnitCriteriaFilterTransfer $companyBusinessUnitCriteriaFilterTransfer): CompanyBusinessUnitCollectionTransfer
35
    {
36
        return $this->companyBusinessUnitFacade->getCompanyBusinessUnitCollection($companyBusinessUnitCriteriaFilterTransfer);
37
    }
38
39
    /**
40
     * @param int $idCompanyBusinessUnit
41
     *
42
     * @return \Generated\Shared\Transfer\CompanyBusinessUnitTransfer|null
43
     */
44
    public function findCompanyBusinessUnitById(int $idCompanyBusinessUnit): ?CompanyBusinessUnitTransfer
45
    {
46
        return $this->companyBusinessUnitFacade->findCompanyBusinessUnitById($idCompanyBusinessUnit);
47
    }
48
}
49