Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| NameTableAccessException | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| newFromDetails | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * @license GPL-2.0-or-later |
| 4 | * @file |
| 5 | */ |
| 6 | |
| 7 | namespace MediaWiki\Storage; |
| 8 | |
| 9 | use RuntimeException; |
| 10 | |
| 11 | /** |
| 12 | * Exception representing a failure to look up a row from a name table. |
| 13 | * |
| 14 | * @newable |
| 15 | * @since 1.31 |
| 16 | */ |
| 17 | class NameTableAccessException extends RuntimeException { |
| 18 | |
| 19 | /** |
| 20 | * @param string $tableName |
| 21 | * @param string $accessType |
| 22 | * @param string|int $accessValue |
| 23 | * @return NameTableAccessException |
| 24 | */ |
| 25 | public static function newFromDetails( $tableName, $accessType, $accessValue ) { |
| 26 | $message = "Failed to access name from {$tableName} using {$accessType} = {$accessValue}"; |
| 27 | return new self( $message ); |
| 28 | } |
| 29 | |
| 30 | } |