Add doc-typehints to class properties found by the PropertyDocumentation sniff to improve the documentation. Once the sniff is enabled it avoids that new code is missing type declarations. This is focused on documentation and does not change code. Change-Id: Idf17719c875466810313f0fbbf16bc67f3e40059
28 lines
545 B
PHP
28 lines
545 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Rest\PathTemplateMatcher;
|
|
|
|
use Exception;
|
|
|
|
/**
|
|
* @newable
|
|
*/
|
|
class PathSegmentException extends Exception {
|
|
/** @var string */
|
|
public $template;
|
|
/** @var mixed */
|
|
public $userData;
|
|
|
|
/**
|
|
* @stable to call
|
|
*
|
|
* @param string $template
|
|
* @param mixed $userData
|
|
*/
|
|
public function __construct( $template, $userData ) {
|
|
$this->template = $template;
|
|
$this->userData = $userData;
|
|
parent::__construct( "Unable to add path template \"$template\" since it contains " .
|
|
"an empty path segment." );
|
|
}
|
|
}
|