Code Duplication    Length = 20-20 lines in 2 locations

src/Execution/BlockInterpreter.php 2 locations

@@ 81-100 (lines=20) @@
78
     *
79
     * @SuppressWarnings(PHPMD.StaticAccess)
80
     */
81
    public static function executeStarts(
82
        iterable $indexes,
83
        array $blocks,
84
        ContextStorageInterface $context,
85
        ErrorAggregatorInterface $errors
86
    ): bool {
87
        $allOk = true;
88
89
        foreach ($indexes as $index) {
90
            $context->setCurrentBlockId($index);
91
            $block      = $blocks[$index];
92
            $errorsInfo = static::executeProcedureStart($block, $context);
93
            if (empty($errorsInfo) === false) {
94
                static::addBlockErrors($errorsInfo, $context, $errors);
95
                $allOk = false;
96
            }
97
        }
98
99
        return $allOk;
100
    }
101
102
    /**
103
     * @param iterable|int[]           $indexes
@@ 112-131 (lines=20) @@
109
     *
110
     * @SuppressWarnings(PHPMD.StaticAccess)
111
     */
112
    public static function executeEnds(
113
        iterable $indexes,
114
        array $blocks,
115
        ContextStorageInterface $context,
116
        ErrorAggregatorInterface $errors
117
    ): bool {
118
        $allOk = true;
119
120
        foreach ($indexes as $index) {
121
            $context->setCurrentBlockId($index);
122
            $block      = $blocks[$index];
123
            $errorsInfo = static::executeProcedureEnd($block, $context);
124
            if (empty($errorsInfo) === false) {
125
                static::addBlockErrors($errorsInfo, $context, $errors);
126
                $allOk = false;
127
            }
128
        }
129
130
        return $allOk;
131
    }
132
133
    /**
134
     * @param mixed                      $input