| Conditions | 6 |
| Paths | 6 |
| Total Lines | 14 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | 1 | public static function getPointer(int $type = ISocket::SOCKET_STREAM, ?IRRTranslations $lang = null): ASocket |
|
| 18 | { |
||
| 19 | switch ($type) { |
||
| 20 | 1 | case ISocket::SOCKET_INTERNAL: |
|
| 21 | 1 | return new SharedInternal($lang); |
|
| 22 | 1 | case ISocket::SOCKET_STREAM: |
|
| 23 | 1 | return new Stream($lang); |
|
| 24 | 1 | case ISocket::SOCKET_PFSOCKET: |
|
| 25 | 1 | return new PfSocket($lang); |
|
| 26 | 1 | case ISocket::SOCKET_SOCKET: |
|
| 27 | 1 | return new Socket($lang); |
|
| 28 | 1 | case ISocket::SOCKET_FSOCKET: |
|
| 29 | default: |
||
| 30 | 1 | return new FSocket($lang); |
|
| 31 | } |
||
| 34 |