ApiPageBase   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
eloc 3
dl 0
loc 21
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getRouteName() 0 3 1
A execute() 0 3 1
A setRoute() 0 2 1
1
<?php
2
/******************************************************************************
3
 * Wikipedia Account Creation Assistance tool                                 *
4
 * ACC Development Team. Please see team.json for a list of contributors.     *
5
 *                                                                            *
6
 * This is free and unencumbered software released into the public domain.    *
7
 * Please see LICENSE.md for the full licencing statement.                    *
8
 ******************************************************************************/
9
10
namespace Waca\Tasks;
11
12
use Waca\API\IApiAction;
13
14
abstract class ApiPageBase extends TaskBase implements IRoutedTask, IApiAction
15
{
16
    final public function execute()
17
    {
18
        $this->main();
0 ignored issues
show
Bug introduced by
The method main() does not exist on Waca\Tasks\ApiPageBase. Since it exists in all sub-types, consider adding an abstract or default implementation to Waca\Tasks\ApiPageBase. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

18
        $this->/** @scrutinizer ignore-call */ 
19
               main();
Loading history...
19
    }
20
21
    /**
22
     * @param string $routeName
23
     */
24
    public function setRoute($routeName)
25
    {
26
        // no-op
27
    }
28
29
    /**
30
     * @return string
31
     */
32
    public function getRouteName()
33
    {
34
        return 'main';
35
    }
36
}
37