Przeglądaj źródła

added missing access modifiers

Mark Magyar 2 lat temu
rodzic
commit
f7095db38c

+ 1 - 1
src/Connection/AsyncTcpConnection.php

@@ -55,7 +55,7 @@ class AsyncTcpConnection extends TcpConnection
      *
      * @var array<string,string>
      */
-    const BUILD_IN_TRANSPORTS = [
+    public const BUILD_IN_TRANSPORTS = [
         'tcp' => 'tcp',
         'udp' => 'udp',
         'unix' => 'unix',

+ 2 - 2
src/Connection/ConnectionInterface.php

@@ -33,14 +33,14 @@ abstract class ConnectionInterface
      *
      * @var int
      */
-    const CONNECT_FAIL = 1;
+    public const CONNECT_FAIL = 1;
 
     /**
      * Send failed.
      *
      * @var int
      */
-    const SEND_FAIL = 2;
+    public const SEND_FAIL = 2;
 
     /**
      * Statistics for status command.

+ 7 - 7
src/Connection/TcpConnection.php

@@ -63,42 +63,42 @@ class TcpConnection extends ConnectionInterface implements JsonSerializable
      *
      * @var int
      */
-    const READ_BUFFER_SIZE = 87380;
+    public const READ_BUFFER_SIZE = 87380;
 
     /**
      * Status initial.
      *
      * @var int
      */
-    const STATUS_INITIAL = 0;
+    public const STATUS_INITIAL = 0;
 
     /**
      * Status connecting.
      *
      * @var int
      */
-    const STATUS_CONNECTING = 1;
+    public const STATUS_CONNECTING = 1;
 
     /**
      * Status connection established.
      *
      * @var int
      */
-    const STATUS_ESTABLISHED = 2;
+    public const STATUS_ESTABLISHED = 2;
 
     /**
      * Status closing.
      *
      * @var int
      */
-    const STATUS_CLOSING = 4;
+    public const STATUS_CLOSING = 4;
 
     /**
      * Status closed.
      *
      * @var int
      */
-    const STATUS_CLOSED = 8;
+    public const STATUS_CLOSED = 8;
 
     /**
      * Emitted when socket connection is successfully established.
@@ -319,7 +319,7 @@ class TcpConnection extends ConnectionInterface implements JsonSerializable
      *
      * @var array
      */
-    const STATUS_TO_STRING = [
+    public const STATUS_TO_STRING = [
         self::STATUS_INITIAL => 'INITIAL',
         self::STATUS_CONNECTING => 'CONNECTING',
         self::STATUS_ESTABLISHED => 'ESTABLISHED',

+ 1 - 1
src/Connection/UdpConnection.php

@@ -38,7 +38,7 @@ class UdpConnection extends ConnectionInterface implements JsonSerializable
      *
      * @var int
      */
-    const MAX_UDP_PACKAGE_SIZE = 65535;
+    public const MAX_UDP_PACKAGE_SIZE = 65535;
 
     /**
      * Transport layer protocol.

+ 1 - 1
src/Protocols/Http/Response.php

@@ -92,7 +92,7 @@ class Response
      *
      * @link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
      */
-    const PHRASES = [
+    public const PHRASES = [
         100 => 'Continue',
         101 => 'Switching Protocols',
         102 => 'Processing', // WebDAV; RFC 2518

+ 2 - 2
src/Protocols/Websocket.php

@@ -48,14 +48,14 @@ class Websocket
      *
      * @var string
      */
-    const BINARY_TYPE_BLOB = "\x81";
+    public const BINARY_TYPE_BLOB = "\x81";
 
     /**
      * Websocket arraybuffer type.
      *
      * @var string
      */
-    const BINARY_TYPE_ARRAYBUFFER = "\x82";
+    public const BINARY_TYPE_ARRAYBUFFER = "\x82";
 
     /**
      * Check the integrity of the package.

+ 2 - 2
src/Protocols/Ws.php

@@ -49,14 +49,14 @@ class Ws
      *
      * @var string
      */
-    const BINARY_TYPE_BLOB = "\x81";
+    public const BINARY_TYPE_BLOB = "\x81";
 
     /**
      * Websocket arraybuffer type.
      *
      * @var string
      */
-    const BINARY_TYPE_ARRAYBUFFER = "\x82";
+    public const BINARY_TYPE_ARRAYBUFFER = "\x82";
 
     /**
      * Check the integrity of the package.