@@ -7,14 +7,14 @@ |
||
7 | 7 | */ |
8 | 8 | class Enumerated extends Integer |
9 | 9 | { |
10 | - /** |
|
11 | - * Constructor. |
|
12 | - * |
|
13 | - * @param int|string $number |
|
14 | - */ |
|
15 | - public function __construct($number) |
|
16 | - { |
|
17 | - parent::__construct($number); |
|
18 | - $this->_typeTag = self::TYPE_ENUMERATED; |
|
19 | - } |
|
10 | + /** |
|
11 | + * Constructor. |
|
12 | + * |
|
13 | + * @param int|string $number |
|
14 | + */ |
|
15 | + public function __construct($number) |
|
16 | + { |
|
17 | + parent::__construct($number); |
|
18 | + $this->_typeTag = self::TYPE_ENUMERATED; |
|
19 | + } |
|
20 | 20 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace ASN1\Type\Primitive; |
6 | 6 |
@@ -9,10 +9,10 @@ |
||
9 | 9 | */ |
10 | 10 | interface Encodable |
11 | 11 | { |
12 | - /** |
|
13 | - * Encode object to DER. |
|
14 | - * |
|
15 | - * @return string |
|
16 | - */ |
|
17 | - public function toDER(): string; |
|
12 | + /** |
|
13 | + * Encode object to DER. |
|
14 | + * |
|
15 | + * @return string |
|
16 | + */ |
|
17 | + public function toDER(): string; |
|
18 | 18 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace ASN1\Feature; |
6 | 6 |
@@ -11,13 +11,13 @@ |
||
11 | 11 | */ |
12 | 12 | trait UniversalClass |
13 | 13 | { |
14 | - /** |
|
15 | - * |
|
16 | - * @see \ASN1\Element::typeClass() |
|
17 | - * @return int |
|
18 | - */ |
|
19 | - public function typeClass(): int |
|
20 | - { |
|
21 | - return Identifier::CLASS_UNIVERSAL; |
|
22 | - } |
|
14 | + /** |
|
15 | + * |
|
16 | + * @see \ASN1\Element::typeClass() |
|
17 | + * @return int |
|
18 | + */ |
|
19 | + public function typeClass(): int |
|
20 | + { |
|
21 | + return Identifier::CLASS_UNIVERSAL; |
|
22 | + } |
|
23 | 23 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace ASN1\Type; |
6 | 6 |
@@ -12,26 +12,26 @@ |
||
12 | 12 | */ |
13 | 13 | class GeneralString extends PrimitiveString |
14 | 14 | { |
15 | - use UniversalClass; |
|
15 | + use UniversalClass; |
|
16 | 16 | |
17 | - /** |
|
18 | - * Constructor. |
|
19 | - * |
|
20 | - * @param string $string |
|
21 | - */ |
|
22 | - public function __construct(string $string) |
|
23 | - { |
|
24 | - $this->_typeTag = self::TYPE_GENERAL_STRING; |
|
25 | - parent::__construct($string); |
|
26 | - } |
|
17 | + /** |
|
18 | + * Constructor. |
|
19 | + * |
|
20 | + * @param string $string |
|
21 | + */ |
|
22 | + public function __construct(string $string) |
|
23 | + { |
|
24 | + $this->_typeTag = self::TYPE_GENERAL_STRING; |
|
25 | + parent::__construct($string); |
|
26 | + } |
|
27 | 27 | |
28 | - /** |
|
29 | - * |
|
30 | - * {@inheritdoc} |
|
31 | - */ |
|
32 | - protected function _validateString(string $string): bool |
|
33 | - { |
|
34 | - // allow everything |
|
35 | - return true; |
|
36 | - } |
|
28 | + /** |
|
29 | + * |
|
30 | + * {@inheritdoc} |
|
31 | + */ |
|
32 | + protected function _validateString(string $string): bool |
|
33 | + { |
|
34 | + // allow everything |
|
35 | + return true; |
|
36 | + } |
|
37 | 37 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace ASN1\Type\Primitive; |
6 | 6 |
@@ -12,16 +12,16 @@ |
||
12 | 12 | */ |
13 | 13 | class OctetString extends PrimitiveString |
14 | 14 | { |
15 | - use UniversalClass; |
|
15 | + use UniversalClass; |
|
16 | 16 | |
17 | - /** |
|
18 | - * Constructor. |
|
19 | - * |
|
20 | - * @param string $string |
|
21 | - */ |
|
22 | - public function __construct(string $string) |
|
23 | - { |
|
24 | - $this->_typeTag = self::TYPE_OCTET_STRING; |
|
25 | - parent::__construct($string); |
|
26 | - } |
|
17 | + /** |
|
18 | + * Constructor. |
|
19 | + * |
|
20 | + * @param string $string |
|
21 | + */ |
|
22 | + public function __construct(string $string) |
|
23 | + { |
|
24 | + $this->_typeTag = self::TYPE_OCTET_STRING; |
|
25 | + parent::__construct($string); |
|
26 | + } |
|
27 | 27 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace ASN1\Type\Primitive; |
6 | 6 |
@@ -12,26 +12,26 @@ |
||
12 | 12 | */ |
13 | 13 | class PrintableString extends PrimitiveString |
14 | 14 | { |
15 | - use UniversalClass; |
|
15 | + use UniversalClass; |
|
16 | 16 | |
17 | - /** |
|
18 | - * Constructor. |
|
19 | - * |
|
20 | - * @param string $string |
|
21 | - */ |
|
22 | - public function __construct(string $string) |
|
23 | - { |
|
24 | - $this->_typeTag = self::TYPE_PRINTABLE_STRING; |
|
25 | - parent::__construct($string); |
|
26 | - } |
|
17 | + /** |
|
18 | + * Constructor. |
|
19 | + * |
|
20 | + * @param string $string |
|
21 | + */ |
|
22 | + public function __construct(string $string) |
|
23 | + { |
|
24 | + $this->_typeTag = self::TYPE_PRINTABLE_STRING; |
|
25 | + parent::__construct($string); |
|
26 | + } |
|
27 | 27 | |
28 | - /** |
|
29 | - * |
|
30 | - * {@inheritdoc} |
|
31 | - */ |
|
32 | - protected function _validateString(string $string): bool |
|
33 | - { |
|
34 | - $chars = preg_quote(" '()+,-./:=?]", "/"); |
|
35 | - return preg_match('/[^A-Za-z0-9' . $chars . ']/', $string) == 0; |
|
36 | - } |
|
28 | + /** |
|
29 | + * |
|
30 | + * {@inheritdoc} |
|
31 | + */ |
|
32 | + protected function _validateString(string $string): bool |
|
33 | + { |
|
34 | + $chars = preg_quote(" '()+,-./:=?]", "/"); |
|
35 | + return preg_match('/[^A-Za-z0-9' . $chars . ']/', $string) == 0; |
|
36 | + } |
|
37 | 37 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace ASN1\Type\Primitive; |
6 | 6 |
@@ -12,26 +12,26 @@ |
||
12 | 12 | */ |
13 | 13 | class VideotexString extends PrimitiveString |
14 | 14 | { |
15 | - use UniversalClass; |
|
15 | + use UniversalClass; |
|
16 | 16 | |
17 | - /** |
|
18 | - * Constructor. |
|
19 | - * |
|
20 | - * @param string $string |
|
21 | - */ |
|
22 | - public function __construct(string $string) |
|
23 | - { |
|
24 | - $this->_typeTag = self::TYPE_VIDEOTEX_STRING; |
|
25 | - parent::__construct($string); |
|
26 | - } |
|
17 | + /** |
|
18 | + * Constructor. |
|
19 | + * |
|
20 | + * @param string $string |
|
21 | + */ |
|
22 | + public function __construct(string $string) |
|
23 | + { |
|
24 | + $this->_typeTag = self::TYPE_VIDEOTEX_STRING; |
|
25 | + parent::__construct($string); |
|
26 | + } |
|
27 | 27 | |
28 | - /** |
|
29 | - * |
|
30 | - * {@inheritdoc} |
|
31 | - */ |
|
32 | - protected function _validateString(string $string): bool |
|
33 | - { |
|
34 | - // allow everything |
|
35 | - return true; |
|
36 | - } |
|
28 | + /** |
|
29 | + * |
|
30 | + * {@inheritdoc} |
|
31 | + */ |
|
32 | + protected function _validateString(string $string): bool |
|
33 | + { |
|
34 | + // allow everything |
|
35 | + return true; |
|
36 | + } |
|
37 | 37 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace ASN1\Type\Primitive; |
6 | 6 |
@@ -9,16 +9,16 @@ |
||
9 | 9 | |
10 | 10 | class CharacterString extends PrimitiveString |
11 | 11 | { |
12 | - use UniversalClass; |
|
12 | + use UniversalClass; |
|
13 | 13 | |
14 | - /** |
|
15 | - * Constructor. |
|
16 | - * |
|
17 | - * @param string $string |
|
18 | - */ |
|
19 | - public function __construct(string $string) |
|
20 | - { |
|
21 | - $this->_typeTag = self::TYPE_CHARACTER_STRING; |
|
22 | - parent::__construct($string); |
|
23 | - } |
|
14 | + /** |
|
15 | + * Constructor. |
|
16 | + * |
|
17 | + * @param string $string |
|
18 | + */ |
|
19 | + public function __construct(string $string) |
|
20 | + { |
|
21 | + $this->_typeTag = self::TYPE_CHARACTER_STRING; |
|
22 | + parent::__construct($string); |
|
23 | + } |
|
24 | 24 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace ASN1\Type\Primitive; |
6 | 6 |
@@ -12,26 +12,26 @@ |
||
12 | 12 | */ |
13 | 13 | class GraphicString extends PrimitiveString |
14 | 14 | { |
15 | - use UniversalClass; |
|
15 | + use UniversalClass; |
|
16 | 16 | |
17 | - /** |
|
18 | - * Constructor. |
|
19 | - * |
|
20 | - * @param string $string |
|
21 | - */ |
|
22 | - public function __construct(string $string) |
|
23 | - { |
|
24 | - $this->_typeTag = self::TYPE_GRAPHIC_STRING; |
|
25 | - parent::__construct($string); |
|
26 | - } |
|
17 | + /** |
|
18 | + * Constructor. |
|
19 | + * |
|
20 | + * @param string $string |
|
21 | + */ |
|
22 | + public function __construct(string $string) |
|
23 | + { |
|
24 | + $this->_typeTag = self::TYPE_GRAPHIC_STRING; |
|
25 | + parent::__construct($string); |
|
26 | + } |
|
27 | 27 | |
28 | - /** |
|
29 | - * |
|
30 | - * {@inheritdoc} |
|
31 | - */ |
|
32 | - protected function _validateString(string $string): bool |
|
33 | - { |
|
34 | - // allow everything |
|
35 | - return true; |
|
36 | - } |
|
28 | + /** |
|
29 | + * |
|
30 | + * {@inheritdoc} |
|
31 | + */ |
|
32 | + protected function _validateString(string $string): bool |
|
33 | + { |
|
34 | + // allow everything |
|
35 | + return true; |
|
36 | + } |
|
37 | 37 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace ASN1\Type\Primitive; |
6 | 6 |