Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Drupal/Driver/Cores/AbstractCore.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ abstract class AbstractCore implements CoreInterface {
/**
* {@inheritdoc}
*/
public function __construct($drupal_root, $uri = 'default', Random $random = NULL) {
public function __construct($drupal_root, $uri = 'default', ?Random $random = NULL) {
$this->drupalRoot = realpath($drupal_root);
$this->uri = $uri;
if (!isset($random)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Drupal/Driver/Cores/CoreInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface CoreInterface {
* @param \Drupal\Component\Utility\Random $random
* Random string generator.
*/
public function __construct($drupal_root, $uri = 'default', Random $random = NULL);
public function __construct($drupal_root, $uri = 'default', ?Random $random = NULL);

/**
* Return random generator.
Expand Down
2 changes: 1 addition & 1 deletion src/Drupal/Driver/DrushDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class DrushDriver extends BaseDriver {
* @throws \Drupal\Driver\Exception\BootstrapException
* Thrown when a required parameter is missing.
*/
public function __construct($alias = NULL, $root_path = NULL, $binary = 'drush', Random $random = NULL) {
public function __construct($alias = NULL, $root_path = NULL, $binary = 'drush', ?Random $random = NULL) {
if (!empty($alias)) {
// Trim off the '@' symbol if it has been added.
$alias = ltrim($alias, '@');
Expand Down
2 changes: 1 addition & 1 deletion src/Drupal/Driver/Exception/BootstrapException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class BootstrapException extends Exception {
* @param \Exception $previous
* Optional previous exception that was thrown.
*/
public function __construct($message, $code = 0, \Exception $previous = NULL) {
public function __construct($message, $code = 0, ?\Exception $previous = NULL) {
parent::__construct($message, NULL, $code, $previous);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Drupal/Driver/Exception/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ abstract class Exception extends \Exception {
* @param \Exception $previous
* Optional previous exception that was thrown.
*/
public function __construct($message, DriverInterface $driver = NULL, $code = 0, \Exception $previous = NULL) {
public function __construct($message, ?DriverInterface $driver = NULL, $code = 0, ?\Exception $previous = NULL) {
$this->driver = $driver;

parent::__construct($message, $code, $previous);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class UnsupportedDriverActionException extends Exception {
* @param \Exception $previous
* Previous exception.
*/
public function __construct($template, DriverInterface $driver, $code = 0, \Exception $previous = NULL) {
public function __construct($template, DriverInterface $driver, $code = 0, ?\Exception $previous = NULL) {
$message = sprintf($template, get_class($driver));

parent::__construct($message, $driver, $code, $previous);
Expand Down
Loading