Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
otrok7 committed Nov 12, 2024
1 parent 8446579 commit b5e29be
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion public/class-bread-format-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function getFormatByKey(string $lang, string $key): array|null
* @param string $lang
* @return array
*/
public function getFormatsUsed(string $lang=''): array
public function getFormatsUsed(string $lang = ''): array
{
$lang = ($lang == '') ? $this->defaultLang : $lang;
if (!isset($this->usedFormats[$lang])) {
Expand Down
15 changes: 8 additions & 7 deletions tests/BreadFormatsManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ private function getFormatMgr($usedFormat, $lang)
Bread_Bmlt::setFormatBase('german-formats');
return new Bread_FormatsManager($this->getFormats($usedFormat), $lang);
}
public function testGetFormatsUsed() {
$mgr = $this->getFormatMgr('berlin-formats-de','de');
public function testGetFormatsUsed()
{
$mgr = $this->getFormatMgr('berlin-formats-de', 'de');
$used = $mgr->getFormatsUsed();
assertEquals(50,count($used));
$o1 = $mgr->getFormatByKey('de','O1');
assertEquals(50, count($used));
$o1 = $mgr->getFormatByKey('de', 'O1');
assertNotNull($o1);
$o1e = $mgr->getFormatByKey('en','O1');
$o1e = $mgr->getFormatByKey('en', 'O1');
assertNotNull($o1e);
$used = $mgr->getFormatsUsed('en');
assertEquals(50,count($used));
assertEquals(50, count($used));
}
}
}

0 comments on commit b5e29be

Please sign in to comment.