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

Breadcrumb

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

function File::addWarningOnLine

Records a warning against a specific line in the file.

Parameters

string $warning The error message.:

int $line The line on which the warning occurred.:

string $code A violation code unique to the sniff message.:

array $data Replacements for the warning message.:

int $severity The severity level for this warning. A value of 0 will: will be converted into the default severity level.

Return value

boolean

2 calls to File::addWarningOnLine()
File::parse in vendor/squizlabs/php_codesniffer/src/Files/File.php
Tokenizes the file and prepares it for the test run.
File::setContent in vendor/squizlabs/php_codesniffer/src/Files/File.php
Set the content of the file.

File

vendor/squizlabs/php_codesniffer/src/Files/File.php, line 776

Class

File

Namespace

PHP_CodeSniffer\Files

Code

public function addWarningOnLine($warning, $line, $code, $data = [], $severity = 0) {
    return $this->addMessage(false, $warning, $line, 1, $code, $data, $severity, false);
}
RSS feed
Powered by Drupal