Code Duplication    Length = 11-15 lines in 4 locations

app/controllers/Config.php 1 location

@@ 6-20 (lines=15) @@
3
4
class Config extends \erdiko\Controller
5
{  
6
	public function __invoke($request, $response, $args) 
7
	{
8
        $this->container->logger->debug("route: /config");
9
   	    $view = 'pages/config.html';
10
11
        // Get erdiko config, this gets application.json and loads the theme specified
12
        $config = \erdiko\theme\Config::get();
13
        $config['page']['title'] = "Dump Config";
14
15
        // $theme = new \erdiko\theme\Object;
16
        // $theme->title = "Dump Config";
17
        // (array)$theme; Config::get(), ['page'] = array();
18
19
   		return $this->container->theme->render($response, $view, $config);
20
  	}
21
}

app/controllers/Examples.php 3 locations

@@ 25-35 (lines=11) @@
22
    }
23
24
25
    public function getOnecolumn($request, $response, $args)
26
    {
27
        $this->container->logger->debug("route: /config");
28
        $view = 'layouts/1column.html';
29
30
        // Get erdiko config, this gets application.json and loads the theme specified
31
        $config = \erdiko\theme\Config::get();
32
        $config['page']['title'] = "1 Column Layout";
33
34
        return $this->container->theme->render($response, $view, $config);
35
    }
36
37
    public function getTwocolumn($request, $response, $args)
38
    {
@@ 37-47 (lines=11) @@
34
        return $this->container->theme->render($response, $view, $config);
35
    }
36
37
    public function getTwocolumn($request, $response, $args)
38
    {
39
        $this->container->logger->debug("route: /config");
40
        $view = 'layouts/2column.html';
41
42
        // Get erdiko config, this gets application.json and loads the theme specified
43
        $config = \erdiko\theme\Config::get();
44
        $config['page']['title'] = "2 Column Layout";
45
46
        return $this->container->theme->render($response, $view, $config);
47
    }
48
49
    public function getThreecolumn($request, $response, $args)
50
    {
@@ 49-59 (lines=11) @@
46
        return $this->container->theme->render($response, $view, $config);
47
    }
48
49
    public function getThreecolumn($request, $response, $args)
50
    {
51
        $this->container->logger->debug("route: /config");
52
        $view = 'layouts/3column.html';
53
54
        // Get erdiko config, this gets application.json and loads the theme specified
55
        $config = \erdiko\theme\Config::get();
56
        $config['page']['title'] = "3 Column Layout";
57
58
        return $this->container->theme->render($response, $view, $config);
59
    }
60
61
    public function getJohn($request, $response, $args)
62
    {