Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ php:
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
- "8.4"
before_script:
- "composer install"
- "composer require php-coveralls/php-coveralls"
Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"require-dev": {
"phpunit/phpunit": "^8.1"
},
"conflict": {
"php": "8.2.26 || 8.3.14 || 8.4.1"
},
"autoload": {
"psr-4": {
"Sop\\ASN1\\": "lib/ASN1/"
Expand Down
2 changes: 1 addition & 1 deletion lib/ASN1/Component/Identifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function __construct(int $class, int $pc, $tag)
*
* @return self
*/
public static function fromDER(string $data, int &$offset = null): Identifier
public static function fromDER(string $data, ?int &$offset = null): Identifier
{
$idx = $offset ?? 0;
$datalen = strlen($data);
Expand Down
4 changes: 2 additions & 2 deletions lib/ASN1/Component/Length.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function __construct($length, bool $indefinite = false)
*
* @throws DecodeException If decoding fails
*/
public static function fromDER(string $data, int &$offset = null): self
public static function fromDER(string $data, ?int &$offset = null): self
{
$idx = $offset ?? 0;
$datalen = strlen($data);
Expand Down Expand Up @@ -98,7 +98,7 @@ public static function fromDER(string $data, int &$offset = null): self
* @throws DecodeException If decoding or expectation fails
*/
public static function expectFromDER(string $data, int &$offset,
int $expected = null): self
?int $expected = null): self
{
$idx = $offset;
$length = self::fromDER($data, $idx);
Expand Down
2 changes: 1 addition & 1 deletion lib/ASN1/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ abstract public function isConstructed(): bool;
* @throws \UnexpectedValueException If called in the context of an expected
* type, but decoding yields another type
*/
public static function fromDER(string $data, int &$offset = null): ElementBase
public static function fromDER(string $data, ?int &$offset = null): ElementBase
{
$idx = $offset ?? 0;
// decode identifier
Expand Down