75097[TASK] Improve type annotation for GU::setIndpEnv
Commit message
Review
-
Code review CR +2 Done
- Nikita Hovratov +2
- Christian Kuhn +1
- Benni Mack +1
-
Verified V +2 Done
- Nikita Hovratov +2
- Christian Kuhn +1
- core-ci +1 CI
Issues 1
Files 1
Review log 1214
-
Oliver Klee uploaded patch set 1 07/11/22, 12:51
-
core-ci voted on patch set 1 V +1 07/11/22, 12:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28886
-
Oliver Klee uploaded patch set 2 07/11/22, 13:04
-
core-ci voted on patch set 2 V +1 07/11/22, 13:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28887
-
Oli Bartsch commented on patch set 2 07/11/22, 14:27
-
Oliver Klee commented on patch set 2 07/11/22, 14:31
GeneralUtility.php:2241ReplyThese are the types that getIndpEnv actually can return. Hence it does not make sense in tests to mock values of any other type. (The sole purpose of this method is to mock values to get returned in tests.) And we want this method to allow a range of types as narrow as possible so that PHPStan can catch more calls that do not make sense. -
Oliver Klee commented on patch set 2 07/11/22, 14:35
GeneralUtility.php:2241ReplyAnd no, getIndpEnv will never return an int or a float AFAICT. -
Oli Bartsch commented on patch set 2 07/11/22, 15:14
GeneralUtility.php:2241ReplyDone -
Oli Bartsch wrote 07/11/22, 15:14
Removed cc Oli Bartsch. -
Benni Mack voted on patch set 2 CR +1 07/14/22, 16:26
-
Christian Kuhn commented on patch set 2 V +1 CR +1 07/14/22, 16:30
setIndpEnv() should die anyways ^^ -
Oliver Klee commented on patch set 2 07/14/22, 16:55
How to test: Check that PHPStan does not complain about any of the existing calls to this method in the tests. -
Nikita Hovratov voted on patch set 2 V +2 CR +2 07/14/22, 19:44
-
Nikita Hovratov merged patch set 3 07/14/22, 19:44
GeneralUtility.php:2241