GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — php72 ( a14e51...94fc0a )
by Joni
02:27
created
lib/X509/GeneralName/IPv6Address.php 1 patch
Switch Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -20,15 +20,15 @@
 block discarded – undo
20 20
         $mask = null;
21 21
         $words = unpack('n*', $octets);
22 22
         switch (count($words)) {
23
-            case 8:
24
-                $ip = self::_wordsToIPv6String($words);
25
-                break;
26
-            case 16:
27
-                $ip = self::_wordsToIPv6String(array_slice($words, 0, 8));
28
-                $mask = self::_wordsToIPv6String(array_slice($words, 8, 8));
29
-                break;
30
-            default:
31
-                throw new \UnexpectedValueException('Invalid IPv6 octet length.');
23
+        case 8:
24
+            $ip = self::_wordsToIPv6String($words);
25
+            break;
26
+        case 16:
27
+            $ip = self::_wordsToIPv6String(array_slice($words, 0, 8));
28
+            $mask = self::_wordsToIPv6String(array_slice($words, 8, 8));
29
+            break;
30
+        default:
31
+            throw new \UnexpectedValueException('Invalid IPv6 octet length.');
32 32
         }
33 33
         return new self($ip, $mask);
34 34
     }
Please login to merge, or discard this patch.
lib/X509/GeneralName/IPAddress.php 1 patch
Switch Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -55,15 +55,15 @@
 block discarded – undo
55 55
     {
56 56
         $octets = $el->asOctetString()->string();
57 57
         switch (strlen($octets)) {
58
-            case 4:
59
-            case 8:
60
-                return IPv4Address::fromOctets($octets);
61
-            case 16:
62
-            case 32:
63
-                return IPv6Address::fromOctets($octets);
64
-            default:
65
-                throw new \UnexpectedValueException(
66
-                    'Invalid octet length for IP address.');
58
+        case 4:
59
+        case 8:
60
+            return IPv4Address::fromOctets($octets);
61
+        case 16:
62
+        case 32:
63
+            return IPv6Address::fromOctets($octets);
64
+        default:
65
+            throw new \UnexpectedValueException(
66
+                'Invalid octet length for IP address.');
67 67
         }
68 68
     }
69 69
 
Please login to merge, or discard this patch.
lib/X509/GeneralName/IPv4Address.php 1 patch
Switch Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -20,15 +20,15 @@
 block discarded – undo
20 20
         $mask = null;
21 21
         $bytes = unpack('C*', $octets);
22 22
         switch (count($bytes)) {
23
-            case 4:
24
-                $ip = implode('.', $bytes);
25
-                break;
26
-            case 8:
27
-                $ip = implode('.', array_slice($bytes, 0, 4));
28
-                $mask = implode('.', array_slice($bytes, 4, 4));
29
-                break;
30
-            default:
31
-                throw new \UnexpectedValueException('Invalid IPv4 octet length.');
23
+        case 4:
24
+            $ip = implode('.', $bytes);
25
+            break;
26
+        case 8:
27
+            $ip = implode('.', array_slice($bytes, 0, 4));
28
+            $mask = implode('.', array_slice($bytes, 4, 4));
29
+            break;
30
+        default:
31
+            throw new \UnexpectedValueException('Invalid IPv4 octet length.');
32 32
         }
33 33
         return new self($ip, $mask);
34 34
     }
Please login to merge, or discard this patch.
lib/X509/GeneralName/GeneralName.php 1 patch
Switch Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -76,43 +76,43 @@
 block discarded – undo
76 76
     {
77 77
         switch ($el->tag()) {
78 78
             // otherName
79
-            case self::TAG_OTHER_NAME:
80
-                return OtherName::fromChosenASN1(
81
-                    $el->asImplicit(Element::TYPE_SEQUENCE));
82
-            // rfc822Name
83
-            case self::TAG_RFC822_NAME:
84
-                return RFC822Name::fromChosenASN1(
85
-                    $el->asImplicit(Element::TYPE_IA5_STRING));
86
-            // dNSName
87
-            case self::TAG_DNS_NAME:
88
-                return DNSName::fromChosenASN1(
89
-                    $el->asImplicit(Element::TYPE_IA5_STRING));
90
-            // x400Address
91
-            case self::TAG_X400_ADDRESS:
92
-                return X400Address::fromChosenASN1(
93
-                    $el->asImplicit(Element::TYPE_SEQUENCE));
94
-            // directoryName
95
-            case self::TAG_DIRECTORY_NAME:
96
-                // because Name is a CHOICE, albeit having only one option,
97
-                // explicit tagging must be used
98
-                // (see X.680 07/2002 30.6.c)
99
-                return DirectoryName::fromChosenASN1($el->asExplicit());
100
-            // ediPartyName
101
-            case self::TAG_EDI_PARTY_NAME:
102
-                return EDIPartyName::fromChosenASN1(
103
-                    $el->asImplicit(Element::TYPE_SEQUENCE));
104
-            // uniformResourceIdentifier
105
-            case self::TAG_URI:
106
-                return UniformResourceIdentifier::fromChosenASN1(
107
-                    $el->asImplicit(Element::TYPE_IA5_STRING));
108
-            // iPAddress
109
-            case self::TAG_IP_ADDRESS:
110
-                return IPAddress::fromChosenASN1(
111
-                    $el->asImplicit(Element::TYPE_OCTET_STRING));
112
-            // registeredID
113
-            case self::TAG_REGISTERED_ID:
114
-                return RegisteredID::fromChosenASN1(
115
-                    $el->asImplicit(Element::TYPE_OBJECT_IDENTIFIER));
79
+        case self::TAG_OTHER_NAME:
80
+            return OtherName::fromChosenASN1(
81
+                $el->asImplicit(Element::TYPE_SEQUENCE));
82
+        // rfc822Name
83
+        case self::TAG_RFC822_NAME:
84
+            return RFC822Name::fromChosenASN1(
85
+                $el->asImplicit(Element::TYPE_IA5_STRING));
86
+        // dNSName
87
+        case self::TAG_DNS_NAME:
88
+            return DNSName::fromChosenASN1(
89
+                $el->asImplicit(Element::TYPE_IA5_STRING));
90
+        // x400Address
91
+        case self::TAG_X400_ADDRESS:
92
+            return X400Address::fromChosenASN1(
93
+                $el->asImplicit(Element::TYPE_SEQUENCE));
94
+        // directoryName
95
+        case self::TAG_DIRECTORY_NAME:
96
+            // because Name is a CHOICE, albeit having only one option,
97
+            // explicit tagging must be used
98
+            // (see X.680 07/2002 30.6.c)
99
+            return DirectoryName::fromChosenASN1($el->asExplicit());
100
+        // ediPartyName
101
+        case self::TAG_EDI_PARTY_NAME:
102
+            return EDIPartyName::fromChosenASN1(
103
+                $el->asImplicit(Element::TYPE_SEQUENCE));
104
+        // uniformResourceIdentifier
105
+        case self::TAG_URI:
106
+            return UniformResourceIdentifier::fromChosenASN1(
107
+                $el->asImplicit(Element::TYPE_IA5_STRING));
108
+        // iPAddress
109
+        case self::TAG_IP_ADDRESS:
110
+            return IPAddress::fromChosenASN1(
111
+                $el->asImplicit(Element::TYPE_OCTET_STRING));
112
+        // registeredID
113
+        case self::TAG_REGISTERED_ID:
114
+            return RegisteredID::fromChosenASN1(
115
+                $el->asImplicit(Element::TYPE_OBJECT_IDENTIFIER));
116 116
         }
117 117
         throw new \UnexpectedValueException(
118 118
             'GeneralName type ' . $el->tag() . ' not supported.');
Please login to merge, or discard this patch.
lib/X509/Certificate/Extension/DistributionPoint/DistributionPointName.php 1 patch
Switch Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -40,16 +40,16 @@
 block discarded – undo
40 40
     public static function fromTaggedType(TaggedType $el): self
41 41
     {
42 42
         switch ($el->tag()) {
43
-            case self::TAG_FULL_NAME:
44
-                return new FullName(
45
-                    GeneralNames::fromASN1(
46
-                        $el->asImplicit(Element::TYPE_SEQUENCE)->asSequence()));
47
-            case self::TAG_RDN:
48
-                return new RelativeName(
49
-                    RDN::fromASN1($el->asImplicit(Element::TYPE_SET)->asSet()));
50
-            default:
51
-                throw new \UnexpectedValueException(
52
-                    'DistributionPointName tag ' . $el->tag() . ' not supported.');
43
+        case self::TAG_FULL_NAME:
44
+            return new FullName(
45
+                GeneralNames::fromASN1(
46
+                    $el->asImplicit(Element::TYPE_SEQUENCE)->asSequence()));
47
+        case self::TAG_RDN:
48
+            return new RelativeName(
49
+                RDN::fromASN1($el->asImplicit(Element::TYPE_SET)->asSet()));
50
+        default:
51
+            throw new \UnexpectedValueException(
52
+                'DistributionPointName tag ' . $el->tag() . ' not supported.');
53 53
         }
54 54
     }
55 55
 
Please login to merge, or discard this patch.
lib/X509/Certificate/Extension/CertificatePolicy/PolicyQualifierInfo.php 1 patch
Switch Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,10 +64,10 @@
 block discarded – undo
64 64
     {
65 65
         $oid = $seq->at(0)->asObjectIdentifier()->oid();
66 66
         switch ($oid) {
67
-            case self::OID_CPS:
68
-                return CPSQualifier::fromQualifierASN1($seq->at(1));
69
-            case self::OID_UNOTICE:
70
-                return UserNoticeQualifier::fromQualifierASN1($seq->at(1));
67
+        case self::OID_CPS:
68
+            return CPSQualifier::fromQualifierASN1($seq->at(1));
69
+        case self::OID_UNOTICE:
70
+            return UserNoticeQualifier::fromQualifierASN1($seq->at(1));
71 71
         }
72 72
         throw new \UnexpectedValueException("Qualifier {$oid} not supported.");
73 73
     }
Please login to merge, or discard this patch.
lib/X509/Certificate/Extension/CertificatePolicy/DisplayText.php 1 patch
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -97,17 +97,17 @@
 block discarded – undo
97 97
     public function toASN1(): StringType
98 98
     {
99 99
         switch ($this->_tag) {
100
-            case Element::TYPE_IA5_STRING:
101
-                return new IA5String($this->_text);
102
-            case Element::TYPE_VISIBLE_STRING:
103
-                return new VisibleString($this->_text);
104
-            case Element::TYPE_BMP_STRING:
105
-                return new BMPString($this->_text);
106
-            case Element::TYPE_UTF8_STRING:
107
-                return new UTF8String($this->_text);
108
-            default:
109
-                throw new \UnexpectedValueException(
110
-                    'Type ' . Element::tagToName($this->_tag) . ' not supported.');
100
+        case Element::TYPE_IA5_STRING:
101
+            return new IA5String($this->_text);
102
+        case Element::TYPE_VISIBLE_STRING:
103
+            return new VisibleString($this->_text);
104
+        case Element::TYPE_BMP_STRING:
105
+            return new BMPString($this->_text);
106
+        case Element::TYPE_UTF8_STRING:
107
+            return new UTF8String($this->_text);
108
+        default:
109
+            throw new \UnexpectedValueException(
110
+                'Type ' . Element::tagToName($this->_tag) . ' not supported.');
111 111
         }
112 112
     }
113 113
 }
Please login to merge, or discard this patch.
lib/X509/Certificate/Extension/Target/Target.php 1 patch
Switch Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -64,12 +64,12 @@
 block discarded – undo
64 64
     public static function fromASN1(TaggedType $el): self
65 65
     {
66 66
         switch ($el->tag()) {
67
-            case self::TYPE_NAME:
68
-                return TargetName::fromChosenASN1($el->asExplicit()->asTagged());
69
-            case self::TYPE_GROUP:
70
-                return TargetGroup::fromChosenASN1($el->asExplicit()->asTagged());
71
-            case self::TYPE_CERT:
72
-                throw new \RuntimeException('targetCert not supported.');
67
+        case self::TYPE_NAME:
68
+            return TargetName::fromChosenASN1($el->asExplicit()->asTagged());
69
+        case self::TYPE_GROUP:
70
+            return TargetGroup::fromChosenASN1($el->asExplicit()->asTagged());
71
+        case self::TYPE_CERT:
72
+            throw new \RuntimeException('targetCert not supported.');
73 73
         }
74 74
         throw new \UnexpectedValueException(
75 75
             'Target type ' . $el->tag() . ' not supported.');
Please login to merge, or discard this patch.
lib/X509/Certificate/Time.php 1 patch
Switch Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -92,16 +92,16 @@
 block discarded – undo
92 92
     {
93 93
         $dt = $this->_dt;
94 94
         switch ($this->_type) {
95
-            case Element::TYPE_UTC_TIME:
96
-                return new UTCTime($dt);
97
-            case Element::TYPE_GENERALIZED_TIME:
98
-                // GeneralizedTime must not contain fractional seconds
99
-                // (rfc5280 4.1.2.5.2)
100
-                if (0 != $dt->format('u')) {
101
-                    // remove fractional seconds (round down)
102
-                    $dt = self::_roundDownFractionalSeconds($dt);
103
-                }
104
-                return new GeneralizedTime($dt);
95
+        case Element::TYPE_UTC_TIME:
96
+            return new UTCTime($dt);
97
+        case Element::TYPE_GENERALIZED_TIME:
98
+            // GeneralizedTime must not contain fractional seconds
99
+            // (rfc5280 4.1.2.5.2)
100
+            if (0 != $dt->format('u')) {
101
+                // remove fractional seconds (round down)
102
+                $dt = self::_roundDownFractionalSeconds($dt);
103
+            }
104
+            return new GeneralizedTime($dt);
105 105
         }
106 106
         throw new \UnexpectedValueException(
107 107
             'Time type ' . Element::tagToName($this->_type) . ' not supported.');
Please login to merge, or discard this patch.