Completed
Push — master ( e1389e...1f6470 )
by Frederik
02:10
created

CryptoConstant::getAdvisedType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Genkgo\Mail\Protocol;
5
6
/**
7
 * Class CryptoConstant
8
 * @package Genkgo\Mail\Protocol
9
 */
10
final class CryptoConstant
11
{
12
13
    /**
14
     * @return int
15
     */
16 13
    public static function getAdvisedType()
17
    {
18 13
        return STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
19
    }
20
21
    /**
22
     * This might be changed after https://github.com/php/php-src/pull/2518
23
     * @return int
24
     */
25
    public static function getSupportType()
26
    {
27
        return STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
28
    }
29
30
    /**
31
     * @return string
32
     */
33 1
    public static function getAdvisedProtocol()
34
    {
35 1
        return 'tlsv1.2://';
36
    }
37
38
    /**
39
     * @return string
40
     */
41 1
    public static function getSupportProtocol()
42
    {
43 1
        return 'tls://';
44
    }
45
}