Commit 1d966d8
LauraTaylorUK
Minor improvements to fix PHPStan level 8 errors (#160)
* Minor improvements to fix PHPStan level 8 errors
* Instead of an abs call add a type-hint, since this variable is (must be) always a positive integer
* Cosmetic changes to make the Linter happy
* Prevent negative values from passing to the fread function
* Move the type-hint to the attribute definition
* Add type-hints for all read function parameters, add extra check for negative values
* Add checks for the return value of false, from all uses of unpack, and appease the Gods of PHPStan level 8
* Cosmetic changes to make the Linter happy
* Remove the extra check for negative values because PHPStan runs with treatPhpDocTypesAsCertain set to true
* One variable was used to store integers and strings, this change uses two separate variables and when using real ints the loop is faster without the extra checks and returns earlier
* Cosmetic changes to make the Linter happy
* Final check for the return value of false, from use of unpack
* Cosmetic changes to make the Linter happy
* Cosmetic changes to make the Linter happy
* The Linter is misbehaving... reported errors conflicr with each other1 parent 387cd1f commit 1d966d8
3 files changed
+116
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
183 | 188 | | |
184 | 189 | | |
185 | 190 | | |
| |||
247 | 252 | | |
248 | 253 | | |
249 | 254 | | |
250 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
251 | 262 | | |
252 | 263 | | |
253 | 264 | | |
| |||
258 | 269 | | |
259 | 270 | | |
260 | 271 | | |
261 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
262 | 279 | | |
263 | 280 | | |
264 | 281 | | |
265 | 282 | | |
266 | 283 | | |
267 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
268 | 291 | | |
269 | 292 | | |
270 | 293 | | |
| |||
303 | 326 | | |
304 | 327 | | |
305 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
306 | 334 | | |
307 | 335 | | |
308 | 336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| |||
185 | 188 | | |
186 | 189 | | |
187 | 190 | | |
188 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
189 | 198 | | |
190 | 199 | | |
191 | 200 | | |
| |||
194 | 203 | | |
195 | 204 | | |
196 | 205 | | |
197 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
198 | 213 | | |
199 | 214 | | |
200 | 215 | | |
| |||
221 | 236 | | |
222 | 237 | | |
223 | 238 | | |
224 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
225 | 246 | | |
226 | 247 | | |
227 | 248 | | |
| |||
249 | 270 | | |
250 | 271 | | |
251 | 272 | | |
252 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
253 | 280 | | |
254 | 281 | | |
255 | 282 | | |
256 | 283 | | |
257 | 284 | | |
258 | 285 | | |
259 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
260 | 293 | | |
261 | 294 | | |
262 | 295 | | |
| |||
266 | 299 | | |
267 | 300 | | |
268 | 301 | | |
269 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
270 | 309 | | |
271 | 310 | | |
272 | 311 | | |
| |||
304 | 343 | | |
305 | 344 | | |
306 | 345 | | |
307 | | - | |
308 | | - | |
309 | 346 | | |
310 | 347 | | |
311 | 348 | | |
312 | 349 | | |
313 | 350 | | |
314 | 351 | | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
315 | 364 | | |
316 | 365 | | |
317 | 366 | | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
| 367 | + | |
| 368 | + | |
323 | 369 | | |
324 | | - | |
| 370 | + | |
325 | 371 | | |
326 | 372 | | |
327 | 373 | | |
328 | 374 | | |
329 | 375 | | |
330 | 376 | | |
331 | 377 | | |
332 | | - | |
| 378 | + | |
333 | 379 | | |
334 | 380 | | |
335 | 381 | | |
| |||
346 | 392 | | |
347 | 393 | | |
348 | 394 | | |
349 | | - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
350 | 402 | | |
351 | 403 | | |
352 | | - | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
353 | 411 | | |
354 | 412 | | |
355 | 413 | | |
| |||
365 | 423 | | |
366 | 424 | | |
367 | 425 | | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
368 | 432 | | |
369 | | - | |
| 433 | + | |
370 | 434 | | |
371 | 435 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
0 commit comments