Passed
Push — master ( 2cda12...3e0ae5 )
by Melech
02:04 queued 37s
created

ExposableIndexable::asExposedChangedIndexedArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Valkyrja Framework package.
7
 *
8
 * (c) Melech Mizrachi <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Valkyrja\Type\Model\Trait;
15
16
/**
17
 * Trait ExposableIndexable.
18
 *
19
 * @author Melech Mizrachi
20
 */
21
trait ExposableIndexable
22
{
23
    use Exposable;
24
    use Indexable;
25
26
    /**
27
     * @inheritDoc
28
     *
29
     * @param string ...$properties [optional] An array of properties to return
30
     */
31
    public function asExposedIndexedArray(string ...$properties): array
32
    {
33
        return static::getIndexedArrayFromMappedArray($this->asExposedArray(...$properties));
34
    }
35
36
    /**
37
     * @inheritDoc
38
     */
39
    public function asExposedChangedIndexedArray(): array
40
    {
41
        return static::getIndexedArrayFromMappedArray($this->asExposedChangedArray());
42
    }
43
}
44