Skip to content

[9.x] Remove useless if statement in Str - #41570

Merged
taylorotwell merged 1 commit into
laravel:9.xfrom
hAz5:remove-useless-statement
Mar 19, 2022
Merged

[9.x] Remove useless if statement in Str#41570
taylorotwell merged 1 commit into
laravel:9.xfrom
hAz5:remove-useless-statement

Conversation

@hAz5

@hAz5 hAz5 commented Mar 19, 2022

Copy link
Copy Markdown
Contributor

because min requirement of Laravel9 PHP version is 8 and above
we don't need to check this

  if (is_null($length) && PHP_MAJOR_VERSION < 8) {
      $length = mb_strlen($string, $encoding);
  }

@hAz5
hAz5 force-pushed the remove-useless-statement branch from c7e1fe5 to 37b6287 Compare March 19, 2022 12:32
@hAz5 hAz5 changed the title [9.x] remove useless if statement [9.x] remove useless if statement in Str Mar 19, 2022
@imanghafoori1

Copy link
Copy Markdown
Contributor

Please explain why it is useless.

@crynobone

Copy link
Copy Markdown
Member

Please explain why it is useless.

Laravel 9 doesn't support PHP 7

@taylorotwell
taylorotwell merged commit 066eb53 into laravel:9.x Mar 19, 2022
@GrahamCampbell GrahamCampbell changed the title [9.x] remove useless if statement in Str [9.x] Remove useless if statement in Str Mar 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants