IniRepository: Make key column validation in the constructor more readable

refs #13034
This commit is contained in:
Johannes Meyer 2016-11-04 09:59:37 +01:00
parent ca689bc944
commit ac3e182f0d

View File

@ -67,7 +67,7 @@ abstract class IniRepository extends Repository implements Extensible, Updatable
{ {
parent::__construct($ds); // First! Due to init(). parent::__construct($ds); // First! Due to init().
if (! ($ds === null || $ds->getConfigObject()->getKeyColumn())) { if ($ds !== null && !$ds->getConfigObject()->getKeyColumn()) {
throw new ProgrammingError('INI repositories require their data source to provide a valid key column'); throw new ProgrammingError('INI repositories require their data source to provide a valid key column');
} }
} }