CoreFiles by mySites.guru
GenericObject.php26 lines, 617 bytes, from Joomla_6.0.0-alpha3-Alpha-Full_Package.zip
Raw History Compare with 6.0.0-alpha2
md5
bdccfd4ef869ce7615126833f146cab5
sha1
3f01934707568680415914d16a461cc1e8b00d0f
sha256
2b7c3d59ac204663f4ffe4a376b5b8bf99ff8498817d1ac97dc6e1971283f20c
<?php

declare(strict_types=1);

namespace CBOR\OtherObject;

use CBOR\OtherObject as Base;
use InvalidArgumentException;
use function ord;

final class GenericObject extends Base
{
    public static function supportedAdditionalInformation(): array
    {
        return [];
    }

    public static function createFromLoadedData(int $additionalInformation, ?string $data): Base
    {
        if ($data !== null && ord($data) < 32) {
            throw new InvalidArgumentException('Invalid simple value. Content data should not be present.');
        }

        return new self($additionalInformation, $data);
    }
}

The same content is in 158 releases, Joomla 5.0.0-alpha1 to 6.3.0-alpha1. See them all, or every version of this file.