Code Duplication    Length = 3-3 lines in 4 locations

Core/Executor/ContentManager.php 1 location

@@ 339-341 (lines=3) @@
336
     */
337
    protected function matchContents($action, $step)
338
    {
339
        if (!isset($step->dsl['object_id']) && !isset($step->dsl['remote_id']) && !isset($step->dsl['match'])) {
340
            throw new \Exception("The id or remote id of an object or a match condition is required to $action a content");
341
        }
342
343
        // Backwards compat
344

Core/Executor/ContentVersionManager.php 1 location

@@ 82-84 (lines=3) @@
79
     */
80
    protected function matchVersions($action, $step)
81
    {
82
        if (!isset($step->dsl['object_id']) && !isset($step->dsl['remote_id']) && !isset($step->dsl['match'])) {
83
            throw new \Exception("The id or remote id of an object or a match condition is required to $action a content version");
84
        }
85
86
        if (!isset($step->dsl['match_versions']) && !isset($step->dsl['versions'])) {
87
            throw new \Exception("A verision match condition is required to $action a content version");

Core/Executor/LocationManager.php 1 location

@@ 400-402 (lines=3) @@
397
     */
398
    protected function matchContents($action, $step)
399
    {
400
        if (!isset($step->dsl['object_id']) && !isset($step->dsl['remote_id']) && !isset($step->dsl['match'])) {
401
            throw new \Exception("The ID or remote ID of an object or a Match Condition is required to $action a new location.");
402
        }
403
404
        // Backwards compat
405
        if (!isset($step->dsl['match'])) {

Core/Executor/UserGroupManager.php 1 location

@@ 180-182 (lines=3) @@
177
     */
178
    protected function matchUserGroups($action, $step)
179
    {
180
        if (!isset($step->dsl['id']) && !isset($step->dsl['group']) && !isset($step->dsl['match'])) {
181
            throw new \Exception("The id of a user group or a match condition is required to $action it");
182
        }
183
184
        // Backwards compat
185
        if (isset($step->dsl['match'])) {