Skip to content

Commit

Permalink
Fixed the config setter.
Browse files Browse the repository at this point in the history
  • Loading branch information
feuzeu committed Jan 13, 2025
1 parent eb4f8c0 commit 2e1e62e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
3 changes: 2 additions & 1 deletion src/Plugin/Manager/PackageManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ private function registerCallables(array $aOptions, string $sCallableType)
{
// Register a function without options
$this->xPluginManager->registerCallable($sCallableType, $xValue);
continue;
}
elseif(is_string($xKey) && (is_array($xValue) || is_string($xValue)))
if(is_string($xKey) && (is_array($xValue) || is_string($xValue)))
{
// Register a function with options
$this->xPluginManager->registerCallable($sCallableType, $xKey, $xValue);
Expand Down
12 changes: 0 additions & 12 deletions tests/TestMisc/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,6 @@ public function testSimpleArrayValues()
$this->assertEmpty(jaxon()->config()->getOptionNames('core.array'));
}

/**
* @throws SetupException
*/
public function testSetOptionsError()
{
// The key is missing
$this->assertFalse(jaxon()->config()->setOptions(['core' => []], 'core.missing'));
// The key is not an array
$this->assertFalse(jaxon()->config()->setOptions(['core' => ['string' => 'String']], 'core.string'));
$this->assertFalse(jaxon()->hasOption('core.string'));
}

/**
* @throws SetupException
*/
Expand Down

0 comments on commit 2e1e62e

Please sign in to comment.