Index::main()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 21
Code Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 19
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 21
rs 9.6333
1
<?php
2
/**
3
 * This file is part of product_management
4
 * User: Sinan TURGUT <[email protected]>
5
 * Date: 24.06.2019
6
 * php version 7.2
7
 *
8
 * @category Assessment
9
 * @package  ProductManagement
10
 * @author   Sinan TURGUT <[email protected]>
11
 * @license  See LICENSE file
12
 * @link     https://dev.sinanturgut.com.tr
13
 */
14
15
namespace App\Controller;
16
17
use App\Core;
18
use App\Model;
19
use App\Utility;
20
21
/**
22
 * Class Index
23
 *
24
 * @package App\Controller
25
 */
26
class Index extends Core\Controller
27
{
28
29
    /**
30
     * @return string html
31
     */
32
    public function main()
33
    {
34
        $html = <<<EOT
35
        <!DOCTYPE html>
36
<html lang="en">
37
<head>
38
    <meta charset="utf-8"/>
39
    <title>Product Management</title>
40
    <style>
41
    body {
42
        padding: 0;
43
        text-align: center;
44
        }
45
    </style>
46
</head>
47
<body>
48
<h1>Product Management Service</h1>
49
</body>
50
</html>
51
EOT;
52
        die($html);
0 ignored issues
show
Best Practice introduced by
Using exit here is not recommended.

In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.

Loading history...
53
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function ping()
60
    {
61
62
        echo "pong";
63
    }
64
}
65