Code Duplication    Length = 24-29 lines in 2 locations

core/services/privacy/policy/PrivacyPolicyManager.php 1 location

@@ 61-84 (lines=24) @@
58
     * @throws InvalidDataTypeException
59
     * @throws InvalidClassException
60
     */
61
    protected function loadPrivacyPolicyCollection()
62
    {
63
        $loader = new CollectionLoader(
64
            new CollectionDetails(
65
                // collection name
66
                'privacy_policies',
67
                // collection interface
68
                'EventEspresso\core\services\privacy\policy\PrivacyPolicyInterface',
69
                // FQCNs for classes to add (all classes within that namespace will be loaded)
70
                apply_filters(
71
                    'FHEE__EventEspresso_core_services_privacy_policy_PrivacyPolicyManager__privacy_policies',
72
                    array('EventEspresso\core\domain\services\admin\privacy\policy\PrivacyPolicy')
73
                ),
74
                // filepaths to classes to add
75
                array(),
76
                // file mask to use if parsing folder for files to add
77
                '',
78
                // what to use as identifier for collection entities
79
                // using CLASS NAME prevents duplicates (works like a singleton)
80
                CollectionDetails::ID_CLASS_NAME
81
            )
82
        );
83
        return $loader->getCollection();
84
    }
85
}
86
// End of file PrivacyPolicyManager.php
87
// Location: EventEspresso\core\domain\services\admin/PrivacyPolicyManager.php

core/services/editor/BlockRegistrationManager.php 1 location

@@ 98-126 (lines=29) @@
95
     * @throws InvalidIdentifierException
96
     * @throws InvalidInterfaceException
97
     */
98
    protected function populateBlockCollection()
99
    {
100
        $loader = new CollectionLoader(
101
            new CollectionDetails(
102
                // collection name
103
                'shortcodes',
104
                // collection interface
105
                'EventEspresso\core\domain\entities\editor\BlockInterface',
106
                // FQCNs for classes to add (all classes within each namespace will be loaded)
107
                apply_filters(
108
                    'FHEE__EventEspresso_core_services_editor_BlockManager__populateBlockCollection__collection_FQCNs',
109
                    array(
110
                        // 'EventEspresso\core\domain\entities\editor\blocks\common',
111
                        // 'EventEspresso\core\domain\entities\editor\blocks\editor',
112
                        // 'EventEspresso\core\domain\entities\editor\blocks\widgets',
113
                    )
114
                ),
115
                // filepaths to classes to add
116
                array(),
117
                // file mask to use if parsing folder for files to add
118
                '',
119
                // what to use as identifier for collection entities
120
                // using CLASS NAME prevents duplicates (works like a singleton)
121
                CollectionDetails::ID_CLASS_NAME
122
            ),
123
            $this->blocks
124
        );
125
        return $loader->getCollection();
126
    }
127
128
129
    /**