Review main Merged

70444[TASK] Use native str_starts_with() PHP method

Benni Mack CR +2 V +2 Hard +174 −120 updated 09/20/21, 20:01

Commit message

One of our main utility methods "GeneralUtility::isFirstPartOfStr"
can now replaced by PHP's native "str_starts_with()" function
(see https://www.php.net/manual/en/function.str-starts-with.php)
which is also available for PHP 7.4 thanks to Symfony's polyfill
package.

This way, we can
a) slim down our own code base in favor of native PHP calls
b) add a bit of performance due to native PHP calls
c) move towards type-safety to ensure that we hand over strings
to these methods, as our own method was a bit more "lax" on things

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 28

Show 8 more files