Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 12
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
LexemeTermLanguageCanNotBeEmpty
0.00% covered (danger)
0.00%
0 / 12
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 asApiMessage
0.00% covered (danger)
0.00%
0 / 12
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace Wikibase\Lexeme\MediaWiki\Api\Error;
4
5use MediaWiki\Api\ApiMessage;
6use MediaWiki\Message\Message;
7
8/**
9 * @license GPL-2.0-or-later
10 */
11class LexemeTermLanguageCanNotBeEmpty implements ApiError {
12
13    /** @inheritDoc */
14    public function asApiMessage( $parameterName, array $path ) {
15        $message = new Message(
16            'apierror-wikibaselexeme-lexeme-term-language-cannot-be-empty',
17            []
18        );
19        return new ApiMessage(
20            $message,
21            'unprocessable-request',
22            [
23                'parameterName' => $parameterName,
24                'fieldPath' => $path,
25            ]
26        );
27    }
28
29}