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

Breadcrumb

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

function Svnblame::getAuthor

Extract the author from a blame line.

Parameters

string $line Line to parse.:

Return value

mixed string or false if impossible to recover.

Overrides VersionControl::getAuthor

File

vendor/squizlabs/php_codesniffer/src/Reports/Svnblame.php, line 32

Class

Svnblame

Namespace

PHP_CodeSniffer\Reports

Code

protected function getAuthor($line) {
    $blameParts = [];
    preg_match('|\\s*([^\\s]+)\\s+([^\\s]+)|', $line, $blameParts);
    if (isset($blameParts[2]) === false) {
        return false;
    }
    return $blameParts[2];
}

API Navigation

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