Code Duplication    Length = 31-35 lines in 2 locations

core/domain/entities/routing/handlers/frontend/ShortcodeRequests.php 1 location

@@ 37-67 (lines=31) @@
34
    /**
35
     * @since $VID:$
36
     */
37
    protected function registerDependencies()
38
    {
39
        $this->dependency_map->registerDependencies(
40
            'EventEspresso\core\domain\entities\shortcodes\EspressoCancelled',
41
            ['EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache]
42
        );
43
        $this->dependency_map->registerDependencies(
44
            'EventEspresso\core\domain\entities\shortcodes\EspressoCheckout',
45
            ['EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache]
46
        );
47
        $this->dependency_map->registerDependencies(
48
            'EventEspresso\core\domain\entities\shortcodes\EspressoEventAttendees',
49
            ['EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache]
50
        );
51
        $this->dependency_map->registerDependencies(
52
            'EventEspresso\core\domain\entities\shortcodes\EspressoEvents',
53
            ['EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache]
54
        );
55
        $this->dependency_map->registerDependencies(
56
            'EventEspresso\core\domain\entities\shortcodes\EspressoThankYou',
57
            ['EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache]
58
        );
59
        $this->dependency_map->registerDependencies(
60
            'EventEspresso\core\domain\entities\shortcodes\EspressoTicketSelector',
61
            ['EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache]
62
        );
63
        $this->dependency_map->registerDependencies(
64
            'EventEspresso\core\domain\entities\shortcodes\EspressoTxnPage',
65
            ['EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache]
66
        );
67
    }
68
69
70
    /**

core/domain/entities/routing/handlers/shared/RestApiRequests.php 1 location

@@ 34-68 (lines=35) @@
31
    /**
32
     * @since $VID:$
33
     */
34
    protected function registerDependencies()
35
    {
36
        $this->dependency_map->registerDependencies(
37
            'EventEspresso\core\libraries\rest_api\CalculatedModelFields',
38
            [
39
                'EventEspresso\core\libraries\rest_api\calculations\CalculatedModelFieldsFactory' => EE_Dependency_Map::load_from_cache
40
            ]
41
        );
42
        $this->dependency_map->registerDependencies(
43
            'EventEspresso\core\libraries\rest_api\calculations\CalculatedModelFieldsFactory',
44
            ['EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache]
45
        );
46
        $this->dependency_map->registerDependencies(
47
            'EventEspresso\core\libraries\rest_api\controllers\model\Read',
48
            ['EventEspresso\core\libraries\rest_api\CalculatedModelFields' => EE_Dependency_Map::load_from_cache]
49
        );
50
        $this->dependency_map->registerDependencies(
51
            'EventEspresso\core\libraries\rest_api\calculations\Datetime',
52
            [
53
                'EEM_Datetime'     => EE_Dependency_Map::load_from_cache,
54
                'EEM_Registration' => EE_Dependency_Map::load_from_cache
55
            ]
56
        );
57
        $this->dependency_map->registerDependencies(
58
            'EventEspresso\core\libraries\rest_api\calculations\Event',
59
            [
60
                'EEM_Event'        => EE_Dependency_Map::load_from_cache,
61
                'EEM_Registration' => EE_Dependency_Map::load_from_cache
62
            ]
63
        );
64
        $this->dependency_map->registerDependencies(
65
            'EventEspresso\core\libraries\rest_api\calculations\Registration',
66
            ['EEM_Registration' => EE_Dependency_Map::load_from_cache]
67
        );
68
    }
69
70
71
    /**