Code Coverage
 
Lines
Functions and Methods
Classes and Traits
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
ServiceDisabledException
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
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2declare( strict_types = 1 );
3
4/**
5 * Exception thrown when trying to access a disabled service.
6 *
7 * @license GPL-2.0-or-later
8 * @file
9 */
10
11namespace Wikimedia\Services;
12
13use Exception;
14use Psr\Container\ContainerExceptionInterface;
15use RuntimeException;
16
17/**
18 * Exception thrown when trying to access a disabled service.
19 */
20class ServiceDisabledException extends RuntimeException
21    implements ContainerExceptionInterface {
22
23    /**
24     * @param string $serviceName
25     * @param Exception|null $previous
26     */
27    public function __construct( string $serviceName, ?Exception $previous = null ) {
28        parent::__construct( "Service disabled: $serviceName", 0, $previous );
29    }
30
31}