Code Duplication    Length = 13-15 lines in 5 locations

app/controllers/Examples.php 5 locations

@@ 8-22 (lines=15) @@
5
{
6
    use \erdiko\theme\traits\Controller;
7
8
    public function get($request, $response, $args)
9
    {
10
        $this->container->logger->debug("examples");
11
        $view = 'examples/list.html';
12
13
        // Get erdiko config, this gets application.json and loads the theme specified
14
        $themeData = \erdiko\theme\Config::get();
15
        // $themeData['args'] = $args; // optional
16
        $themeData['page'] = [
17
            'title' => "Erdiko Web Example",
18
            'hello' => "world"
19
            ];
20
21
        return $this->container->theme->render($response, $view, $themeData);
22
    }
23
24
25
    public function getOnecolumn($request, $response, $args)
@@ 61-73 (lines=13) @@
58
        return $this->container->theme->render($response, $view, $config);
59
    }
60
61
    public function getJohn($request, $response, $args)
62
    {
63
        $view = 'pages/example.html';
64
65
        // Get erdiko config, this gets application.json and loads the theme specified
66
        $themeData = \erdiko\theme\Config::get();
67
        $themeData['args'] = $args; // optional
68
        $themeData['page'] = [
69
            'title' => "Erdiko Web Example"
70
            ];
71
72
        return $this->container->theme->render($response, $view, $themeData);
73
    }
74
75
    public function getMarkup($request, $response, $args)
76
    {
@@ 75-87 (lines=13) @@
72
        return $this->container->theme->render($response, $view, $themeData);
73
    }
74
75
    public function getMarkup($request, $response, $args)
76
    {
77
        $view = 'examples/markup.html';
78
79
        // Get erdiko config, this gets application.json and loads the theme specified
80
        $themeData = \erdiko\theme\Config::get();
81
        $themeData['args'] = $args; // optional
82
        $themeData['page'] = [
83
            'title' => "Markup Example"
84
            ];
85
86
        return $this->container->theme->render($response, $view, $themeData);
87
    }
88
89
    public function getCarousel($request, $response, $args)
90
    {
@@ 89-101 (lines=13) @@
86
        return $this->container->theme->render($response, $view, $themeData);
87
    }
88
89
    public function getCarousel($request, $response, $args)
90
    {
91
        $view = 'examples/carousel.html';
92
93
        // Get erdiko config, this gets application.json and loads the theme specified
94
        $themeData = \erdiko\theme\Config::get();
95
        $themeData['page'] = [
96
            'title' => "Fullpage Example",
97
            'description' => "This is the description of the page."
98
            ];
99
100
        return $this->container->theme->render($response, $view, $themeData);
101
    }
102
103
    public function getTheme($request, $response, $args)
104
    {
@@ 166-178 (lines=13) @@
163
        return $this->container->theme->render($response, $view, $themeData);
164
    }
165
166
    public function getFullpage($request, $response, $args)
167
    {
168
        $view = 'fullpage.html';
169
170
        // Get erdiko config, this gets application.json and loads the theme specified
171
        $themeData = \erdiko\theme\Config::get();
172
        $themeData['page'] = [
173
            'title' => "Fullpage Example",
174
            'description' => "This is the description of the page."
175
            ];
176
177
        return $this->container->theme->render($response, $view, $themeData);
178
    }
179
180
    public function getException($request, $response, $args)
181
    {