Esempio n. 1
0
 /**
  * @param  Models  $models
  * @return boolean
  */
 public function hasModels(Models $models)
 {
     return !$models->isEmptyProperty($this->getConfig()->getPrimaryKey());
 }
Esempio n. 2
0
 /**
  * @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'));
 }
Esempio n. 3
0
 /**
  * @param  Models  $models
  * @return boolean
  */
 public function hasModels(Models $models)
 {
     return !$models->isEmptyProperty($this->getKey());
 }
Esempio n. 4
0
 public function hasModels(Models $models)
 {
     return !($models->isEmptyProperty($this->key) or $models->isEmptyProperty($this->classKey));
 }