UnsupportedDriverActionException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 21
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
namespace Drupal\Driver\Exception;
4
5
use Drupal\Driver\DriverInterface;
6
7
/**
8
 * Unsupported driver action.
9
 */
10
class UnsupportedDriverActionException extends Exception {
11
12
  /**
13
   * Initializes exception.
14
   *
15
   * @param string $template
16
   *   What is unsupported?
17
   * @param \Drupal\Driver\DriverInterface $driver
18
   *   Driver instance.
19
   * @param int $code
20
   *   The exception code.
21
   * @param \Exception $previous
22
   *   Previous exception.
23
   */
24
  public function __construct($template, DriverInterface $driver, $code = 0, \Exception $previous = NULL) {
25
    $message = sprintf($template, get_class($driver));
26
27
    parent::__construct($message, $driver, $code, $previous);
28
  }
29
30
}
31