Skip to content

Commit 7d3b89b

Browse files
committed
Consistent PHPDoc style.
1 parent 7242100 commit 7d3b89b

32 files changed

Lines changed: 172 additions & 41 deletions

src/Components/AlterOperation.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
108108

109109
/**
110110
* Counts brackets.
111+
*
111112
* @var int $brackets
112113
*/
113114
$brackets = 0;
@@ -123,13 +124,15 @@ public static function parse(Parser $parser, TokensList $list, array $options =
123124
*
124125
* 2 -------------------------[ , ]-----------------------> 0
125126
*
126-
* @var int
127+
* @var int $state
127128
*/
128129
$state = 0;
129130

130131
for (; $list->idx < $list->count; ++$list->idx) {
132+
131133
/**
132134
* Token parsed at this moment.
135+
*
133136
* @var Token $token
134137
*/
135138
$token = $list->tokens[$list->idx];

src/Components/Array2d.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ public static function parse(Parser $parser, TokensList $list, array $options =
3838

3939
/**
4040
* The number of values in each set.
41-
* @var int
41+
*
42+
* @var int $count
4243
*/
4344
$count = -1;
4445

@@ -47,18 +48,20 @@ public static function parse(Parser $parser, TokensList $list, array $options =
4748
*
4849
* Below are the states of the parser.
4950
*
50-
* 0 ----------------------[ array ]---------------------> 1
51+
* 0 ----------------------[ array ]----------------------> 1
5152
*
5253
* 1 ------------------------[ , ]------------------------> 0
53-
* 1 -----------------------[ else ]----------------------> -1
54+
* 1 -----------------------[ else ]----------------------> (END)
5455
*
55-
* @var int
56+
* @var int $state
5657
*/
5758
$state = 0;
5859

5960
for (; $list->idx < $list->count; ++$list->idx) {
61+
6062
/**
6163
* Token parsed at this moment.
64+
*
6265
* @var Token $token
6366
*/
6467
$token = $list->tokens[$list->idx];

src/Components/ArrayObj.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,17 @@ public static function parse(Parser $parser, TokensList $list, array $options =
7272
* 1 ------------------[ array element ]-----------------> 2
7373
*
7474
* 2 ------------------------[ , ]-----------------------> 1
75-
* 2 ------------------------[ ) ]-----------------------> -1
75+
* 2 ------------------------[ ) ]-----------------------> (END)
7676
*
77-
* @var int
77+
* @var int $state
7878
*/
7979
$state = 0;
8080

8181
for (; $list->idx < $list->count; ++$list->idx) {
82+
8283
/**
8384
* Token parsed at this moment.
85+
*
8486
* @var Token $token
8587
*/
8688
$token = $list->tokens[$list->idx];

src/Components/Condition.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
9595

9696
/**
9797
* Counts brackets.
98+
*
9899
* @var int $brackets
99100
*/
100101
$brackets = 0;
@@ -104,14 +105,16 @@ public static function parse(Parser $parser, TokensList $list, array $options =
104105
* It is required to keep track of them because their structure contains
105106
* the keyword `AND`, which is also an operator that delimits
106107
* expressions.
107-
* @var bool
108+
*
109+
* @var bool $betweenBefore
108110
*/
109111
$betweenBefore = false;
110112

111113
for (; $list->idx < $list->count; ++$list->idx) {
112114

113115
/**
114116
* Token parsed at this moment.
117+
*
115118
* @var Token $token
116119
*/
117120
$token = $list->tokens[$list->idx];

src/Components/CreateDefinition.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,15 @@ public static function parse(Parser $parser, TokensList $list, array $options =
173173
* 5 ------------------------[ , ]-----------------------> 1
174174
* 5 ------------------------[ ) ]-----------------------> 6 (-1)
175175
*
176-
* @var int
176+
* @var int $state
177177
*/
178178
$state = 0;
179179

180180
for (; $list->idx < $list->count; ++$list->idx) {
181+
181182
/**
182183
* Token parsed at this moment.
184+
*
183185
* @var Token $token
184186
*/
185187
$token = $list->tokens[$list->idx];

src/Components/DataType.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,15 @@ public static function parse(Parser $parser, TokensList $list, array $options =
103103
*
104104
* 1 ----------------[ size and options ]----------------> 2
105105
*
106-
* @var int
106+
* @var int $state
107107
*/
108108
$state = 0;
109109

110110
for (; $list->idx < $list->count; ++$list->idx) {
111+
111112
/**
112113
* Token parsed at this moment.
114+
*
113115
* @var Token $token
114116
*/
115117
$token = $list->tokens[$list->idx];

src/Components/Expression.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,24 +122,28 @@ public static function parse(Parser $parser, TokensList $list, array $options =
122122

123123
/**
124124
* Whether current tokens make an expression or a table reference.
125+
*
125126
* @var bool $isExpr
126127
*/
127128
$isExpr = false;
128129

129130
/**
130131
* Whether a period was previously found.
132+
*
131133
* @var bool $dot
132134
*/
133135
$dot = false;
134136

135137
/**
136138
* Whether an alias is expected. Is 2 if `AS` keyword was found.
139+
*
137140
* @var int $alias
138141
*/
139142
$alias = 0;
140143

141144
/**
142145
* Counts brackets.
146+
*
143147
* @var int $brackets
144148
*/
145149
$brackets = 0;
@@ -150,13 +154,16 @@ public static function parse(Parser $parser, TokensList $list, array $options =
150154
* string, if function was previously found;
151155
* true, if opening bracket was previously found;
152156
* null, in any other case.
157+
*
153158
* @var string|bool $prev
154159
*/
155160
$prev = null;
156161

157162
for (; $list->idx < $list->count; ++$list->idx) {
163+
158164
/**
159165
* Token parsed at this moment.
166+
*
160167
* @var Token $token
161168
*/
162169
$token = $list->tokens[$list->idx];

src/Components/ExpressionArray.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,17 @@ public static function parse(Parser $parser, TokensList $list, array $options =
4444
* 0 ----------------------[ array ]---------------------> 1
4545
*
4646
* 1 ------------------------[ , ]------------------------> 0
47-
* 1 -----------------------[ else ]----------------------> -1
47+
* 1 -----------------------[ else ]----------------------> (END)
4848
*
49-
* @var int
49+
* @var int $state
5050
*/
5151
$state = 0;
5252

5353
for (; $list->idx < $list->count; ++$list->idx) {
54+
5455
/**
5556
* Token parsed at this moment.
57+
*
5658
* @var Token $token
5759
*/
5860
$token = $list->tokens[$list->idx];

src/Components/FunctionCall.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,17 @@ public static function parse(Parser $parser, TokensList $list, array $options =
7373
*
7474
* 0 ----------------------[ name ]-----------------------> 1
7575
*
76-
* 1 --------------------[ parameters ]-------------------> -1
76+
* 1 --------------------[ parameters ]-------------------> (END)
7777
*
78-
* @var int
78+
* @var int $state
7979
*/
8080
$state = 0;
8181

8282
for (; $list->idx < $list->count; ++$list->idx) {
83+
8384
/**
8485
* Token parsed at this moment.
86+
*
8587
* @var Token $token
8688
*/
8789
$token = $list->tokens[$list->idx];

src/Components/IntoKeyword.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,19 @@ public static function parse(Parser $parser, TokensList $list, array $options =
6565
* 0 -----------------------[ name ]----------------------> 1
6666
* 0 ---------------------[ OUTFILE ]---------------------> 2
6767
*
68-
* 1 ------------------------[ ( ]------------------------> -1
68+
* 1 ------------------------[ ( ]------------------------> (END)
6969
*
7070
* 2 ---------------------[ filename ]--------------------> 1
7171
*
72-
* @var int
72+
* @var int $state
7373
*/
7474
$state = 0;
7575

7676
for (; $list->idx < $list->count; ++$list->idx) {
77+
7778
/**
7879
* Token parsed at this moment.
80+
*
7981
* @var Token $token
8082
*/
8183
$token = $list->tokens[$list->idx];

0 commit comments

Comments
 (0)