IniRepository: Make key column validation in the constructor more readable
refs #13034
This commit is contained in:
parent
ca689bc944
commit
ac3e182f0d
|
@ -67,7 +67,7 @@ abstract class IniRepository extends Repository implements Extensible, Updatable
|
|||
{
|
||||
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');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue