Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
PathSegmentException
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace MediaWiki\Rest\PathTemplateMatcher;
4
5use Exception;
6
7/**
8 * @newable
9 */
10class PathSegmentException extends Exception {
11    /** @var string */
12    public $template;
13    /** @var mixed */
14    public $userData;
15
16    /**
17     * @stable to call
18     *
19     * @param string $template
20     * @param mixed $userData
21     */
22    public function __construct( $template, $userData ) {
23        $this->template = $template;
24        $this->userData = $userData;
25        parent::__construct( "Unable to add path template \"$template\" since it contains " .
26            "an empty path segment." );
27    }
28}