forked from phpstan/phpstan-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlowercase-string-trim.php
More file actions
33 lines (28 loc) · 1 KB
/
lowercase-string-trim.php
File metadata and controls
33 lines (28 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
namespace LowercaseStringTrim;
use function PHPStan\Testing\assertType;
class Foo
{
/**
* @param lowercase-string $lowercase
*/
public function doTrim(string $lowercase, string $string): void
{
assertType('lowercase-string', trim($lowercase));
assertType('lowercase-string', ltrim($lowercase));
assertType('lowercase-string', rtrim($lowercase));
assertType('lowercase-string', chop($lowercase));
assertType('lowercase-string', trim($lowercase, $string));
assertType('lowercase-string', ltrim($lowercase, $string));
assertType('lowercase-string', rtrim($lowercase, $string));
assertType('lowercase-string', chop($lowercase));
assertType('string', trim($string));
assertType('string', ltrim($string));
assertType('string', rtrim($string));
assertType('string', chop($string));
assertType('string', trim($string, $lowercase));
assertType('string', ltrim($string, $lowercase));
assertType('string', rtrim($string, $lowercase));
assertType('string', chop($string, $lowercase));
}
}