/**
* Log CSP report, with a different severity depending on $flags
- * @param $flags Array Flags for this report
- * @param $logLine String text of log entry
- * @param $context Array logging context
+ * @param array $flags Flags for this report
+ * @param string $logLine text of log entry
+ * @param array $context logging context
*/
private function logReport( $flags, $logLine, $context ) {
if ( in_array( 'false-positive', $flags ) ) {
/**
* Get extra notes about the report.
*
- * @param $report Array The CSP report
- * @return Array
+ * @param array $report The CSP report
+ * @return array
*/
private function getFlags( $report ) {
$reportOnly = $this->getParameter( 'reportonly' );
/**
* Get text of log line.
*
- * @param $flags Array of additional markers for this report
- * @param $report Array the csp report
- * @return String Text to put in log
+ * @param array $flags of additional markers for this report
+ * @param array $report the csp report
+ * @return string Text to put in log
*/
private function generateLogLine( $flags, $report ) {
$flagText = '';
if ( $flags ) {
- $flagText = '[' . implode( $flags, ', ' ) . ']';
+ $flagText = '[' . implode( ', ', $flags ) . ']';
}
$blockedFile = isset( $report['blocked-uri'] ) ? $report['blocked-uri'] : 'n/a';
/**
* Stop processing the request, and output/log an error
*
- * @param $code String error code
- * @param $method String method that made error
+ * @param string $code error code
+ * @param string $method method that made error
* @throws ApiUsageException Always
*/
private function error( $code, $method ) {
/**
* Mark as internal. This isn't meant to be used by normal api users
+ * @return bool
*/
public function isInternal() {
return true;
/**
* Even if you don't have read rights, we still want your report.
+ * @return bool
*/
public function isReadMode() {
return false;
* Doesn't touch db, so max lag should be rather irrelavent.
*
* Also, this makes sure that reports aren't lost during lag events.
+ * @return bool
*/
public function shouldCheckMaxLag() {
return false;