Skip to content

Commit

Permalink
Merge branch 'dev/logotype'
Browse files Browse the repository at this point in the history
Apply cs fixer
  • Loading branch information
Joni authored and Joni committed Feb 5, 2024
1 parent fc6bbe6 commit 745dda2
Show file tree
Hide file tree
Showing 248 changed files with 741 additions and 4,258 deletions.
16 changes: 0 additions & 16 deletions lib/X509/AttributeCertificate/AttCertIssuer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,11 @@ abstract class AttCertIssuer
{
/**
* Generate ASN.1 element.
*
* @return Element
*/
abstract public function toASN1(): Element;

/**
* Check whether AttCertIssuer identifies given certificate.
*
* @param Certificate $cert
*
* @return bool
*/
abstract public function identifiesPKC(Certificate $cert): bool;

Expand All @@ -42,10 +36,6 @@ abstract public function identifiesPKC(Certificate $cert): bool;
* type.
*
* @see https://tools.ietf.org/html/rfc5755#section-4.2.3
*
* @param Name $name
*
* @return self
*/
public static function fromName(Name $name): self
{
Expand All @@ -54,10 +44,6 @@ public static function fromName(Name $name): self

/**
* Initialize from an issuer's public key certificate.
*
* @param Certificate $cert
*
* @return self
*/
public static function fromPKC(Certificate $cert): self
{
Expand All @@ -70,8 +56,6 @@ public static function fromPKC(Certificate $cert): self
* @param UnspecifiedType $el CHOICE
*
* @throws \UnexpectedValueException
*
* @return self
*/
public static function fromASN1(UnspecifiedType $el): self
{
Expand Down
15 changes: 0 additions & 15 deletions lib/X509/AttributeCertificate/AttCertValidityPeriod.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ class AttCertValidityPeriod

/**
* Constructor.
*
* @param \DateTimeImmutable $nb
* @param \DateTimeImmutable $na
*/
public function __construct(\DateTimeImmutable $nb, \DateTimeImmutable $na)
{
Expand All @@ -45,10 +42,6 @@ public function __construct(\DateTimeImmutable $nb, \DateTimeImmutable $na)

/**
* Initialize from ASN.1.
*
* @param Sequence $seq
*
* @return self
*/
public static function fromASN1(Sequence $seq): self
{
Expand All @@ -63,8 +56,6 @@ public static function fromASN1(Sequence $seq): self
* @param null|string $nb_date Not before date
* @param null|string $na_date Not after date
* @param null|string $tz Timezone string
*
* @return self
*/
public static function fromStrings(?string $nb_date, ?string $na_date,
?string $tz = null): self
Expand All @@ -76,8 +67,6 @@ public static function fromStrings(?string $nb_date, ?string $na_date,

/**
* Get not before time.
*
* @return \DateTimeImmutable
*/
public function notBeforeTime(): \DateTimeImmutable
{
Expand All @@ -86,8 +75,6 @@ public function notBeforeTime(): \DateTimeImmutable

/**
* Get not after time.
*
* @return \DateTimeImmutable
*/
public function notAfterTime(): \DateTimeImmutable
{
Expand All @@ -96,8 +83,6 @@ public function notAfterTime(): \DateTimeImmutable

/**
* Generate ASN.1 structure.
*
* @return Sequence
*/
public function toASN1(): Sequence
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@
*/
class AccessIdentityAttributeValue extends SvceAuthInfo
{
const OID = '1.3.6.1.5.5.7.10.2';
public const OID = '1.3.6.1.5.5.7.10.2';

/**
* Constructor.
*
* @param GeneralName $service
* @param GeneralName $ident
*/
public function __construct(GeneralName $service, GeneralName $ident)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@
*/
class AuthenticationInfoAttributeValue extends SvceAuthInfo
{
const OID = '1.3.6.1.5.5.7.10.1';
public const OID = '1.3.6.1.5.5.7.10.1';

/**
* Constructor.
*
* @param GeneralName $service
* @param GeneralName $ident
* @param null|string $auth_info
*/
public function __construct(GeneralName $service, GeneralName $ident,
?string $auth_info = null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@
*/
class ChargingIdentityAttributeValue extends IetfAttrSyntax
{
const OID = '1.3.6.1.5.5.7.10.3';
public const OID = '1.3.6.1.5.5.7.10.3';

/**
* Constructor.
*
* @param IetfAttrValue ...$values
*/
public function __construct(IetfAttrValue ...$values)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@
*/
class GroupAttributeValue extends IetfAttrSyntax
{
const OID = '1.3.6.1.5.5.7.10.4';
public const OID = '1.3.6.1.5.5.7.10.4';

/**
* Constructor.
*
* @param IetfAttrValue ...$values
*/
public function __construct(IetfAttrValue ...$values)
{
Expand Down
33 changes: 0 additions & 33 deletions lib/X509/AttributeCertificate/Attribute/IetfAttrSyntax.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ abstract class IetfAttrSyntax extends AttributeValue implements \Countable, \Ite

/**
* Constructor.
*
* @param IetfAttrValue ...$values
*/
public function __construct(IetfAttrValue ...$values)
{
Expand All @@ -47,8 +45,6 @@ public function __construct(IetfAttrValue ...$values)
}

/**
* {@inheritdoc}
*
* @return self
*/
public static function fromASN1(UnspecifiedType $el): AttributeValue
Expand All @@ -73,10 +69,6 @@ function (UnspecifiedType $el) {

/**
* Get self with policy authority.
*
* @param GeneralNames $names
*
* @return self
*/
public function withPolicyAuthority(GeneralNames $names): self
{
Expand All @@ -87,8 +79,6 @@ public function withPolicyAuthority(GeneralNames $names): self

/**
* Check whether policy authority is present.
*
* @return bool
*/
public function hasPolicyAuthority(): bool
{
Expand All @@ -99,8 +89,6 @@ public function hasPolicyAuthority(): bool
* Get policy authority.
*
* @throws \LogicException If not set
*
* @return GeneralNames
*/
public function policyAuthority(): GeneralNames
{
Expand All @@ -124,8 +112,6 @@ public function values(): array
* Get first value.
*
* @throws \LogicException If not set
*
* @return IetfAttrValue
*/
public function first(): IetfAttrValue
{
Expand All @@ -135,9 +121,6 @@ public function first(): IetfAttrValue
return $this->_values[0];
}

/**
* {@inheritdoc}
*/
public function toASN1(): Element
{
$elements = [];
Expand All @@ -153,25 +136,16 @@ function (IetfAttrValue $val) {
return new Sequence(...$elements);
}

/**
* {@inheritdoc}
*/
public function stringValue(): string
{
return '#' . bin2hex($this->toASN1()->toDER());
}

/**
* {@inheritdoc}
*/
public function equalityMatchingRule(): MatchingRule
{
return new BinaryMatch();
}

/**
* {@inheritdoc}
*/
public function rfc2253String(): string
{
return $this->stringValue();
Expand All @@ -181,8 +155,6 @@ public function rfc2253String(): string
* Get number of values.
*
* @see \Countable::count()
*
* @return int
*/
public function count(): int
{
Expand All @@ -193,17 +165,12 @@ public function count(): int
* Get iterator for values.
*
* @see \IteratorAggregate::getIterator()
*
* @return \ArrayIterator
*/
public function getIterator(): \ArrayIterator
{
return new \ArrayIterator($this->_values);
}

/**
* {@inheritdoc}
*/
protected function _transcodedString(): string
{
return $this->stringValue();
Expand Down
Loading

0 comments on commit 745dda2

Please sign in to comment.