Completed
Push — master ( 70bc12...725ad3 )
by Ross
35:29
created

Index   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 29
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A execute() 0 4 1
1
<?php
2
/**
3
 * A two factor authentication module that protects both the admin and customer logins
4
 * Copyright (C) 2017  Ross Mitchell
5
 *
6
 * This file is part of Rossmitchell/Twofactor.
7
 *
8
 * Rossmitchell/Twofactor is free software: you can redistribute it and/or modify
9
 * it under the terms of the GNU General Public License as published by
10
 * the Free Software Foundation, either version 3 of the License, or
11
 * (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
 */
21
22
namespace Rossmitchell\Twofactor\Controller\Customerlogin;
23
24
use Magento\Framework\App\Action\Action;
25
use Magento\Framework\App\Action\Context;
26
use Magento\Framework\Controller\ResultInterface;
27
use Magento\Framework\View\Result\PageFactory;
28
29
class Index extends Action
30
{
31
32
    private $resultPageFactory;
33
34
    /**
35
     * Constructor
36
     *
37
     * @param Context  $context
38
     * @param PageFactory $resultPageFactory
39
     */
40 2
    public function __construct(
41
        Context $context,
42
        PageFactory $resultPageFactory
43
    ) {
44 2
        $this->resultPageFactory = $resultPageFactory;
45 2
        parent::__construct($context);
46 2
    }
47
48
    /**
49
     * Execute view action
50
     *
51
     * @return ResultInterface
52
     */
53 2
    public function execute()
54
    {
55 2
        return $this->resultPageFactory->create();
56
    }
57
}
58