Completed
Push — erdiko2 ( 117d91...a0a9d1 )
by John
02:07
created

Config::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 3
1
<?php
2
namespace app\controllers;
3
4
class Config extends \erdiko\Controller
5
{
6
	protected $container;
7
   
8
	public function __invoke($request, $response, $args) 
9
	{
10
        $this->container->logger->debug("route: /config");
11
   	    $view = 'pages/config.html';
12
13
        // Get erdiko config, this gets application.json and loads the theme specified
14
        $config = \erdiko\theme\Config::get();
15
        $config['page']['title'] = "Dump Config";
16
17
        // $theme = new \erdiko\theme\Object;
18
        // $theme->title = "Dump Config";
0 ignored issues
show
Unused Code Comprehensibility introduced by
45% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
19
        // (array)$theme; Config::get(), ['page'] = array();
0 ignored issues
show
Unused Code Comprehensibility introduced by
64% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
20
21
   		return $this->container->theme->render($response, $view, $config);
22
  	}
23
}