MediaWiki-CodeSniffer
MediaWiki CodeSniffer Standards
Loading...
Searching...
No Matches
TestFailedExamples Class Reference

Class comment without indent. More...

Public Member Functions

 __construct ( $a)
 
 testNoDoc ( $testVar)
 
 testNeedReturn ( $testVar)
 
 testNeedReturnFromYield ( $testVar)
 
 testSingleSpaces ( $testVar, $_)
 
 testLongTypes ( $aBool, $anInt)
 
 testIntReturn ()
 
 testComplexClosureReturn ()
 There's a return in the body of the function, and a closure, so a return tag is needed.
 
 testLongTypesNoComment ( $aBool, $anInt)
 
 testLongArrayTypes ( $bools, $ints)
 
 testLongTypesMixed ( $aBool, $mixed)
 
 testTypesSpacing ( $aBool, $anInt)
 
 testTagTypos ( $aBool, $anInt)
 @params bool $aBool A bool @params int $anInt An int
 
 testVariablePunctation ( $aBool, $anInt, $aFloatArray)
 
 testInheritWrongCase ( $stuff, $more, $blah)
 
 testDeprecated ( $stuff, $more, $blah)
 
 testDirectionParam ( $in, &$out, &$inOut)
 
 testVariadicArgInArgListWithComment1 ( $key, $params)
 Test with variadic argument in the list.
 
 testVariadicArgInArgListWithComment2 ( $key,... $params)
 Test with variadic argument in the list.
 
 testVariadicArgInArgListWithComment3 ( $key, $params)
 Test with variadic argument in the list.
 
 testVariadicArgInArgListWithComment4 ( $key,... $params)
 Test with variadic argument in the list.
 
 testVariadicArgInArgListWithoutComment1 ( $key, $params)
 Test with variadic argument in the list.
 
 testVariadicArgInArgListWithoutComment2 ( $key,... $params)
 Test with variadic argument in the list.
 
 testVariadicArgInArgListWithoutComment3 ( $key, $params)
 Test with variadic argument in the list.
 
 testVariadicArgInArgListWithoutComment4 ( $key,... $params)
 Test with variadic argument in the list.
 
 testVariadicArgNotInArgList1 ( $key)
 Test with variadic argument not in the list.
 
 testVariadicArgNotInArgList2 ( $key)
 
 testVariadicArgNotInArgList3 ( $key)
 
 testVariadicArgNotInArgList4 ( $key)
 
 testVariadicArgNotDocumented ( $key,... $params)
 
 testVariadicArgWithComments1 ($key)
 
 testVariadicArgWithComments2 ($key)
 
 testVariadicSpacing (... $args)
 
 testLegacyVariadicSpacing ()
 
 testDefaultNull ( $key=null, $value=null, $extra=null)
 Test default null.
 
 testOptionalKeyword ( $key, $value=null)
 Test optional key word.
 
 superfluousAnnotation ()
 
 superfluousAnnotationVariadic ()
 
 testPassByReference ( $refDoc, &$refReal, &$refMatch, &$refNull=null)
 
 testVarArgsDocPassByReference (... $refDoc)
 
 testVarArgsRealPassByReference (&... $refReal)
 
 testBadReturnAnnotation ( $arg)
 
 testBadParamAnnotation ()
 
 testBadThrowsAnnotation ()
 
 testUppercasePrimitive ( $i)
 
 testUppercasePrimitiveArray ( $s)
 
 testDocObject ( $obj)
 
 testReturnTypeHint ( $i)
 
 testReturnTypeHintVoid ( $i)
 
 testDuplicateReturn ()
 
 testCommentDoesNotBelongsToFunction ( $needsTest)
 
 testBadParamName ( $sameCase, $notsamecase)
 
 testAbstractBadReturnType ()
 
 testAbstractWithPhpReturnType ()
 
 testAbstractBadParameterType ( $param)
 
 testPartiallyStaticParamTypes ( $a, int $b)
 
 testStarAlignedDoc ()
 Some text.
 
 testSyntaxDoc ()
 
 testVerySpacyDoc ()
 
 testSpacingDocSingleLine ()
 
 testSpacingDocSingleLineSpacy ()
 SingleLineSpacy

 
 testCloseTagOwnLine ()
 
 testSyntaxDocTag ( $a)
 Comment.
 
 testSyntaxDocTag2 ( $a)
 Comment.
 
 testMissingDocStar ()
 A text on two lines, but missing a doc star.
 
 testMissingDocStar2 ()
 A text on two lines, but missing a doc star and end comment on same line.
 
 testMissingDocStar3 ()
 Missing doc star with empty.
 

Public Attributes

 $missingPublic
 
 $missingWithout
 
 $missingWithComment
 This is a comment.
 
 $punctationString
 
 $arrayString
 
 $typeWithPuncation
 
 $combinator = null
 
 $noType
 
 $testUppercasePrimitive
 
 $testUppercasePrimitiveArray
 
 $testObjectTypeHint
 
 $testObjectArrayTypeHint
 
 $testSpacing
 
 $testInlineComments
 
 $testInlineCommentsNotBelongs
 
 $testCommentDoesNotBelongsToProperty
 
 $failOldStyle
 

Protected Attributes

 $missingProtected
 

Detailed Description

Class comment without indent.

no space before class brace.

Member Function Documentation

◆ superfluousAnnotation()

TestFailedExamples::superfluousAnnotation ( )
Parameters
string$key

◆ superfluousAnnotationVariadic()

TestFailedExamples::superfluousAnnotationVariadic ( )
Parameters
string...$params

◆ testAbstractBadParameterType()

TestFailedExamples::testAbstractBadParameterType ( $param)
abstract
Parameters
integer$param

◆ testAbstractBadReturnType()

TestFailedExamples::testAbstractBadReturnType ( )
abstract
Returns
boolean

◆ testBadParamAnnotation()

TestFailedExamples::testBadParamAnnotation ( )
Returns

◆ testBadParamName()

TestFailedExamples::testBadParamName ( $sameCase,
$notsamecase )
Parameters
string$sameCase
string$notSameCase

◆ testBadReturnAnnotation()

TestFailedExamples::testBadReturnAnnotation ( $arg)
Parameters

◆ testBadThrowsAnnotation()

TestFailedExamples::testBadThrowsAnnotation ( )
Exceptions

◆ testDefaultNull()

TestFailedExamples::testDefaultNull ( $key = null,
$value = null,
$extra = null )

Test default null.

Parameters
string$key
mixed$value
mixed | null$extra

◆ testDeprecated()

TestFailedExamples::testDeprecated ( $stuff,
$more,
$blah )
Deprecated
since begin

◆ testDirectionParam()

TestFailedExamples::testDirectionParam ( $in,
& $out,
& $inOut )
Parameters
[in]int$inA comment
[out]int&$outA comment
[in,out]int&$inOutA comment

◆ testDocObject()

TestFailedExamples::testDocObject ( $obj)
Parameters
object$obj
Returns
Object[]

◆ testDuplicateReturn()

TestFailedExamples::testDuplicateReturn ( )
Returns
string
int

◆ testIntReturn()

TestFailedExamples::testIntReturn ( )
Returns
integer More text

◆ testLegacyVariadicSpacing()

TestFailedExamples::testLegacyVariadicSpacing ( )
Parameters
string$args,...

◆ testLongArrayTypes()

TestFailedExamples::testLongArrayTypes ( $bools,
$ints )
Parameters
boolean[]$boolsA bool array
integer[]$intsA int array
Returns
boolean[] A bool array

◆ testLongTypes()

TestFailedExamples::testLongTypes ( $aBool,
$anInt )
Parameters
boolean$aBoolA bool With a long comment
integer$anIntAn int
Returns
boolean And some text

◆ testLongTypesMixed()

TestFailedExamples::testLongTypesMixed ( $aBool,
$mixed )
Parameters
boolean$aBoolA bool
integer | string | boolean$mixedA mixed var
Returns
boolean|integer|string A return value

◆ testLongTypesNoComment()

TestFailedExamples::testLongTypesNoComment ( $aBool,
$anInt )
Parameters
boolean$aBool
integer$anInt
Returns
boolean

◆ testMissingDocStar3()

TestFailedExamples::testMissingDocStar3 ( )

Missing doc star with empty.

line in there

◆ testNeedReturn()

TestFailedExamples::testNeedReturn ( $testVar)
Parameters
int$testVarThis should start uppercase and end stop.

◆ testNeedReturnFromYield()

TestFailedExamples::testNeedReturnFromYield ( $testVar)
Parameters
int$testVarThis should start uppercase and end stop.

◆ testOptionalKeyword()

TestFailedExamples::testOptionalKeyword ( $key,
$value = null )

Test optional key word.

Parameters
string[optional]$key
string[optional]|null$value

◆ testPartiallyStaticParamTypes()

TestFailedExamples::testPartiallyStaticParamTypes ( $a,
int $b )
Parameters
int | string$a

◆ testPassByReference()

TestFailedExamples::testPassByReference ( $refDoc,
& $refReal,
& $refMatch,
& $refNull = null )
Parameters
int&$refDoc
int$refReal
int$refDoesNotMatchMixed test for ParamNameNoMatch and ParamPassByReference
int$refNull

◆ testReturnTypeHint()

TestFailedExamples::testReturnTypeHint ( $i)
Parameters
int$i

◆ testReturnTypeHintVoid()

TestFailedExamples::testReturnTypeHintVoid ( $i)
Parameters
int$i

◆ testSingleSpaces()

TestFailedExamples::testSingleSpaces ( $testVar,
$_ )
Parameters
int$testVarThis is test.
int$_For test.
Returns
int $testVar This is test.

◆ testStarAlignedDoc()

TestFailedExamples::testStarAlignedDoc ( )

Some text.

And other test

◆ testSyntaxDocTag()

TestFailedExamples::testSyntaxDocTag ( $a)

Comment.

Parameters
string$aA comment
Returns
string A comment
See also
List of Syntax

◆ testSyntaxDocTag2()

TestFailedExamples::testSyntaxDocTag2 ( $a)

Comment.

Parameters
string[]$aA comment
  • OptionA - This is a key option
  • OptionB - This is a deprecated key option
Deprecated
Returns
string A comment

◆ testTagTypos()

TestFailedExamples::testTagTypos ( $aBool,
$anInt )

@params bool $aBool A bool @params int $anInt An int

Returns
bool And some text
Exceptions

Exception

◆ testTypesSpacing()

TestFailedExamples::testTypesSpacing ( $aBool,
$anInt )
Parameters
bool$aBoolA bool
int$anIntAn int
Returns
bool And some text
Exceptions
ExceptionAnd some text

◆ testUppercasePrimitive()

TestFailedExamples::testUppercasePrimitive ( $i)
Parameters
Int$i

◆ testUppercasePrimitiveArray()

TestFailedExamples::testUppercasePrimitiveArray ( $s)
Parameters
String[]$s

◆ testVarArgsDocPassByReference()

TestFailedExamples::testVarArgsDocPassByReference ( $refDoc)
Parameters
int&...$refDoc

◆ testVarArgsRealPassByReference()

TestFailedExamples::testVarArgsRealPassByReference ( &... $refReal)
Parameters
int...$refReal

◆ testVariablePunctation()

TestFailedExamples::testVariablePunctation ( $aBool,
$anInt,
$aFloatArray )
Parameters
{bool}[$aBool]: A bool
[int]{$anInt}: An int

float[] [$aFloatArray]: A float array

Returns
{bool}: And some text
Exceptions
{Exception}

◆ testVariadicArgInArgListWithComment1()

TestFailedExamples::testVariadicArgInArgListWithComment1 ( $key,
$params )

Test with variadic argument in the list.

Parameters
string$keyA comment
string$params,...A comment

◆ testVariadicArgInArgListWithComment2()

TestFailedExamples::testVariadicArgInArgListWithComment2 ( $key,
$params )

Test with variadic argument in the list.

Parameters
string$keyA comment
string$params,...A comment

◆ testVariadicArgInArgListWithComment3()

TestFailedExamples::testVariadicArgInArgListWithComment3 ( $key,
$params )

Test with variadic argument in the list.

Parameters
string$keyA comment
string...$params A comment

◆ testVariadicArgInArgListWithComment4()

TestFailedExamples::testVariadicArgInArgListWithComment4 ( $key,
$params )

Test with variadic argument in the list.

Parameters
string$keyA comment
string...$params A comment

◆ testVariadicArgInArgListWithoutComment1()

TestFailedExamples::testVariadicArgInArgListWithoutComment1 ( $key,
$params )

Test with variadic argument in the list.

Parameters
string$keyA comment
string$params,...A comment

◆ testVariadicArgInArgListWithoutComment2()

TestFailedExamples::testVariadicArgInArgListWithoutComment2 ( $key,
$params )

Test with variadic argument in the list.

Parameters
string$keyA comment
string$params,...A comment

◆ testVariadicArgInArgListWithoutComment3()

TestFailedExamples::testVariadicArgInArgListWithoutComment3 ( $key,
$params )

Test with variadic argument in the list.

Parameters
string$keyA comment
string...$params A comment

◆ testVariadicArgInArgListWithoutComment4()

TestFailedExamples::testVariadicArgInArgListWithoutComment4 ( $key,
$params )

Test with variadic argument in the list.

Parameters
string$keyA comment
string...$params A comment

◆ testVariadicArgNotDocumented()

TestFailedExamples::testVariadicArgNotDocumented ( $key,
$params )
Parameters
string$keyA comment

◆ testVariadicArgNotInArgList1()

TestFailedExamples::testVariadicArgNotInArgList1 ( $key)

Test with variadic argument not in the list.

Parameters
string$keyA comment
string$params,...A comment

◆ testVariadicArgNotInArgList2()

TestFailedExamples::testVariadicArgNotInArgList2 ( $key)
Parameters
string$keyA comment
string$params,...A comment

◆ testVariadicArgNotInArgList3()

TestFailedExamples::testVariadicArgNotInArgList3 ( $key)
Parameters
string$keyA comment
string$params,...A comment

◆ testVariadicArgNotInArgList4()

TestFailedExamples::testVariadicArgNotInArgList4 ( $key)
Parameters
string$keyA comment
string$params,...A comment

◆ testVariadicArgWithComments1()

TestFailedExamples::testVariadicArgWithComments1 ( $key)
Parameters
string$keyA comment
string$params,...A comment

◆ testVariadicArgWithComments2()

TestFailedExamples::testVariadicArgWithComments2 ( $key)
Parameters
string$keyA comment
string$params,...A comment

◆ testVariadicSpacing()

TestFailedExamples::testVariadicSpacing ( $args)
Parameters
string...$args

The documentation for this class was generated from the following files: