PHP 클래스 Elgg\CommitMessage

부터: 1.9
파일 보기 프로젝트 열기: elgg/elgg

공개 메소드들

메소드 설명
__construct ( string | null $msg = null ) Checks if a commit message is in the correct format
__toString ( )
findLengthyLines ( string $msg, integer $max_len ) : array Returns an array of line numbers > $max_len
getLengthyLines ( ) : array Get the line number of lines that are too long
getMaxLineLength ( ) : integer Return the max line length
getMsg ( ) : string Return the processed message.
getOriginalMsg ( ) : string Return the original message
getPart ( string $part ) : string Get part of the message
getValidTypes ( ) : array Return all valid types
isValid ( ) : boolean Are all parts of the message valid
isValidFormat ( ) : boolean Whether the message format conforms to our standards.
isValidLineLength ( ) : boolean Are any of the lines too long?
isValidType ( ) : boolean Is the type valid
removeComments ( string $msg ) : string Removes all lines that start with #
setMaxLineLength ( integer $len ) : void Sets the max line length allowed.
setMsg ( string $msg ) : void Sets the active message
shouldIgnore ( ) : boolean Should this msg be ignored for formatting?

비공개 메소드들

메소드 설명
processMsg ( ) : array Process the msg into its parts

메소드 상세

__construct() 공개 메소드

Checks if a commit message is in the correct format
public __construct ( string | null $msg = null )
$msg string | null The commit message

__toString() 공개 메소드

public __toString ( )

findLengthyLines() 공개 정적인 메소드

Returns an array of line numbers > $max_len
public static findLengthyLines ( string $msg, integer $max_len ) : array
$msg string The content to parse
$max_len integer Maximum length between \n in the $msg
리턴 array

getLengthyLines() 공개 메소드

Get the line number of lines that are too long
public getLengthyLines ( ) : array
리턴 array

getMaxLineLength() 공개 메소드

Return the max line length
public getMaxLineLength ( ) : integer
리턴 integer

getMsg() 공개 메소드

Return the processed message.
public getMsg ( ) : string
리턴 string

getOriginalMsg() 공개 메소드

Return the original message
public getOriginalMsg ( ) : string
리턴 string

getPart() 공개 메소드

Get part of the message
public getPart ( string $part ) : string
$part string One section of the message.
리턴 string

getValidTypes() 공개 정적인 메소드

Return all valid types
public static getValidTypes ( ) : array
리턴 array

isValid() 공개 메소드

Are all parts of the message valid
public isValid ( ) : boolean
리턴 boolean

isValidFormat() 공개 메소드

Whether the message format conforms to our standards.
public isValidFormat ( ) : boolean
리턴 boolean

isValidLineLength() 공개 메소드

Are any of the lines too long?
또한 보기: getLengthyLines() to get line numbers
public isValidLineLength ( ) : boolean
리턴 boolean

isValidType() 공개 메소드

Is the type valid
public isValidType ( ) : boolean
리턴 boolean

removeComments() 공개 정적인 메소드

Removes all lines that start with #
public static removeComments ( string $msg ) : string
$msg string The msg body of the commit
리턴 string

setMaxLineLength() 공개 메소드

Defaults to 160.
public setMaxLineLength ( integer $len ) : void
$len integer The maximum length.
리턴 void

setMsg() 공개 메소드

Sets the active message
public setMsg ( string $msg ) : void
$msg string The message content
리턴 void

shouldIgnore() 공개 메소드

Should this msg be ignored for formatting?
public shouldIgnore ( ) : boolean
리턴 boolean