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/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/MailExecutor.php 1 location

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

Core/Executor/RepositoryExecutor.php 1 location

@@ 338-348 (lines=11) @@
335
     * Courtesy code to avoid reimplementing it in every subclass
336
     * @todo will be moved into the reference resolver classes
337
     */
338
    protected function resolveReferencesRecursively($match)
339
    {
340
        if (is_array($match)) {
341
            foreach ($match as $condition => $values) {
342
                $match[$condition] = $this->resolveReferencesRecursively($values);
343
            }
344
            return $match;
345
        } else {
346
            return $this->referenceResolver->resolveReference($match);
347
        }
348
    }
349
}
350