Completed
Pull Request — master (#24)
by Quentin
03:30
created

ActionCollection   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 2
dl 0
loc 17
ccs 0
cts 9
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A resolve() 0 9 1
1
<?php
2
3
namespace Majora\Framework\Domain\Action;
4
5
use Majora\Framework\Model\EntityCollection;
6
7
/**
8
 * Custom collection class for actions.
9
 */
10
class ActionCollection extends EntityCollection
11
{
12
    /**
13
     * Resolve all actions in a row and return result as array.
14
     *
15
     * @return array
16
     */
17
    public function resolve()
18
    {
19
        return $this
20
            ->map(function (ActionInterface $action) {
21
                return $action->resolve();
22
            })
23
            ->toArray()
24
        ;
25
    }
26
}
27