@@ -51,16 +51,16 @@ class PowerIdPDisco extends IdPDisco
5151 /**
5252 * The default sort weight for entries without 'discopower.weight'.
5353 *
54- * @var int|null
54+ * @var int
5555 */
56- private static ? int $ defaultWeight = 100 ;
56+ private static int $ defaultWeight = 100 ;
5757
5858 /**
5959 * Initializes this discovery service.
6060 *
6161 * The constructor does the parsing of the request. If this is an invalid request, it will throw an exception.
6262 *
63- * @param array $metadataSets Array with metadata sets we find remote entities in.
63+ * @param array<mixed> $metadataSets Array with metadata sets we find remote entities in.
6464 * @param string $instance The name of this instance of the discovery service.
6565 */
6666 public function __construct (array $ metadataSets , string $ instance )
@@ -102,8 +102,8 @@ protected function log(string $message): void
102102 * higher, and will always put IdP's with names configured before those with
103103 * only an entityID.
104104 *
105- * @param array $a The metadata of the first entity.
106- * @param array $b The metadata of the second entity.
105+ * @param array<mixed> $a The metadata of the first entity.
106+ * @param array<mixed> $b The metadata of the second entity.
107107 *
108108 * @return int How $a compares to $b.
109109 */
@@ -135,9 +135,9 @@ public static function mcmp(array $a, array $b): int
135135 /**
136136 * Structure the list of IdPs in a hierarchy based upon the tags.
137137 *
138- * @param array $list A list of IdPs.
138+ * @param array<mixed> $list A list of IdPs.
139139 *
140- * @return array The list of IdPs structured accordingly.
140+ * @return array<mixed> The list of IdPs structured accordingly.
141141 */
142142 protected function idplistStructured (array $ list ): array
143143 {
@@ -178,8 +178,8 @@ protected function idplistStructured(array $list): array
178178 /**
179179 * Do the actual filtering according the rules defined.
180180 *
181- * @param array $filter A set of rules regarding filtering.
182- * @param array $entry An entry to be evaluated by the filters.
181+ * @param array<mixed> $filter A set of rules regarding filtering.
182+ * @param array<mixed> $entry An entry to be evaluated by the filters.
183183 * @param boolean $default What to do in case the entity does not match any rules. Defaults to true.
184184 *
185185 * @return boolean True if the entity should be kept, false if it should be discarded according to the filters.
@@ -213,9 +213,9 @@ private function processFilter(array $filter, array $entry, bool $default = true
213213 * Filter a list of entities according to any filters defined in the parent class, plus discopower configuration
214214 * options regarding filtering.
215215 *
216- * @param array $list A list of entities to filter.
216+ * @param array<mixed> $list A list of entities to filter.
217217 *
218- * @return array The list in $list after filtering entities.
218+ * @return array<mixed> The list in $list after filtering entities.
219219 */
220220 protected function filterList (array $ list ): array
221221 {
@@ -358,8 +358,8 @@ public function handleRequest(): void
358358
359359 /**
360360 * @param \SimpleSAML\XHTML\Template $t
361- * @param array $metadata
362- * @return array
361+ * @param array<mixed> $metadata
362+ * @return array<mixed>
363363 */
364364 private function processMetadata (Template $ t , array $ metadata ): array
365365 {
@@ -389,7 +389,7 @@ private function processMetadata(Template $t, array $metadata): array
389389 /**
390390 * Get the IdP entities saved in the common domain cookie.
391391 *
392- * @return array List of IdP entities.
392+ * @return string[] List of IdP entities.
393393 */
394394 private function getCDC (): array
395395 {
@@ -401,10 +401,6 @@ private function getCDC(): array
401401 $ ret = explode (' ' , $ ret );
402402 foreach ($ ret as &$ idp ) {
403403 $ idp = base64_decode ($ idp );
404- if ($ idp === false ) {
405- // not properly base64 encoded
406- return [];
407- }
408404 }
409405
410406 return $ ret ;
0 commit comments