| 1 | <?php |
||
| 10 | final class CryptoConstant |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * This might be changed after https://github.com/php/php-src/pull/2518 |
||
| 14 | * |
||
| 15 | * @param string $phpVersion |
||
| 16 | * @return int |
||
| 17 | */ |
||
| 18 | 15 | public static function getDefaultMethod(string $phpVersion) |
|
| 22 | |||
| 23 | /** |
||
| 24 | * Considering that |
||
| 25 | * |
||
| 26 | * 1. starting from PHP 7.2.0 tls:// will negotiate best TLS version; |
||
| 27 | * 2. pre PHP 7.2.0 tls:// is TLS 1.0 only. |
||
| 28 | * |
||
| 29 | * The following decisions have been made. |
||
| 30 | * |
||
| 31 | * 1. This library uses TLS 1.2 by default for pre PHP 7.2.0. |
||
| 32 | * 2. Starting from PHP 7.2.0 this library uses the TLS negotiation by PHP, which |
||
| 33 | * means TLS 1.2 if available, otherwise falls back to a lower TLS version. |
||
| 34 | * |
||
| 35 | * Related: https://github.com/php/php-src/pull/2518 and https://wiki.php.net/rfc/improved-tls-constants |
||
| 36 | * |
||
| 37 | * @param string $phpVersion |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | 3 | public static function getDefaultProtocol(string $phpVersion) |
|
| 48 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.