Unverified Commit a0b2090a authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3257654 by mondrake: Fix PHPStan L0 failures that cannot be included in baseline

parent 3db8f620
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -521,11 +521,13 @@ public function prepareStatement(string $query, array $options, bool $allow_row_

    try {
      $query = $this->preprocessStatement($query, $options);
      return new $this->statementWrapperClass($this, $this->connection, $query, $options['pdo'] ?? [], $allow_row_count);
      $statement = new $this->statementWrapperClass($this, $this->connection, $query, $options['pdo'] ?? [], $allow_row_count);
    }
    catch (\Exception $e) {
      $this->exceptionHandler()->handleStatementException($e, $query, $options);
    }

    return $statement;
  }

  /**
+2 −0
Original line number Diff line number Diff line
@@ -73,6 +73,8 @@ public function guessMimeType(string $path) : ?string {
        return $mime_type;
      }
    }

    return NULL;
  }

  /**
+1 −0
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@ public function isEmpty() {
  /**
   * {@inheritdoc}
   */
  #[\ReturnTypeWillChange]
  public function offsetExists($offset) {
    $this->ensureComputedValue();
    return parent::offsetExists($offset);
+1 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ public function get($index) {
  /**
   * {@inheritdoc}
   */
  #[\ReturnTypeWillChange]
  public function offsetExists($offset) {
    // For consistency with what happens in get(), we force offsetExists() to
    // be TRUE for delta 0.
+1 −0
Original line number Diff line number Diff line
@@ -113,6 +113,7 @@ public function getIds() {
  /**
   * {@inheritdoc}
   */
  #[\ReturnTypeWillChange]
  public function count($refresh = FALSE) {
    // We do not want this source plugin to have a cacheable count.
    // @see \Drupal\migrate_cache_counts_test\Plugin\migrate\source\CacheableEmbeddedDataSource
Loading