diff --git a/Admin/Installer.php b/Admin/Installer.php index 727e611..01cdb30 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -93,9 +93,9 @@ final class Installer extends InstallerAbstract continue; } - $amountTypes[$type['name']] = !\is_array($responseData['response']) - ? $responseData['response']->toArray() - : $responseData['response']; + $amountTypes[$type['name']] = \is_array($responseData['response']) + ? $responseData['response'] + : $responseData['response']->toArray(); $isFirst = true; foreach ($type['l11n'] as $language => $l11n) { diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 6d56183..f71343a 100644 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -487,7 +487,7 @@ final class ApiController extends Controller $types = AmountTypeMapper::getAll()->execute(); foreach ($types as $type) { - if ($type->title = 'costs') { + if ($type->title === 'costs') { $defaultGroup = new AmountGroup(); $defaultGroup->name = 'Purchase Price'; // @todo: replace with api l11n $defaultGroup->type = new NullBaseStringL11nType($type->id);