MediaWiki-CodeSniffer
MediaWiki CodeSniffer Standards
Loading...
Searching...
No Matches
MediaWiki\Sniffs\Commenting Namespace Reference

Detect and fix the inline comments start or end with multiple asterisks. More...

Classes

class  ClassLevelLicenseSniff
 Custom sniff that requires all classes, interfaces, traits, and enums in a codebase to have the same license doc tag. More...
 
class  DocCommentSniff
 
class  EmptyTagSniff
 Check for tags with nothing after them. More...
 
class  FunctionAnnotationsSniff
 
class  FunctionCommentSniff
 
class  IllegalSingleLineCommentSniff
 
class  LicenseCommentSniff
 
class  MissingCoversSniff
 Identify Test classes that do not have any @covers tags. More...
 
class  PhpunitAnnotationsSniff
 
class  PropertyDocumentationSniff
 
class  RedundantVarNameSniff
 Custom sniff that reports and repairs documentations of class properties that repeat the variable name, which is unnecessary. More...
 
class  VariadicArgumentSniff
 

Variables

trait DocumentationTypeTrait
 Share code between FunctionCommentSniff and PropertyDocumentationSniff.
 

Detailed Description

Detect and fix the inline comments start or end with multiple asterisks.

Warn if any comment containing hints of a variadic argument is found within the arguments list.

Copyright (C) 2015 WordPoints Copyright (C) 2018 Kunal Mehta legok.nosp@m.tm@m.nosp@m.ember.nosp@m..fsf.nosp@m..org

Fail: /*** Comment here *\/ Fail: /*** Comments here again ***\/ Pass: /* Your comments here *\/

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

This includes comment only containing "...", or containing variable names preceded by "...", or ",...". Actual variadic arguments should be used instead.

Variable Documentation

◆ DocumentationTypeTrait

trait MediaWiki::Sniffs::Commenting\DocumentationTypeTrait
Initial value:
{
private static $SHORT_TYPE_MAPPING = [
'boolean' => 'bool',
'boolean[]' => 'bool[]',
'integer' => 'int',
'integer[]' => 'int[]',
]

Share code between FunctionCommentSniff and PropertyDocumentationSniff.