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 9621493 commit 2d45d40
Show file tree
Hide file tree
Showing 19 changed files with 25 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/AbstractProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Process;

use Hyperf\Contract\ProcessInterface;
Expand All @@ -28,6 +29,7 @@
use Hyperf\Process\Exception\SocketAcceptException;
use Psr\Container\ContainerInterface;
use Psr\EventDispatcher\EventDispatcherInterface;
use Swoole\Coroutine\Socket;
use Swoole\Event;
use Swoole\Process as SwooleProcess;
use Swoole\Server;
Expand Down Expand Up @@ -156,7 +158,7 @@ protected function listen(Channel $quit)
Coroutine::create(function () use ($quit) {
while ($quit->pop(0.001) !== true) {
try {
/** @var \Swoole\Coroutine\Socket $sock */
/** @var Socket $sock */
$sock = $this->process->exportSocket();
$recv = $sock->recv($this->recvLength, $this->recvTimeout);
if ($recv === '') {
Expand Down
1 change: 1 addition & 0 deletions src/Annotation/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Process\Annotation;

use Attribute;
Expand Down
1 change: 1 addition & 0 deletions src/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Process;

use Hyperf\Process\Listener\BootProcessListener;
Expand Down
1 change: 1 addition & 0 deletions src/Event/AfterCoroutineHandle.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Process\Event;

use Hyperf\Process\AbstractProcess;
Expand Down
1 change: 1 addition & 0 deletions src/Event/AfterProcessHandle.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Process\Event;

use Hyperf\Process\AbstractProcess;
Expand Down
1 change: 1 addition & 0 deletions src/Event/BeforeCoroutineHandle.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Process\Event;

use Hyperf\Process\AbstractProcess;
Expand Down
1 change: 1 addition & 0 deletions src/Event/BeforeProcessHandle.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Process\Event;

use Hyperf\Process\AbstractProcess;
Expand Down
1 change: 1 addition & 0 deletions src/Event/PipeMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Process\Event;

class PipeMessage
Expand Down
1 change: 1 addition & 0 deletions src/Exception/ServerInvalidException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Process\Exception;

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

namespace Hyperf\Process\Exception;

use RuntimeException;
Expand Down
1 change: 1 addition & 0 deletions src/Handler/ProcessStopHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Process\Handler;

use Hyperf\Process\ProcessManager;
Expand Down
1 change: 1 addition & 0 deletions src/Listener/BootProcessListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Process\Listener;

use Hyperf\Contract\ConfigInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Listener/LogAfterProcessStoppedListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Process\Listener;

use Hyperf\Contract\StdoutLoggerInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Listener/LogBeforeProcessStartListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Process\Listener;

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

namespace Hyperf\Process;

use Swoole\Process;
Expand Down
1 change: 1 addition & 0 deletions src/ProcessManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Process;

use Hyperf\Contract\ProcessInterface;
Expand Down
1 change: 1 addition & 0 deletions tests/BootProcessListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\Process;

use Hyperf\Contract\ConfigInterface;
Expand Down
7 changes: 5 additions & 2 deletions tests/ProcessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\Process;

use Hyperf\Context\ApplicationContext;
Expand All @@ -17,10 +18,12 @@
use HyperfTest\Process\Stub\FooProcess;
use Mockery;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use Psr\EventDispatcher\EventDispatcherInterface;
use ReflectionClass;
use Swoole\Server;

/**
* @internal
Expand All @@ -41,7 +44,7 @@ protected function tearDown(): void
self::$dispatched = [];
}

#[\PHPUnit\Framework\Attributes\Group('NonCoroutine')]
#[Group('NonCoroutine')]
public function testEventWhenThrowExceptionInProcess()
{
$container = $this->getContainer();
Expand Down Expand Up @@ -71,7 +74,7 @@ protected function getContainer()

protected function getServer()
{
$server = Mockery::mock(\Swoole\Server::class);
$server = Mockery::mock(Server::class);
$server->shouldReceive('addProcess')->withAnyArgs()->andReturnUsing(function ($process) {
$ref = new ReflectionClass($process);
$property = $ref->getProperty('callback');
Expand Down
1 change: 1 addition & 0 deletions tests/Stub/FooProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\Process\Stub;

use Hyperf\Process\AbstractProcess;
Expand Down

0 comments on commit 2d45d40

Please sign in to comment.