Code Duplication    Length = 10-10 lines in 5 locations

code/model/EditableCustomRule.php 1 location

@@ 100-109 (lines=10) @@
97
     * @param array $context Virtual parameter to allow context to be passed in to check
98
     * @return bool
99
     */
100
    public function canCreate($member = null)
101
    {
102
        // Check parent page
103
        $parent = $this->getCanCreateContext(func_get_args());
104
        if ($parent) {
105
            return $parent->canEdit($member);
106
        }
107
108
        // Fall back to secure admin permissions
109
        return parent::canCreate($member);
110
    }
111
112
    /**

code/model/editableformfields/EditableOption.php 1 location

@@ 99-108 (lines=10) @@
96
     * @param array $context Virtual parameter to allow context to be passed in to check
97
	 * @return bool
98
	 */
99
    public function canCreate($member = null)
100
    {
101
		// Check parent page
102
        $parent = $this->getCanCreateContext(func_get_args());
103
        if($parent) {
104
            return $parent->canEdit($member);
105
        }
106
107
        // Fall back to secure admin permissions
108
        return parent::canCreate($member);
109
	}
110
111
    /**

code/model/recipients/UserDefinedForm_EmailRecipientCondition.php 1 location

@@ 66-75 (lines=10) @@
63
     * @param array $context Virtual parameter to allow context to be passed in to check
64
     * @return bool
65
     */
66
    public function canCreate($member = null)
67
    {
68
        // Check parent page
69
        $parent = $this->getCanCreateContext(func_get_args());
70
        if ($parent) {
71
            return $parent->canEdit($member);
72
        }
73
74
        // Fall back to secure admin permissions
75
        return parent::canCreate($member);
76
    }
77
78
    /**

code/model/recipients/UserDefinedForm_EmailRecipient.php 1 location

@@ 305-314 (lines=10) @@
302
     * @param array $context Virtual parameter to allow context to be passed in to check
303
     * @return bool
304
     */
305
    public function canCreate($member = null)
306
    {
307
        // Check parent page
308
        $parent = $this->getCanCreateContext(func_get_args());
309
        if ($parent) {
310
            return $parent->canEdit($member);
311
        }
312
313
        // Fall back to secure admin permissions
314
        return parent::canCreate($member);
315
    }
316
317
    /**

code/model/editableformfields/EditableFormField.php 1 location

@@ 428-437 (lines=10) @@
425
     * @param array $context Virtual parameter to allow context to be passed in to check
426
     * @return bool
427
     */
428
    public function canCreate($member = null)
429
    {
430
        // Check parent page
431
        $parent = $this->getCanCreateContext(func_get_args());
432
        if ($parent) {
433
            return $parent->canEdit($member);
434
        }
435
436
        // Fall back to secure admin permissions
437
        return parent::canCreate($member);
438
    }
439
440
    /**