RecommendationRequest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 11
dl 0
loc 23
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A request() 0 14 1
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Client\FactFinderSdk\Business\Api\Handler\Request;
9
10
use FACTFinder\Util\Parameters;
11
use Generated\Shared\Transfer\FactFinderSdkRecommendationRequestTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...endationRequestTransfer 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 SprykerEco\Client\FactFinderSdk\Business\Api\ApiConstants;
13
14
class RecommendationRequest extends AbstractRequest implements RecommendationRequestInterface
15
{
16
    public const TRANSACTION_TYPE = ApiConstants::TRANSACTION_TYPE_RECOMMENDATION;
17
18
    /**
19
     * @param \Generated\Shared\Transfer\FactFinderSdkRecommendationRequestTransfer $factFinderRecommendationRequestTransfer
20
     *
21
     * @return \Generated\Shared\Transfer\FactFinderSdkRecommendationResponseTransfer
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...ndationResponseTransfer 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...
22
     */
23
    public function request(FactFinderSdkRecommendationRequestTransfer $factFinderRecommendationRequestTransfer)
24
    {
25
        $requestParameters = new Parameters();
26
        $requestParameters->setAll($factFinderRecommendationRequestTransfer->toArray());
27
        $this->factFinderConnector->setRequestParameters($requestParameters);
28
29
        $recommendationAdapter = $this->factFinderConnector
30
            ->createRecommendationAdapter();
31
32
        $responseTransfer = $this->converterFactory
33
            ->createRecommendationResponseConverter($recommendationAdapter)
34
            ->convert();
35
36
        return $responseTransfer;
37
    }
38
}
39