Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
PageSaveHandler
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 onPageSaveComplete
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace MediaWiki\Extension\AbuseFilter\Hooks\Handlers;
4
5use MediaWiki\Extension\AbuseFilter\EditRevUpdater;
6use MediaWiki\Storage\Hook\PageSaveCompleteHook;
7
8class PageSaveHandler implements PageSaveCompleteHook {
9    /** @var EditRevUpdater */
10    private $revUpdater;
11
12    /**
13     * @param EditRevUpdater $revUpdater
14     */
15    public function __construct( EditRevUpdater $revUpdater ) {
16        $this->revUpdater = $revUpdater;
17    }
18
19    /**
20     * @inheritDoc
21     */
22    public function onPageSaveComplete( $wikiPage, $user, $summary, $flags, $revisionRecord, $editResult ) {
23        $this->revUpdater->updateRev( $wikiPage, $revisionRecord );
24    }
25}