Code Duplication    Length = 20-20 lines in 2 locations

src/Execution/BlockInterpreter.php 2 locations

@@ 71-90 (lines=20) @@
68
     *
69
     * @SuppressWarnings(PHPMD.StaticAccess)
70
     */
71
    public static function executeStarts(
72
        array $indexes,
73
        array $blocks,
74
        ContextStorageInterface $context,
75
        ErrorAggregatorInterface $errors
76
    ): bool {
77
        $allOk = true;
78
79
        foreach ($indexes as $index) {
80
            $context->setCurrentBlockId($index);
81
            $block      = $blocks[$index];
82
            $errorsInfo = static::executeProcedureStart($block, $context);
83
            if (empty($errorsInfo) === false) {
84
                static::addBlockErrors($errorsInfo, $context, $errors);
85
                $allOk = false;
86
            }
87
        }
88
89
        return $allOk;
90
    }
91
92
    /**
93
     * @param int[]                    $indexes
@@ 102-121 (lines=20) @@
99
     *
100
     * @SuppressWarnings(PHPMD.StaticAccess)
101
     */
102
    public static function executeEnds(
103
        array $indexes,
104
        array $blocks,
105
        ContextStorageInterface $context,
106
        ErrorAggregatorInterface $errors
107
    ): bool {
108
        $allOk = true;
109
110
        foreach ($indexes as $index) {
111
            $context->setCurrentBlockId($index);
112
            $block      = $blocks[$index];
113
            $errorsInfo = static::executeProcedureEnd($block, $context);
114
            if (empty($errorsInfo) === false) {
115
                static::addBlockErrors($errorsInfo, $context, $errors);
116
                $allOk = false;
117
            }
118
        }
119
120
        return $allOk;
121
    }
122
123
    /**
124
     * @param mixed                      $input