mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
refactor: replace strpos with PHP 8.x string functions
- IRCClient: strpos(..., 'PONG') !== 0 → ! str_starts_with(...) - IGDBService: strpos(, '//') === 0 → str_starts_with(...) - Settings: strpos(, '.') !== false → str_contains(...) - NntmuxCheckIndex: 3x strpos → str_contains strpos with offset (YencService, MovieService, ReleaseRemoverService) is left untouched as it is a legitimate use case.
This commit is contained in:
@@ -176,7 +176,7 @@ class Settings extends Model
|
||||
// Convert numeric strings to actual numbers
|
||||
if (is_numeric($value)) {
|
||||
// Check if it's an integer or float
|
||||
if (strpos((string) $value, '.') !== false) {
|
||||
if (str_contains((string) $value, '.')) {
|
||||
return (float) $value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user