/** * @param Models $models * @return boolean */ public function hasModels(Models $models) { return !$models->isEmptyProperty($this->getConfig()->getPrimaryKey()); }
/** * @covers ::isEmptyProperty */ public function testIsEmptyProperty() { $models = new Models([new City(['id' => 10, 'name' => null]), new City(['id' => 20, 'name' => null]), new City(['id' => null, 'name' => null])]); $this->assertFalse($models->isEmptyProperty('id')); $this->assertTrue($models->isEmptyProperty('name')); }
/** * @param Models $models * @return boolean */ public function hasModels(Models $models) { return !$models->isEmptyProperty($this->getKey()); }
public function hasModels(Models $models) { return !($models->isEmptyProperty($this->key) or $models->isEmptyProperty($this->classKey)); }