Passed
Pull Request — master (#11)
by Oleksandr
04:55
created

ProductModelDraftApiAdapter::get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 5
rs 10
c 1
b 0
f 0
1
<?php
2
3
/**
4
 * MIT License
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Adapter\Product;
9
10
use Akeneo\PimEnterprise\ApiClient\AkeneoPimEnterpriseClientInterface;
11
12
class ProductModelDraftApiAdapter implements ProductModelDraftApiAdapterInterface
13
{
14
    /**
15
     * @var \Akeneo\Pim\ApiClient\AkeneoPimClientInterface
16
     */
17
    protected $akeneoPimClient;
18
19
    /**
20
     * @param \Akeneo\PimEnterprise\ApiClient\AkeneoPimEnterpriseClientInterface $akeneoPimClient
21
     */
22
    public function __construct(AkeneoPimEnterpriseClientInterface $akeneoPimClient)
23
    {
24
        $this->akeneoPimClient = $akeneoPimClient;
25
    }
26
27
    /**
28
     * @param string $code
29
     *
30
     * @return array
31
     */
32
    public function get($code)
33
    {
34
        return $this->akeneoPimClient
35
            ->getProductModelDraftApi()
0 ignored issues
show
Bug introduced by
The method getProductModelDraftApi() does not exist on Akeneo\Pim\ApiClient\AkeneoPimClientInterface. Did you maybe mean getProductModelApi()? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

35
            ->/** @scrutinizer ignore-call */ getProductModelDraftApi()

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
36
            ->get($code);
37
    }
38
}
39