Skip to content

Commit 810f7d3

Browse files
committed
fix tests
1 parent 18b34d4 commit 810f7d3

1 file changed

Lines changed: 0 additions & 37 deletions

File tree

tests/PHPStan/Analyser/nsrt/bug-14550.php

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,18 @@ function testStrlen(): void
4646
{
4747
$fn = strlen(...);
4848
assertType('Closure(string): int<0, max>', $fn);
49-
50-
if (strlen(...) < 1) {}
51-
if (0 < strlen(...)) {}
5249
}
5350

5451
function testMbStrlen(): void
5552
{
5653
$fn = mb_strlen(...);
5754
assertType('Closure(string, string|null=): int<0, max>', $fn);
58-
59-
if (mb_strlen(...) < 1) {}
60-
if (0 < mb_strlen(...)) {}
6155
}
6256

6357
function testCount(): void
6458
{
6559
$fn = count(...);
6660
assertType('Closure(array|Countable, 0|1=): int<0, max>', $fn);
67-
68-
if (count(...) < 1) {}
69-
if (0 < count(...)) {}
70-
if (count(...) === 0) {}
7161
}
7262

7363
function testSizeof(): void
@@ -80,66 +70,48 @@ function testPregMatch(): void
8070
{
8171
$fn = preg_match(...);
8272
assertType('Closure(string, string, array<string>|null=, TFlags=, int=): (0|1|false)', $fn);
83-
84-
if (preg_match(...) < 1) {}
85-
if (1 <= preg_match(...)) {}
8673
}
8774

8875
function testGettype(): void
8976
{
9077
$fn = gettype(...);
9178
assertType('Closure(mixed): string', $fn);
92-
93-
if (gettype(...) === 'string') {}
94-
if (gettype(...) == 'string') {}
9579
}
9680

9781
function testGetClass(): void
9882
{
9983
$fn = get_class(...);
10084
assertType('Closure(object=): class-string', $fn);
101-
102-
if (get_class(...) == 'stdClass') {}
10385
}
10486

10587
function testGetDebugType(): void
10688
{
10789
$fn = get_debug_type(...);
10890
assertType('Closure(mixed): string', $fn);
109-
110-
if (get_debug_type(...) == 'string') {}
11191
}
11292

11393
function testGetParentClass(): void
11494
{
11595
$fn = get_parent_class(...);
11696
assertType('Closure(object|string=): (class-string|false)', $fn);
117-
118-
if (get_parent_class(...) === 'stdClass') {}
11997
}
12098

12199
function testTrim(): void
122100
{
123101
$fn = trim(...);
124102
assertType('Closure(string, string=): string', $fn);
125-
126-
if (trim(...) !== '') {}
127103
}
128104

129105
function testLtrim(): void
130106
{
131107
$fn = ltrim(...);
132108
assertType('Closure(string, string=): string', $fn);
133-
134-
if (ltrim(...) !== '') {}
135109
}
136110

137111
function testRtrim(): void
138112
{
139113
$fn = rtrim(...);
140114
assertType('Closure(string, string=): string', $fn);
141-
142-
if (rtrim(...) !== '') {}
143115
}
144116

145117
/**
@@ -152,12 +124,3 @@ function testArrayKeysInForeach(array $list): void
152124
$fn = array_keys(...);
153125
assertType('Closure(array, mixed=, bool=): list<int|string>', $fn);
154126
}
155-
156-
/**
157-
* @param list<string> $list
158-
*/
159-
function testCountInForLoop(array $list): void
160-
{
161-
for ($i = 0; $i < count(...); $i++) {
162-
}
163-
}

0 commit comments

Comments
 (0)