Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
AnyMediaWikiFileUrlChecker
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 checkSourceUrl
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
<?php
namespace FileImporter\Remote\MediaWiki;
use FileImporter\Data\SourceUrl;
use FileImporter\Interfaces\SourceUrlChecker;
/**
 * This SourceUrlChecker implementation will allow any file from any mediawiki website.
 *
 * @license GPL-2.0-or-later
 * @author Addshore
 */
class AnyMediaWikiFileUrlChecker implements SourceUrlChecker {
    use MediaWikiSourceUrlParser;
    /**
     * @inheritDoc
     */
    public function checkSourceUrl( SourceUrl $sourceUrl ) {
        return $this->parseTitleFromSourceUrl( $sourceUrl ) !== null;
    }
}