1 | <?php |
||
7 | final class RefactorPriorityQuery |
||
8 | { |
||
9 | /** @var DatabaseClientInterface */ |
||
10 | private $dbClient; |
||
11 | |||
12 | /** @var string */ |
||
13 | const SQL = " |
||
14 | SELECT `path`, `type`, `commits`, `wmc`, (`commits` * `wmc`) as `refactor_priority` |
||
15 | FROM `files` |
||
16 | WHERE `type` = 'php' |
||
17 | ORDER BY `refactor_priority` DESC |
||
18 | "; |
||
19 | |||
20 | 2 | public function __construct(DatabaseClientInterface $dbClient) |
|
24 | |||
25 | /** |
||
26 | * @return array [[path, commits, wmc, refactor_priority], ...] |
||
27 | */ |
||
28 | 2 | public function execute(int $limit = null): array |
|
34 | } |
||
35 |