apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: Notifysend

Source Location: /PHP_CodeSniffer-3.1.1/src/Reports/Notifysend.php

Class Overview


Notify-send report for PHP_CodeSniffer.


Author(s):

Copyright:

  • 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 22]
Notify-send report for PHP_CodeSniffer.

Supported configuration parameters:

  • notifysend_path - Full path to notify-send cli command
  • notifysend_timeout - Timeout in milliseconds
  • notifysend_showok - Show "ok, all fine" messages (0/1)



[ Top ]


Class Variables

$path =  'notify-send'

[line 37]

Path to notify-send command.
  • Access: protected

Type:   string


[ Top ]

$showOk =  true

[line 44]

Show "ok, all fine" messages.
  • Access: protected

Type:   boolean


[ Top ]

$timeout =  3000

[line 30]

Notification timeout in milliseconds.
  • Access: protected

Type:   integer


[ Top ]

$version =  null

[line 51]

Version of installed notify-send executable.
  • Access: protected

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 57]

Notifysend __construct( )

Load configuration data.
  • Access: public

[ Top ]

generate   [line 124]

void generate( string $cachedData, int $totalFiles, int $totalErrors, int $totalWarnings, int $totalFixable, [bool $showSources = false], [int $width = 80], [bool $interactive = false], [bool $toScreen = true])

Generates a summary of errors and warnings for each file processed.
  • Access: public

Parameters:

string   $cachedData   —  Any partial report data that was returned from generateFileReport during the run.
int   $totalFiles   —  Total number of files processed during the run.
int   $totalErrors   —  Total number of errors found during the run.
int   $totalWarnings   —  Total number of warnings found during the run.
int   $totalFixable   —  Total number of problems that can be fixed.
bool   $showSources   —  Show sources?
int   $width   —  Maximum allowed line width.
bool   $interactive   —  Are we running in interactive mode?
bool   $toScreen   —  Is the report being printed to screen?

[ Top ]

generateFileReport   [line 97]

bool generateFileReport( array $report, File $phpcsFile, [bool $showSources = false], [int $width = 80])

Generate a partial report for a single processed file.

Function should return TRUE if it printed or stored data about the file and FALSE if it ignored the file. Returning TRUE indicates that the file and its data should be counted in the grand totals.

  • Access: public

Parameters:

array   $report   —  Prepared report data.
\PHP_CodeSniffer\File   $phpcsFile   —  The file being reported on.
bool   $showSources   —  Show sources?
int   $width   —  Maximum allowed line width.

[ Top ]

generateMessage   [line 158]

string generateMessage( string[] $checkedFiles, int $totalErrors, int $totalWarnings)

Generate the error message to show to the user.
  • Return: Error message or NULL if no error/warning found.
  • Access: protected

Parameters:

string[]   $checkedFiles   —  The files checked during the run.
int   $totalErrors   —  Total number of errors found during the run.
int   $totalWarnings   —  Total number of warnings found during the run.

[ Top ]

getBasicCommand   [line 226]

string getBasicCommand( )

Generate and return the basic notify-send command string to execute.
  • Return: Shell command with common parameters.
  • Access: protected

[ Top ]

notifyAllFine   [line 192]

void notifyAllFine( )

Tell the user that all is fine and no error/warning has been found.
  • Access: protected

[ Top ]

notifyErrors   [line 210]

void notifyErrors( string $msg)

Tell the user that errors/warnings have been found.
  • Access: protected

Parameters:

string   $msg   —  Message to display.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:27:39 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.