Code Duplication    Length = 11-11 lines in 4 locations

Core/Executor/HTTPExecutor.php 1 location

@@ 137-147 (lines=11) @@
134
    /**
135
     * @todo should be moved into the reference resolver classes
136
     */
137
    protected function resolveReferencesRecursively($match)
138
    {
139
        if (is_array($match)) {
140
            foreach ($match as $condition => $values) {
141
                $match[$condition] = $this->resolveReferencesRecursively($values);
142
            }
143
            return $match;
144
        } else {
145
            return $this->referenceResolver->resolveReference($match);
146
        }
147
    }
148
149
    /**
150
     * Replaces any references inside a string

Core/Executor/MailExecutor.php 1 location

@@ 123-133 (lines=11) @@
120
    /**
121
     * @todo should be moved into the reference resolver classes
122
     */
123
    protected function resolveReferencesRecursively($match)
124
    {
125
        if (is_array($match)) {
126
            foreach ($match as $condition => $values) {
127
                $match[$condition] = $this->resolveReferencesRecursively($values);
128
            }
129
            return $match;
130
        } else {
131
            return $this->referenceResolver->resolveReference($match);
132
        }
133
    }
134
135
    /**
136
     * Replaces any references inside a string

Core/Executor/ServiceExecutor.php 1 location

@@ 159-169 (lines=11) @@
156
    /**
157
     * @todo should be moved into the reference resolver classes
158
     */
159
    protected function resolveReferencesRecursively($match)
160
    {
161
        if (is_array($match)) {
162
            foreach ($match as $condition => $values) {
163
                $match[$condition] = $this->resolveReferencesRecursively($values);
164
            }
165
            return $match;
166
        } else {
167
            return $this->referenceResolver->resolveReference($match);
168
        }
169
    }
170
}
171

Core/Executor/RepositoryExecutor.php 1 location

@@ 257-267 (lines=11) @@
254
     * Courtesy code to avoid reimplementing it in every subclass
255
     * @todo will be moved into the reference resolver classes
256
     */
257
    protected function resolveReferencesRecursively($match)
258
    {
259
        if (is_array($match)) {
260
            foreach ($match as $condition => $values) {
261
                $match[$condition] = $this->resolveReferencesRecursively($values);
262
            }
263
            return $match;
264
        } else {
265
            return $this->referenceResolver->resolveReference($match);
266
        }
267
    }
268
}
269