Skip to content

Commit

Permalink
Format code by the latest cs-fixer. (#6617)
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo authored Mar 23, 2024
1 parent 4d80fbf commit 3fb5c6c
Show file tree
Hide file tree
Showing 39 changed files with 47 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/Backoff.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support;

use InvalidArgumentException;
Expand Down
1 change: 1 addition & 0 deletions src/Backoff/ArrayBackoff.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support\Backoff;

use Hyperf\Collection\Arr;
Expand Down
1 change: 1 addition & 0 deletions src/ClearStatCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support;

class ClearStatCache
Expand Down
1 change: 1 addition & 0 deletions src/Composer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support;

use Composer\Autoload\ClassLoader;
Expand Down
1 change: 1 addition & 0 deletions src/Exception/ExceptionThrower.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support\Exception;

use Throwable;
Expand Down
1 change: 1 addition & 0 deletions src/Exception/IPReadFailedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support\Exception;

use RuntimeException;
Expand Down
1 change: 1 addition & 0 deletions src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support\Exception;

class InvalidArgumentException extends \InvalidArgumentException
Expand Down
1 change: 1 addition & 0 deletions src/Filesystem/FileNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support\Filesystem;

use Exception;
Expand Down
1 change: 1 addition & 0 deletions src/Filesystem/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support\Filesystem;

use ErrorException;
Expand Down
1 change: 1 addition & 0 deletions src/Fluent.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support;

use ArrayAccess;
Expand Down
4 changes: 3 additions & 1 deletion src/Functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support;

use Carbon\Carbon;
use Closure;
use DateTimeZone;
use Hyperf\Collection\Arr;
use Hyperf\Context\ApplicationContext;
use Hyperf\Di\Container;
use Hyperf\Stringable\StrCache;
use Hyperf\Support\Backoff\ArrayBackoff;
use Throwable;
Expand Down Expand Up @@ -198,7 +200,7 @@ function getter(string $property): string
function make(string $name, array $parameters = [])
{
if (ApplicationContext::hasContainer()) {
/** @var \Hyperf\Di\Container $container */
/** @var Container $container */
$container = ApplicationContext::getContainer();
if (method_exists($container, 'make')) {
return $container->make($name, $parameters);
Expand Down
1 change: 1 addition & 0 deletions src/IPReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support;

use Hyperf\Contract\IPReaderInterface;
Expand Down
1 change: 1 addition & 0 deletions src/MessageBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support;

use Countable;
Expand Down
1 change: 1 addition & 0 deletions src/MimeTypeExtensionGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support;

class MimeTypeExtensionGuesser
Expand Down
1 change: 1 addition & 0 deletions src/Network.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support;

use Hyperf\Stringable\Str;
Expand Down
1 change: 1 addition & 0 deletions src/Optional.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support;

use ArrayAccess;
Expand Down
1 change: 1 addition & 0 deletions src/Pluralizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support;

use Doctrine\Inflector\CachedWordInflector;
Expand Down
1 change: 1 addition & 0 deletions src/Reflection/ClassInvoker.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support\Reflection;

use ReflectionClass;
Expand Down
1 change: 1 addition & 0 deletions src/ResourceGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support;

class ResourceGenerator
Expand Down
1 change: 1 addition & 0 deletions src/SafeCaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support;

use Closure;
Expand Down
1 change: 1 addition & 0 deletions src/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support;

class System
Expand Down
1 change: 1 addition & 0 deletions src/Traits/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support\Traits;

trait Container
Expand Down
3 changes: 2 additions & 1 deletion src/Traits/ForwardsCalls.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support\Traits;

use BadMethodCallException;
Expand All @@ -28,7 +29,7 @@ protected function forwardCallTo($object, string $method, array $parameters)
{
try {
return $object->{$method}(...$parameters);
} catch (Error|BadMethodCallException $e) {
} catch (BadMethodCallException|Error $e) {
$pattern = '~^Call to undefined method (?P<class>[^:]+)::(?P<method>[^\(]+)\(\)$~';

if (! preg_match($pattern, $e->getMessage(), $matches)) {
Expand Down
1 change: 1 addition & 0 deletions src/Traits/InteractsWithTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support\Traits;

use Carbon\Carbon;
Expand Down
1 change: 1 addition & 0 deletions src/Traits/StaticInstance.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Support\Traits;

use Hyperf\Context\Context;
Expand Down
4 changes: 3 additions & 1 deletion tests/BackoffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\Support;

use Hyperf\Support\Backoff;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;

/**
* @internal
* @coversNothing
*/
#[\PHPUnit\Framework\Attributes\CoversClass(\Hyperf\Support\Backoff::class)]
#[CoversClass(Backoff::class)]
class BackoffTest extends TestCase
{
public function testBackoff()
Expand Down
1 change: 1 addition & 0 deletions tests/ComposerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\Support;

use Composer\Autoload\ClassLoader;
Expand Down
1 change: 1 addition & 0 deletions tests/Exception/RetryException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\Support\Exception;

use Exception;
Expand Down
6 changes: 4 additions & 2 deletions tests/Filesystem/FilesystemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\Support\Filesystem;

use Hyperf\Coroutine\Parallel;
use Hyperf\Engine\Channel;
use Hyperf\Support\Filesystem\Filesystem;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use Swoole\Runtime;
use Throwable;
Expand Down Expand Up @@ -50,7 +52,7 @@ public function testLock()
unlink('./test.txt');
}

#[\PHPUnit\Framework\Attributes\Group('NonCoroutine')]
#[Group('NonCoroutine')]
public function testFopenInCoroutine()
{
run(function () {
Expand Down Expand Up @@ -84,7 +86,7 @@ public function testMakeDirection()
$this->assertTrue(true);
}

#[\PHPUnit\Framework\Attributes\Group('NonCoroutine')]
#[Group('NonCoroutine')]
public function testPutLockInCoroutine()
{
run(function () {
Expand Down
1 change: 1 addition & 0 deletions tests/FunctionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\Support;

use HyperfTest\Support\Exception\RetryException;
Expand Down
1 change: 1 addition & 0 deletions tests/NetworkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\Support;

use Hyperf\Support\Network;
Expand Down
1 change: 1 addition & 0 deletions tests/OptionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\Support;

use ArrayObject;
Expand Down
1 change: 1 addition & 0 deletions tests/Reflection/ClassInvokerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\Support\Reflection;

use Hyperf\Support\Reflection\ClassInvoker;
Expand Down
1 change: 1 addition & 0 deletions tests/ResourceGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\Support;

use Hyperf\Support\ResourceGenerator;
Expand Down
1 change: 1 addition & 0 deletions tests/Stub/Bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\Support\Stub;

use HyperfTest\Support\Stub\Traits\BarTrait;
Expand Down
1 change: 1 addition & 0 deletions tests/Stub/Foo.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\Support\Stub;

use HyperfTest\Support\Stub\Traits\FooTrait;
Expand Down
1 change: 1 addition & 0 deletions tests/Stub/FooClosure.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\Support\Stub;

class FooClosure
Expand Down
1 change: 1 addition & 0 deletions tests/Stub/Traits/BarTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\Support\Stub\Traits;

trait BarTrait
Expand Down
1 change: 1 addition & 0 deletions tests/Stub/Traits/FooTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\Support\Stub\Traits;

trait FooTrait
Expand Down

0 comments on commit 3fb5c6c

Please sign in to comment.