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

ContentMarkdownController::catchAll()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 18

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 18
c 0
b 0
f 0
ccs 0
cts 2
cp 0
rs 9.6666
cc 1
nc 1
nop 1
crap 2
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