Code Duplication    Length = 10-10 lines in 3 locations

vendor/anax/mvc/src/DI/CDIFactoryDefault.php 3 locations

@@ 71-80 (lines=10) @@
68
            $router = new \Anax\Route\CRouterBasic();
69
            $router->setDI($this);
70
71
            $router->addInternal('403', function () {
72
                $this->dispatcher->forward([
73
                    'controller' => 'error',
74
                    'action' => 'statusCode',
75
                    'params' => [
76
                        'code' => 403,
77
                        'message' => "HTTP Status Code 403: This is a forbidden route.",
78
                    ],
79
                ]);
80
            })->setName('403');
81
            
82
            $router->addInternal('404', function () {
83
                $this->dispatcher->forward([
@@ 82-91 (lines=10) @@
79
                ]);
80
            })->setName('403');
81
            
82
            $router->addInternal('404', function () {
83
                $this->dispatcher->forward([
84
                    'controller' => 'error',
85
                    'action' => 'statusCode',
86
                    'params' => [
87
                        'code' => 404,
88
                        'message' => "HTTP Status Code 404: This route is not found.",
89
                    ],
90
                ]);
91
            })->setName('404');
92
            
93
            $router->addInternal('500', function () {
94
                $this->dispatcher->forward([
@@ 93-102 (lines=10) @@
90
                ]);
91
            })->setName('404');
92
            
93
            $router->addInternal('500', function () {
94
                $this->dispatcher->forward([
95
                    'controller' => 'error',
96
                    'action' => 'statusCode',
97
                    'params' => [
98
                        'code' => 500,
99
                        'message' => "HTTP Status Code 500: There was an internal server or processing error.",
100
                    ],
101
                ]);
102
            })->setName('500');
103
            
104
            return $router;
105
        });