Skip to content

Commit 6cbd6f2

Browse files
authored
Format code by the latest cs-fixer. (#6617)
1 parent b79f720 commit 6cbd6f2

File tree

8 files changed

+12
-9
lines changed

8 files changed

+12
-9
lines changed

src/Functions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Stringable;
1314

1415
/**

src/Pluralizer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Stringable;
1314

1415
use Doctrine\Inflector\CachedWordInflector;

src/Str.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Stringable;
1314

1415
use Closure;
@@ -1084,7 +1085,7 @@ public static function reverse($value): string
10841085
return implode(array_reverse(mb_str_split($value)));
10851086
}
10861087

1087-
public static function squish($value): array|string|null
1088+
public static function squish($value): null|array|string
10881089
{
10891090
return preg_replace('~(\s|\x{3164}|\x{1160})+~u', ' ', preg_replace('~^[\s\x{FEFF}]+|[\s\x{FEFF}]+$~u', '', $value));
10901091
}

src/StrCache.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Stringable;
1314

1415
class StrCache

src/Stringable.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Stringable;
1314

1415
use ArrayAccess;

tests/FunctionsTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\Stringable;
1314

1415
use Hyperf\Stringable\Stringable;

tests/StrTest.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\Stringable;
1314

1415
use Hyperf\Stringable\Str;
1516
use Hyperf\Stringable\StrCache;
1617
use InvalidArgumentException;
1718
use PHPUnit\Framework\Attributes\CoversNothing;
19+
use PHPUnit\Framework\Attributes\DataProvider;
1820
use PHPUnit\Framework\TestCase;
1921
use Ramsey\Uuid\UuidInterface;
2022

@@ -322,19 +324,13 @@ public function testStudly()
322324
$this->assertSame('Hello-World', StrCache::studly('hello world', '-'));
323325
}
324326

325-
/**
326-
* @param mixed $validUrl
327-
*/
328-
#[\PHPUnit\Framework\Attributes\DataProvider('validUrls')]
327+
#[DataProvider('validUrls')]
329328
public function testValidUrls($url)
330329
{
331330
$this->assertTrue(Str::isUrl($url));
332331
}
333332

334-
/**
335-
* @param mixed $invalidUrl
336-
*/
337-
#[\PHPUnit\Framework\Attributes\DataProvider('invalidUrls')]
333+
#[DataProvider('invalidUrls')]
338334
public function testInvalidUrls($url)
339335
{
340336
$this->assertFalse(Str::isUrl($url));

tests/StringableTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\Stringable;
1314

1415
use Hyperf\Stringable\Str;

0 commit comments

Comments
 (0)