@@ -116,8 +116,7 @@ public function endOfLine($enable = true)
116
116
*/
117
117
public function then ($ value )
118
118
{
119
- $ this ->add ("( " .$ this ->sanitize ($ value ).") " );
120
- return $ this ;
119
+ return $ this ->add ("( " .$ this ->sanitize ($ value ).") " );
121
120
}
122
121
123
122
/**
@@ -140,8 +139,7 @@ public function find($value)
140
139
*/
141
140
public function maybe ($ value )
142
141
{
143
- $ this ->add ("( " .$ this ->sanitize ($ value ).")? " );
144
- return $ this ;
142
+ return $ this ->add ("( " .$ this ->sanitize ($ value ).")? " );
145
143
}
146
144
147
145
/**
@@ -154,8 +152,7 @@ public function maybe($value)
154
152
*/
155
153
public function anything ()
156
154
{
157
- $ this ->add ("(.*) " );
158
- return $ this ;
155
+ return $ this ->add ("(.*) " );
159
156
}
160
157
161
158
/**
@@ -169,8 +166,7 @@ public function anything()
169
166
*/
170
167
public function anythingBut ($ value )
171
168
{
172
- $ this ->add ("([^ " . $ this ->sanitize ($ value ) ."]*) " );
173
- return $ this ;
169
+ return $ this ->add ("([^ " . $ this ->sanitize ($ value ) ."]*) " );
174
170
}
175
171
176
172
/**
@@ -183,8 +179,7 @@ public function anythingBut($value)
183
179
*/
184
180
public function something ()
185
181
{
186
- $ this ->add ("(.+) " );
187
- return $ this ;
182
+ return $ this ->add ("(.+) " );
188
183
}
189
184
190
185
/**
@@ -198,8 +193,7 @@ public function something()
198
193
*/
199
194
public function somethingBut ($ value )
200
195
{
201
- $ this ->add ("([^ " . $ this ->sanitize ($ value ) ."]+) " );
202
- return $ this ;
196
+ return $ this ->add ("([^ " . $ this ->sanitize ($ value ) ."]+) " );
203
197
}
204
198
205
199
/**
@@ -233,8 +227,7 @@ public function replace($source, $value)
233
227
*/
234
228
public function lineBreak ()
235
229
{
236
- $ this ->add ("( \\n|( \\r \\n)) " );
237
- return $ this ;
230
+ return $ this ->add ("( \\n|( \\r \\n)) " );
238
231
}
239
232
240
233
/**
@@ -260,8 +253,7 @@ public function br()
260
253
*/
261
254
public function tab ()
262
255
{
263
- $ this ->add ("\\t " );
264
- return $ this ;
256
+ return $ this ->add ("\\t " );
265
257
}
266
258
267
259
/**
@@ -274,8 +266,7 @@ public function tab()
274
266
*/
275
267
public function word ()
276
268
{
277
- $ this ->add ("\\w+ " );
278
- return $ this ;
269
+ return $ this ->add ("\\w+ " );
279
270
}
280
271
281
272
/**
@@ -289,8 +280,7 @@ public function word()
289
280
*/
290
281
public function anyOf ($ value )
291
282
{
292
- $ this ->add ("[ " . $ value ."] " );
293
- return $ this ;
283
+ return $ this ->add ("[ " . $ value ."] " );
294
284
}
295
285
296
286
/**
@@ -334,9 +324,7 @@ public function range()
334
324
335
325
$ value .= "] " ;
336
326
337
- $ this ->add ($ value );
338
-
339
- return $ this ;
327
+ return $ this ->add ($ value );
340
328
}
341
329
342
330
/**
@@ -460,9 +448,7 @@ public function multiple($value)
460
448
break ;
461
449
}
462
450
463
- $ this ->add ($ value );
464
-
465
- return $ this ;
451
+ return $ this ->add ($ value );
466
452
}
467
453
468
454
/**
0 commit comments