Passed
Push — main ( 37b461...119b4d )
by Mikael
04:06
created

ContentMarkdownController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 36
c 0
b 0
f 0
ccs 0
cts 2
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A catchAll() 0 18 1
1
<?php
2
3
namespace Anax\ContentMarkdown;
4
5
use Anax\Commons\ContainerInjectableInterface;
6
use Anax\Commons\ContainerInjectableTrait;
7
use Anax\Route\Exception\NotFoundException;
8
9
/**
10
 * A controller for flat file markdown content.
11
 */
12
class ContentMarkdownController implements
13
    ContainerInjectableInterface
14
{
15
    use ContainerInjectableTrait;
16
17
18
19
    /**
20
     * Render a page using flat file content.
21
     *
22
     * @param array $args as a variadic to catch all arguments.
23
     *
24
     * @return mixed as null when flat file is not found and otherwise a
25
     *               complete response object with content to render.
26
     *
27
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
28
     */
29
    public function catchAll(...$args)
0 ignored issues
show
Unused Code introduced by
The parameter $args is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
30
    {
31
        return false;
32
        // $content = $this->di->get("content");
33
        // $page = $this->di->get("page");
34
        //
35
        // try {
36
        //     $fileContent = $content->contentForRoute();
37
        // } catch(NotFoundException $e) {
38
        //     return false;
39
        // }
40
        //
41
        // foreach ($fileContent->views as $view) {
42
        //     $page->add($view);
43
        // }
44
        //
45
        // return $page->render($fileContent->frontmatter);
46
    }
47
}
48