Skip to content

Commit 5b0845c

Browse files
authored
CS/QA: align different data in @param tags (#257)
Effectively treat the information in a `@param` tag as columns to be aligned: ``` @param dataType $variableName Description ``` Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
1 parent 3602735 commit 5b0845c

File tree

2 files changed

+121
-121
lines changed

2 files changed

+121
-121
lines changed

VariableAnalysis/Lib/Helpers.php

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static function getIntOrNull($value) {
3333

3434
/**
3535
* @param File $phpcsFile
36-
* @param int $stackPtr
36+
* @param int $stackPtr
3737
*
3838
* @return ?int
3939
*/
@@ -44,7 +44,7 @@ public static function findContainingOpeningSquareBracket(File $phpcsFile, $stac
4444

4545
/**
4646
* @param File $phpcsFile
47-
* @param int $stackPtr
47+
* @param int $stackPtr
4848
*
4949
* @return int
5050
*/
@@ -55,7 +55,7 @@ public static function getPreviousStatementPtr(File $phpcsFile, $stackPtr) {
5555

5656
/**
5757
* @param File $phpcsFile
58-
* @param int $stackPtr
58+
* @param int $stackPtr
5959
*
6060
* @return ?int
6161
*/
@@ -123,7 +123,7 @@ public static function getClosestIfPositionIfBeforeOtherConditions(array $condit
123123

124124
/**
125125
* @param File $phpcsFile
126-
* @param int $stackPtr
126+
* @param int $stackPtr
127127
*
128128
* @return bool
129129
*/
@@ -133,7 +133,7 @@ public static function isTokenInsideFunctionDefinitionArgumentList(File $phpcsFi
133133

134134
/**
135135
* @param File $phpcsFile
136-
* @param int $stackPtr
136+
* @param int $stackPtr
137137
*
138138
* @return bool
139139
*/
@@ -152,7 +152,7 @@ public static function isTokenInsideFunctionCall(File $phpcsFile, $stackPtr) {
152152
* `getFunctionIndexForFunctionCallArgument`.
153153
*
154154
* @param File $phpcsFile
155-
* @param int $stackPtr
155+
* @param int $stackPtr
156156
*
157157
* @return ?int
158158
*/
@@ -199,7 +199,7 @@ public static function getFunctionIndexForFunctionArgument(File $phpcsFile, $sta
199199

200200
/**
201201
* @param File $phpcsFile
202-
* @param int $stackPtr
202+
* @param int $stackPtr
203203
*
204204
* @return bool
205205
*/
@@ -211,7 +211,7 @@ public static function isTokenInsideFunctionUseImport(File $phpcsFile, $stackPtr
211211
* Find the token index of the "use" for a token inside a function use import
212212
*
213213
* @param File $phpcsFile
214-
* @param int $stackPtr
214+
* @param int $stackPtr
215215
*
216216
* @return ?int
217217
*/
@@ -237,7 +237,7 @@ public static function getUseIndexForUseImport(File $phpcsFile, $stackPtr) {
237237

238238
/**
239239
* @param File $phpcsFile
240-
* @param int $stackPtr
240+
* @param int $stackPtr
241241
*
242242
* @return ?int
243243
*/
@@ -257,7 +257,7 @@ public static function findFunctionCall(File $phpcsFile, $stackPtr) {
257257

258258
/**
259259
* @param File $phpcsFile
260-
* @param int $stackPtr
260+
* @param int $stackPtr
261261
*
262262
* @return array<int, array<int>>
263263
*/
@@ -312,7 +312,7 @@ public static function findFunctionCallArguments(File $phpcsFile, $stackPtr) {
312312

313313
/**
314314
* @param File $phpcsFile
315-
* @param int $stackPtr
315+
* @param int $stackPtr
316316
*
317317
* @return ?int
318318
*/
@@ -342,9 +342,9 @@ public static function normalizeVarName($varName) {
342342
}
343343

344344
/**
345-
* @param File $phpcsFile
346-
* @param int $stackPtr
347-
* @param string $varName (optional) if it differs from the normalized 'content' of the token at $stackPtr
345+
* @param File $phpcsFile
346+
* @param int $stackPtr
347+
* @param string $varName (optional) if it differs from the normalized 'content' of the token at $stackPtr
348348
*
349349
* @return ?int
350350
*/
@@ -395,7 +395,7 @@ public static function findVariableScope(File $phpcsFile, $stackPtr, $varName =
395395
* arrow function and also check its enclosing scope separately.
396396
*
397397
* @param File $phpcsFile
398-
* @param int $stackPtr
398+
* @param int $stackPtr
399399
*
400400
* @return ?int
401401
*/
@@ -439,7 +439,7 @@ public static function findVariableScopeExceptArrowFunctions(File $phpcsFile, $s
439439
* enclosing function's scope, which may be incorrect.
440440
*
441441
* @param File $phpcsFile
442-
* @param int $stackPtr
442+
* @param int $stackPtr
443443
*
444444
* @return ?int
445445
*/
@@ -477,7 +477,7 @@ private static function getStartOfTokenScope(File $phpcsFile, $stackPtr) {
477477

478478
/**
479479
* @param File $phpcsFile
480-
* @param int $stackPtr
480+
* @param int $stackPtr
481481
*
482482
* @return bool
483483
*/
@@ -494,7 +494,7 @@ public static function isTokenInsideArrowFunctionDefinition(File $phpcsFile, $st
494494

495495
/**
496496
* @param File $phpcsFile
497-
* @param int $stackPtr
497+
* @param int $stackPtr
498498
*
499499
* @return ?int
500500
*/
@@ -517,7 +517,7 @@ public static function getContainingArrowFunctionIndex(File $phpcsFile, $stackPt
517517

518518
/**
519519
* @param File $phpcsFile
520-
* @param int $stackPtr
520+
* @param int $stackPtr
521521
*
522522
* @return ?int
523523
*/
@@ -535,7 +535,7 @@ private static function getPreviousArrowFunctionIndex(File $phpcsFile, $stackPtr
535535

536536
/**
537537
* @param File $phpcsFile
538-
* @param int $stackPtr
538+
* @param int $stackPtr
539539
*
540540
* @return bool
541541
*/
@@ -567,7 +567,7 @@ public static function isArrowFunction(File $phpcsFile, $stackPtr) {
567567

568568
/**
569569
* @param File $phpcsFile
570-
* @param int $stackPtr
570+
* @param int $stackPtr
571571
*
572572
* @return ?array<string, int>
573573
*/
@@ -619,7 +619,7 @@ public static function getArrowFunctionOpenClose(File $phpcsFile, $stackPtr) {
619619
* Return a list of indices for variables assigned within a list assignment
620620
*
621621
* @param File $phpcsFile
622-
* @param int $listOpenerIndex
622+
* @param int $listOpenerIndex
623623
*
624624
* @return ?array<int>
625625
*/
@@ -685,7 +685,7 @@ public static function getListAssignments(File $phpcsFile, $listOpenerIndex) {
685685

686686
/**
687687
* @param File $phpcsFile
688-
* @param int $stackPtr
688+
* @param int $stackPtr
689689
*
690690
* @return string[]
691691
*/
@@ -749,7 +749,7 @@ public static function isVariableANumericVariable($varName) {
749749

750750
/**
751751
* @param File $phpcsFile
752-
* @param int $stackPtr
752+
* @param int $stackPtr
753753
*
754754
* @return bool
755755
*/
@@ -777,7 +777,7 @@ public static function isVariableInsideElseCondition(File $phpcsFile, $stackPtr)
777777

778778
/**
779779
* @param File $phpcsFile
780-
* @param int $stackPtr
780+
* @param int $stackPtr
781781
*
782782
* @return bool
783783
*/
@@ -811,7 +811,7 @@ public static function isVariableInsideElseBody(File $phpcsFile, $stackPtr) {
811811

812812
/**
813813
* @param File $phpcsFile
814-
* @param int $stackPtr
814+
* @param int $stackPtr
815815
*
816816
* @return int[]
817817
*/
@@ -852,7 +852,7 @@ public static function isIndexInsideScope($needle, $scopeStart, $scopeEnd) {
852852

853853
/**
854854
* @param File $phpcsFile
855-
* @param int $scopeStartIndex
855+
* @param int $scopeStartIndex
856856
*
857857
* @return int
858858
*/
@@ -889,7 +889,7 @@ public static function getLastNonEmptyTokenIndexInFile(File $phpcsFile) {
889889

890890
/**
891891
* @param VariableInfo $varInfo
892-
* @param ScopeInfo $scopeInfo
892+
* @param ScopeInfo $scopeInfo
893893
*
894894
* @return bool
895895
*/
@@ -914,9 +914,9 @@ public static function areFollowingArgumentsUsed(VariableInfo $varInfo, ScopeInf
914914
}
915915

916916
/**
917-
* @param File $phpcsFile
917+
* @param File $phpcsFile
918918
* @param VariableInfo $varInfo
919-
* @param ScopeInfo $scopeInfo
919+
* @param ScopeInfo $scopeInfo
920920
*
921921
* @return bool
922922
*/
@@ -947,7 +947,7 @@ public static function isRequireInScopeAfter(File $phpcsFile, VariableInfo $varI
947947
* Find the index of the function keyword for a token in a function call's arguments
948948
*
949949
* @param File $phpcsFile
950-
* @param int $stackPtr
950+
* @param int $stackPtr
951951
*
952952
* @return ?int
953953
*/
@@ -976,7 +976,7 @@ public static function getFunctionIndexForFunctionCallArgument(File $phpcsFile,
976976

977977
/**
978978
* @param File $phpcsFile
979-
* @param int $stackPtr
979+
* @param int $stackPtr
980980
*
981981
* @return bool
982982
*/
@@ -1001,7 +1001,7 @@ public static function isVariableInsideIssetOrEmpty(File $phpcsFile, $stackPtr)
10011001

10021002
/**
10031003
* @param File $phpcsFile
1004-
* @param int $stackPtr
1004+
* @param int $stackPtr
10051005
*
10061006
* @return bool
10071007
*/
@@ -1038,7 +1038,7 @@ public static function isVariableArrayPushShortcut(File $phpcsFile, $stackPtr) {
10381038

10391039
/**
10401040
* @param File $phpcsFile
1041-
* @param int $stackPtr
1041+
* @param int $stackPtr
10421042
*
10431043
* @return bool
10441044
*/
@@ -1059,7 +1059,7 @@ public static function isVariableInsideUnset(File $phpcsFile, $stackPtr) {
10591059

10601060
/**
10611061
* @param File $phpcsFile
1062-
* @param int $stackPtr
1062+
* @param int $stackPtr
10631063
*
10641064
* @return bool
10651065
*/
@@ -1077,7 +1077,7 @@ public static function isTokenInsideAssignmentRHS(File $phpcsFile, $stackPtr) {
10771077

10781078
/**
10791079
* @param File $phpcsFile
1080-
* @param int $stackPtr
1080+
* @param int $stackPtr
10811081
*
10821082
* @return bool
10831083
*/
@@ -1098,7 +1098,7 @@ public static function isTokenInsideAssignmentLHS(File $phpcsFile, $stackPtr) {
10981098

10991099
/**
11001100
* @param File $phpcsFile
1101-
* @param int $stackPtr
1101+
* @param int $stackPtr
11021102
*
11031103
* @return bool
11041104
*/

0 commit comments

Comments
 (0)