LostPasswordPageController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 11
dl 0
loc 22
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A LostPasswordForm() 0 9 1
1
<?php
2
namespace UserManagement\Page;
3
4
use PageController;
0 ignored issues
show
Bug introduced by
The type PageController was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
5
use SilverStripe\Security\MemberAuthenticator\LostPasswordHandler;
6
use SilverStripe\Security\MemberAuthenticator\LostPasswordForm;
7
use SilverStripe\Security\MemberAuthenticator\MemberAuthenticator;
8
9
/**
10
 * Class LostPasswordPageController
11
 *
12
 * @package user-management
13
 */
14
class LostPasswordPageController extends PageController
15
{
16
    private static $url_segment = 'forgotten-password';
0 ignored issues
show
introduced by
The private property $url_segment is not used, and could be removed.
Loading history...
17
18
    private $authenticatorClass = MemberAuthenticator::class;
19
20
    private static $allowed_actions = array('LostPasswordForm');
0 ignored issues
show
introduced by
The private property $allowed_actions is not used, and could be removed.
Loading history...
21
22
    /**
23
     * Returns the default lost password form.
24
     *
25
     * @return \SilverStripe\Security\MemberAuthenticator\LostPasswordForm
26
     */
27 1
    public function LostPasswordForm()
28
    {
29 1
        return LostPasswordForm::create(
30 1
            LostPasswordHandler::create('/Security/lostpassword/'),
31 1
            $this->authenticatorClass,
32 1
            'lostPasswordForm',
33 1
            null,
34 1
            null,
35 1
            false
36
        );
37
    }
38
}
39