Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RequireMultiLineCallSniff.php

function RequireMultiLineCallSniff::shouldReportError

1 call to RequireMultiLineCallSniff::shouldReportError()
RequireMultiLineCallSniff::process in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Functions/RequireMultiLineCallSniff.php
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *

File

vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Functions/RequireMultiLineCallSniff.php, line 220

Class

RequireMultiLineCallSniff

Namespace

SlevomatCodingStandard\Sniffs\Functions

Code

private function shouldReportError(int $lineLength, string $lineStart, string $lineEnd, int $parametersCount, int $indentationLength) : bool {
    if ($this->minLineLength === 0) {
        return true;
    }
    if ($lineLength < $this->minLineLength) {
        return false;
    }
    if ($parametersCount > 1) {
        return true;
    }
    return strlen(trim($lineStart) . trim($lineEnd)) > $indentationLength;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal