AkeneoResourceCursor   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 81
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 81
rs 10
c 0
b 0
f 0
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getPageSize() 0 4 1
A current() 0 5 1
A key() 0 5 1
A rewind() 0 4 1
A valid() 0 4 1
A next() 0 4 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\Service\AkeneoPim\Dependencies\External\Api\Wrapper;
9
10
use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface;
0 ignored issues
show
Bug introduced by
The type Akeneo\Pim\ApiClient\Pag...ResourceCursorInterface 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
12
class AkeneoResourceCursor implements AkeneoResourceCursorInterface
13
{
14
    /**
15
     * @var \Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface
16
     */
17
    private $resourceCursor;
18
19
    /**
20
     * @param \Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface $resourceCursor
21
     */
22
    public function __construct(ResourceCursorInterface $resourceCursor)
23
    {
24
        $this->resourceCursor = $resourceCursor;
25
    }
26
27
    /**
28
     * {@inheritDoc}
29
     *
30
     * @return int
31
     */
32
    public function getPageSize(): int
33
    {
34
        return $this->resourceCursor
35
            ->getPageSize();
36
    }
37
38
    /**
39
     * {@inheritDoc}
40
     *
41
     * @return mixed
42
     */
43
    #[\ReturnTypeWillChange]
44
    public function current()
45
    {
46
        return $this->resourceCursor
47
            ->current();
48
    }
49
50
    /**
51
     * {@inheritDoc}
52
     *
53
     * @return void
54
     */
55
    public function next(): void
56
    {
57
        $this->resourceCursor
58
            ->next();
59
    }
60
61
    /**
62
     * {@inheritDoc}
63
     *
64
     * @return mixed
65
     */
66
    #[\ReturnTypeWillChange]
67
    public function key()
68
    {
69
        return $this->resourceCursor
70
            ->key();
71
    }
72
73
    /**
74
     * {@inheritDoc}
75
     *
76
     * @return bool
77
     */
78
    public function valid(): bool
79
    {
80
        return $this->resourceCursor
81
            ->valid();
82
    }
83
84
    /**
85
     * {@inheritDoc}
86
     *
87
     * @return void
88
     */
89
    public function rewind(): void
90
    {
91
        $this->resourceCursor
92
            ->rewind();
93
    }
94
}
95