Issues (21)

src/Asn1/Encoder.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Ocsp\Asn1;
4
5
use DateTimeImmutable;
6
7
/**
8
 * Interface that all ASN.1 encoders must implement.
9
 */
10
interface Encoder
11
{
12
    /**
13
     * Get the handle identifying the encoding.
14
     */
15
    public function getEncodingHandle();
16
17
    /**
18
     * Encode an element.
19
     *
20
     * @param \Ocsp\Asn1\Element $element
21
     *
22
     * @throws \Ocsp\Exception\Asn1EncodingException
23
     *
24
     * @return string
25
     */
26
    public function encodeElement(Element $element);
27
28
    /**
29
     * Encode the value of an INTEGER element.
30
     *
31
     * @param int|string|\phpseclib\Math\BigInteger|\phpseclib3\Math\BigInteger $value
0 ignored issues
show
The type phpseclib\Math\BigInteger was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
32
     *
33
     * @return string
34
     */
35
    public function encodeInteger($value);
36
37
    /**
38
     * Encode the value of an OBJECT IDENTIFIER element.
39
     *
40
     * @param string $value
41
     *
42
     * @return string
43
     */
44
    public function encodeIdentifier($value);
45
46
    /**
47
     * Encode the value of an OCTET STRING identifier.
48
     *
49
     * @param string $value
50
     *
51
     * @return string
52
     */
53
    public function encodeOctetString($value);
54
55
    /**
56
     * Encode the value of a PrintableString element.
57
     *
58
     * @param string $value
59
     *
60
     * @return string
61
     */
62
    public function encodePrintableString($value);
63
64
    /**
65
     * Encode the value of a BIT STRING element.
66
     *
67
     * @param string $bytes
68
     * @param int $unusedBitsInLastByte
69
     *
70
     * @return string
71
     */
72
    public function encodeBitString($bytes, $unusedBitsInLastByte);
73
74
    /**
75
     * Encode the value of a BIT STRING element.
76
     *
77
     * @param \DateTimeImmutable $value
78
     *
79
     * @return string
80
     */
81
    public function encodeGeneralizedTime(DateTimeImmutable $value);
82
}
83