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

Breadcrumb

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

function JumpStatementsSpacingSniff::getLinesCountAfterLast

* @phpcsSuppress SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter

Overrides AbstractControlStructureSpacing::getLinesCountAfterLast

File

vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/ControlStructures/JumpStatementsSpacingSniff.php, line 131

Class

JumpStatementsSpacingSniff

Namespace

SlevomatCodingStandard\Sniffs\ControlStructures

Code

protected function getLinesCountAfterLast(File $phpcsFile, int $jumpStatementPointer, int $jumpStatementEndPointer) : int {
    if ($this->linesCountAfterWhenLastInLastCaseOrDefault !== null && $this->isLastInLastCaseOrDefault($phpcsFile, $jumpStatementEndPointer)) {
        return $this->linesCountAfterWhenLastInLastCaseOrDefault;
    }
    if ($this->linesCountAfterWhenLastInCaseOrDefault !== null && $this->isLastInCaseOrDefault($phpcsFile, $jumpStatementEndPointer)) {
        return $this->linesCountAfterWhenLastInCaseOrDefault;
    }
    return $this->linesCountAfterLast;
}
RSS feed
Powered by Drupal