Commit 407867d5 authored by Marcin Grabias's avatar Marcin Grabias
Browse files

PHP 7.4 compatibility fix.

parent a3d354f2
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -56,6 +56,16 @@ abstract class ViewsBulkOperationsKernelTestBase extends KernelTestBase {
   */
  protected ?ViewsBulkOperationsViewDataInterface $vboDataService;

  /**
   * Messages static for testing purposes.
   *
   * @todo Move this to message() method static when PHP 7.4 is no longer
   * supported.
   *
   * @var array
   */
  private static $messages = [];

  /**
   * {@inheritdoc}
   */
@@ -309,11 +319,10 @@ abstract class ViewsBulkOperationsKernelTestBase extends KernelTestBase {
   * @return string|null
   */
  public static function message($message = NULL, $type = 'status', $repeat = TRUE) {
    static $messages = [];
    if ($message === NULL) {
      return $messages;
      return self::$messages;
    }
    $messages[] = [
    self::$messages[] = [
      'message' => (string) $message,
      'type' => $type,
    ];