Completed
Pull Request — newinternal (#542)
by Simon
11:55 queued 02:00
created

ApiPageBase::runApiPage()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 16
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 16
ccs 0
cts 13
cp 0
rs 9.9666
cc 2
nc 2
nop 0
crap 6
1
<?php
2
/******************************************************************************
3
 * Wikipedia Account Creation Assistance tool                                 *
4
 *                                                                            *
5
 * All code in this file is released into the public domain by the ACC        *
6
 * Development Team. Please see team.json for a list of contributors.         *
7
 ******************************************************************************/
8
9
namespace Waca\Tasks;
10
11
use Waca\API\IApiAction;
12
13
abstract class ApiPageBase extends TaskBase implements IRoutedTask, IApiAction
14
{
15
    final public function execute()
16
    {
17
        $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

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