Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
Max_Activations_Exception
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
2
1<?php
2
3namespace BrianHenryIE\WP_Plugin_Updater\Exception;
4
5use Throwable;
6
7class Max_Activations_Exception extends Plugin_Updater_Exception_Abstract {
8
9    // TODO: This should not reference staging.
10    const MESSAGE = 'You have reached the maximum number of allowed activations on staging domain for this license.';
11
12    public function __construct( string $message = self::MESSAGE, int $code = 0, ?Throwable $previous = null ) {
13
14        if ( self::MESSAGE === $message ) {
15            $message = __( 'You have reached the maximum number of allowed activations on staging domain for this license.', 'bh-wp-plugin-updater' );
16        }
17
18        parent::__construct( $message, $code, $previous );
19    }
20}