Code Duplication    Length = 11-11 lines in 4 locations

code/Model/Recipient/EmailRecipientCondition.php 1 location

@@ 112-122 (lines=11) @@
109
     * @param array $context Virtual parameter to allow context to be passed in to check
110
     * @return bool
111
     */
112
    public function canCreate($member = null, $context = [])
113
    {
114
        // Check parent page
115
        $parent = $this->getCanCreateContext(func_get_args());
116
        if ($parent) {
117
            return $parent->canEdit($member);
118
        }
119
120
        // Fall back to secure admin permissions
121
        return parent::canCreate($member);
122
    }
123
124
    /**
125
     * Helper method to check the parent for this object

code/Model/EditableCustomRule.php 1 location

@@ 93-103 (lines=11) @@
90
     * @param array $context Virtual parameter to allow context to be passed in to check
91
     * @return bool
92
     */
93
    public function canCreate($member = null, $context = [])
94
    {
95
        // Check parent page
96
        $parent = $this->getCanCreateContext(func_get_args());
97
        if ($parent) {
98
            return $parent->canEdit($member);
99
        }
100
101
        // Fall back to secure admin permissions
102
        return parent::canCreate($member);
103
    }
104
105
    /**
106
     * Helper method to check the parent for this object

code/Model/EditableFormField.php 1 location

@@ 532-542 (lines=11) @@
529
     * @param array $context Virtual parameter to allow context to be passed in to check
530
     * @return bool
531
     */
532
    public function canCreate($member = null, $context = [])
533
    {
534
        // Check parent page
535
        $parent = $this->getCanCreateContext(func_get_args());
536
        if ($parent) {
537
            return $parent->canEdit($member);
538
        }
539
540
        // Fall back to secure admin permissions
541
        return parent::canCreate($member);
542
    }
543
544
    /**
545
     * Helper method to check the parent for this object

code/Model/Recipient/EmailRecipient.php 1 location

@@ 407-417 (lines=11) @@
404
     * @param array $context Virtual parameter to allow context to be passed in to check
405
     * @return bool
406
     */
407
    public function canCreate($member = null, $context = [])
408
    {
409
        // Check parent page
410
        $parent = $this->getCanCreateContext(func_get_args());
411
        if ($parent) {
412
            return $parent->canEdit($member);
413
        }
414
415
        // Fall back to secure admin permissions
416
        return parent::canCreate($member);
417
    }
418
419
    /**
420
     * Helper method to check the parent for this object