Skip to content

Commit

Permalink
refactor : wellknown implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
hschoenenberger committed Feb 12, 2024
1 parent 08937d9 commit 4dfd223
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/Provider/WellKnown.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,25 @@ class WellKnown
public $code_challenge_methods_supported;

/**
* @param array $infos
* @param array|string $infos Url or Properties
*
* @throws \Exception
*/
public function __construct(array $infos = [])
public function __construct($infos = [])
{
$this->init($infos);
if (is_array($infos)) {
$this->init($infos);
} else {
$this->fetch($infos);
}
}

/**
* @param array $infos
*
* @return void
*/
public function init(array $infos)
public function init($infos)
{
foreach ($infos as $key => $value) {
if (property_exists($this, $key)) {
Expand Down

0 comments on commit 4dfd223

Please sign in to comment.