Skip to content

Commit 257f57a

Browse files
ArshidArshid
authored andcommitted
DowngradeMbStrContainsRector
1 parent 06265a2 commit 257f57a

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace Rector\Tests\DowngradePhp80\Rector\FuncCall\DowngradeMbStrContainsRector\Fixture;
4+
5+
class Fixture
6+
{
7+
public function run()
8+
{
9+
$isMatch = str_contains('abc', 'a');
10+
}
11+
}
12+
13+
?>

rules/DowngradePhp80/Rector/FuncCall/DowngradeMbStrContainsRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function refactor(Node $node): Identical | NotIdentical | null
6868
{
6969
$funcCall = $this->matchStrContainsOrNotStrContains($node);
7070

71-
if ($funcCall->isFirstClassCallable()) {
71+
if (!$funcCall->isFirstClassCallable()) {
7272
return null;
7373
}
7474

0 commit comments

Comments
 (0)