Code Duplication    Length = 8-8 lines in 2 locations

src/reflection/GenericMethodAction.php 1 location

@@ 76-83 (lines=8) @@
73
     * @return \rtens\domin\Parameter[]
74
     * @throws \Exception
75
     */
76
    public function parameters() {
77
        return array_map(function (Parameter $parameter) {
78
            if (array_key_exists($parameter->getName(), $this->paramMap)) {
79
                return call_user_func($this->paramMap[$parameter->getName()], $parameter);
80
            }
81
            return $parameter;
82
        }, parent::parameters());
83
    }
84
}

src/reflection/GenericObjectAction.php 1 location

@@ 72-79 (lines=8) @@
69
     * @return \rtens\domin\Parameter[]
70
     * @throws \Exception
71
     */
72
    public function parameters() {
73
        return array_map(function (Parameter $parameter) {
74
            if (array_key_exists($parameter->getName(), $this->paramMap)) {
75
                return call_user_func($this->paramMap[$parameter->getName()], $parameter);
76
            }
77
            return $parameter;
78
        }, parent::parameters());
79
    }
80
81
    /**
82
     * Called by execute() with the instantiated object