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

Breadcrumb

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

function JumpStatementsSpacingSniff::checkLinesBefore

Overrides AbstractControlStructureSpacing::checkLinesBefore

File

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

Class

JumpStatementsSpacingSniff

Namespace

SlevomatCodingStandard\Sniffs\ControlStructures

Code

protected function checkLinesBefore(File $phpcsFile, int $jumpStatementPointer) : void {
    if ($this->allowSingleLineYieldStacking && $this->isStackedSingleLineYield($phpcsFile, $jumpStatementPointer, true)) {
        return;
    }
    if ($this->isThrowExpression($phpcsFile, $jumpStatementPointer)) {
        return;
    }
    parent::checkLinesBefore($phpcsFile, $jumpStatementPointer);
}
RSS feed
Powered by Drupal