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