|
journal
all | Rob is 20,355 days old today. |
Jan 2024 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Mar 2024 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
2023
jan feb mar apr
may jun jul aug
sep oct nov dec
2025
jan feb mar apr
may jun jul aug
sep oct nov dec
|< << more >> >| |
Entries this day: busy-train-this-morning first-foray-into-automatic-php-code-upgrades busy train this morning Trains in Tokyo have largely been the basis of why I've lived here so long, going on 21 years. From my experience, here are levels of crowdedness on Tokyo trains: Level 0: can get a seat of your choice (next to a door) Level 1: can get easily get a seat, with an empty seat on each side Level 2: you and your friend can sit together Level 3: you can sit, but your friend would have to stand, (so you both decide to stand) Level 4: You cannot sit down, but you can stand by the door Level 5: You have plenty of hanging straps to choose from Level 6: You have your own hanging strap Level 7: No hanging straps available, but you can see the floor of the train Level 8: You can't see the floor, but you can use your phone Level 9: You cannot use your phone comfortably, but you can still try Level 10: You cannot use your phone, but you can still breathe (depends on height) Level 11: You can breathe, but have to contort your body to stay intact. Level 12: You cannot breathe easily because your chest is compressed Level 13: You cannot breathe much, but you can lift your legs and be supported by the crowd (depends on weight) Based on my scale above, this morning around 8:15am inbound on Odakyu Line was crowded at Level 10. permalinkfirst foray into automatic php code upgrades Travis Trigger Warning: PHP Today I created a PR: This is a first foray into using Rector for automatic PHP upgrades. Rector config file rector.php controls what is upgraded. In this PR, the rector.php rule AddVoidReturnTypeWhereNoReturnRector allows Rector to add : void to each function definition that had no return. After Rector added : void, our linter then removed @return void from the phpdocs. Fortunately, Rector doesn't mind the linter's change so at least they are in agreement now.
Tex pointed out: After Rector added : void, our linter then removed @return void from the phpdocs. Yes, the linter will remove all useless annotations. In this case, @return void in conjunction with an explicit return type is considered useless, because the explicit return type is authoritative and no additional context is being added with the annotation. This is because the docs are very likely to get out of sync, and you can find many examples of this in our code. It's basically to prevent situations like this:
If you add context to the annotation, it will not be removed.
This should be largely safe. The only place this may cause issues is where it adds the return type to a function that is implemented as part of an interface incorrectly. Particularly an untyped interface. permalinkprev day next day |