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

Public Member Functions

 __construct ( $a)
 Without return.
 
 emptyReturn ()
 A blank return does not require a return tag.
 
 test (&$testVar)
 Single Test function.
 
 inherit ( $stuff, $more, $blah)
 @inheritDoc
 
 inherit2 ( $stuff, $more, $blah)
 
 __toString ()
 
 testShortTypes ( $aBool, $anInt)
 
 testClosureReturn ()
 There's a return in the body of the function, but no return tag is needed.
 
 selfDocumenting ()
 
 getButWeCanSeeThereIsNoReturn ()
 
 getReturnMissing ()
 
 isAbstractSoWeMustAssumeReturnIsMissing ()
 
 isAbstractButAlreadyCommented ()
 This is fine.
 
 isFullyDocumented ()
 
 withVariarg ( $key,... $params)
 
 testCommentsWithDots ( $key)
 
 t174761 ( $parser, $operator, $oldtext=null)
 
 nullableDocWithNullableTypeAndDefaultVal (?string $key=null)
 
 testLowercasePrimative ( $b)
 
 testObjectTypehintOkay (object $obj)
 
 testObjectTypehintOkayIntersect (object $obj)
 
 javaStyle ( $a)
 
 offsetGet ( $offset)
 This documentation block should still be accepted despite the attribute between it and the function, test for T306941.
 
 multipleAttributeLines (bool $b)
 
 multipleAttributesSameLine (bool $b)
 
 staticParamTypesVoid (bool $b, int $i)
 
 staticParamTypesReturn (bool $b, int $i)
 
 noParamsVoid ()
 
 noParamsReturn ()
 
 getSomething ()
 
 convertMessage (Message $m)
 Convert a Message to a MessageValue.
 
 f ()
 Normal comment.
 
 test ( $a1, $a2)
 Test should not process local vars.
 

Public Attributes

 $c
 
 $d
 
 $dep
 
 $inherit
 @inheritDoc
 
 $javaStyle
 
array $ta
 
int $tb
 
string $tdoc
 A variable with prose documentation but only a static type.
 

Protected Attributes

 $b
 
bool $tc
 

Constructor & Destructor Documentation

◆ __construct()

TestPassedExamples::__construct ( $a)

Without return.

Parameters
int$afor test.

Member Function Documentation

◆ javaStyle()

TestPassedExamples::javaStyle ( $a)
Parameters
array<int,string>$a
Returns
array<int, string>

◆ multipleAttributeLines()

TestPassedExamples::multipleAttributeLines ( bool $b)
Parameters
bool$b

◆ multipleAttributesSameLine()

TestPassedExamples::multipleAttributesSameLine ( bool $b)
Parameters
bool$b

◆ nullableDocWithNullableTypeAndDefaultVal()

TestPassedExamples::nullableDocWithNullableTypeAndDefaultVal ( ?string $key = null)
Parameters
?string$keyA comment

◆ offsetGet()

TestPassedExamples::offsetGet ( $offset)

This documentation block should still be accepted despite the attribute between it and the function, test for T306941.

Same with the next two cases below.

Parameters
int$offset
Returns
mixed

◆ t174761()

TestPassedExamples::t174761 ( $parser,
$operator,
$oldtext = null )
Parameters
$parserParser
$operatorExpected '&' or '|'
$oldtextstring The content of the revision prior to $content. When null this will be loaded from the database.

◆ test() [1/2]

TestPassedExamples::test ( $a1,
$a2 )

Test should not process local vars.

Parameters
int$a1
int$a2
Returns
int

◆ test() [2/2]

TestPassedExamples::test ( & $testVar)

Single Test function.

Parameters
int&$testVarFor test.
Returns
int $testVar For test.

◆ testCommentsWithDots()

TestPassedExamples::testCommentsWithDots ( $key)
Parameters
string$keyA comment

◆ testLowercasePrimative()

TestPassedExamples::testLowercasePrimative ( $b)
Parameters
bool$b

◆ testObjectTypehintOkay()

TestPassedExamples::testObjectTypehintOkay ( object $obj)
Parameters
Foo | Bar$obj
Returns
Foo|Bar

◆ testObjectTypehintOkayIntersect()

TestPassedExamples::testObjectTypehintOkayIntersect ( object $obj)
Parameters
Foo&Bar$obj
Returns
Foo&Bar

◆ testShortTypes()

TestPassedExamples::testShortTypes ( $aBool,
$anInt )
Parameters
bool$aBoolA bool
int$anIntAn int
Returns
bool

◆ withVariarg()

TestPassedExamples::withVariarg ( $key,
$params )
Parameters
string$key
string...$params

Member Data Documentation

◆ $dep

TestPassedExamples::$dep

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