Skip to content

Commit

Permalink
up: run cs fix for tcp, tcp-server
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Feb 10, 2020
1 parent 3a8d9e7 commit 5414416
Show file tree
Hide file tree
Showing 18 changed files with 148 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/AutoLoader.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/

namespace Swoft\Tcp;

Expand Down
8 changes: 8 additions & 0 deletions src/Contract/PackerInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/

namespace Swoft\Tcp\Contract;

Expand Down
8 changes: 8 additions & 0 deletions src/Contract/ResponseInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/

namespace Swoft\Tcp\Contract;

Expand Down
10 changes: 10 additions & 0 deletions src/ErrCode.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/

namespace Swoft\Tcp;

Expand All @@ -10,6 +18,8 @@
class ErrCode
{
public const SERVER_ERROR = -10401;

public const UNPACKING_FAIL = -10402;

public const ROUTE_NOT_FOUND = -10403;
}
9 changes: 8 additions & 1 deletion src/Exception/ProtocolException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/

namespace Swoft\Tcp\Exception;

Expand All @@ -11,5 +19,4 @@
*/
class ProtocolException extends RuntimeException
{

}
8 changes: 8 additions & 0 deletions src/Package.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/

namespace Swoft\Tcp;

Expand Down
8 changes: 8 additions & 0 deletions src/Packer/JsonPacker.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/

namespace Swoft\Tcp\Packer;

Expand Down
8 changes: 8 additions & 0 deletions src/Packer/PhpPacker.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/

namespace Swoft\Tcp\Packer;

Expand Down
8 changes: 8 additions & 0 deletions src/Packer/SimpleTokenPacker.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/

namespace Swoft\Tcp\Packer;

Expand Down
9 changes: 9 additions & 0 deletions src/Protocol.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/

namespace Swoft\Tcp;

Expand Down Expand Up @@ -26,6 +34,7 @@ class Protocol
{
// Split package type
public const EOF_SPLIT = 'EOF';

public const LEN_SPLIT = 'LEN';

/**
Expand Down
8 changes: 8 additions & 0 deletions src/Response.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/

namespace Swoft\Tcp;

Expand Down
8 changes: 8 additions & 0 deletions test/bean.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/

return [
];
8 changes: 8 additions & 0 deletions test/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/

use SwoftTest\Testing\TestApplication;

Expand Down
10 changes: 9 additions & 1 deletion test/config/base.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
<?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/
return [

];
8 changes: 8 additions & 0 deletions test/testing/AutoLoader.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/

namespace SwoftTest\Tcp\Testing;

Expand Down
8 changes: 8 additions & 0 deletions test/unit/PackageTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/

namespace SwoftTest\Tcp\Unit;

Expand Down
8 changes: 8 additions & 0 deletions test/unit/ProtocolTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/

namespace SwoftTest\Tcp\Unit;

Expand Down
8 changes: 8 additions & 0 deletions test/unit/ResponseTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/

namespace SwoftTest\Tcp\Unit;

Expand Down

0 comments on commit 5414416

Please sign in to comment.