Code Duplication    Length = 10-10 lines in 5 locations

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

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

code/model/editableformfields/EditableFormField.php 1 location

@@ 471-480 (lines=10) @@
468
     * @param array $context Virtual parameter to allow context to be passed in to check
469
     * @return bool
470
     */
471
    public function canCreate($member = null)
472
    {
473
        // Check parent page
474
        $parent = $this->getCanCreateContext(func_get_args());
475
        if ($parent) {
476
            return $parent->canEdit($member);
477
        }
478
479
        // Fall back to secure admin permissions
480
        return parent::canCreate($member);
481
    }
482
483
    /**