コード例 #1
0
ファイル: ValidateTest.php プロジェクト: novuso/system
 /**
  * @dataProvider invalidEqualProvider
  */
 public function test_that_are_equal_returns_false_for_invalid_value($value1, $value2)
 {
     $this->assertFalse(Validate::areEqual($value1, $value2));
 }
コード例 #2
0
ファイル: SetBucketChain.php プロジェクト: novuso/system
 /**
  * Locates a bucket by item
  *
  * Returns null if the item is not found.
  *
  * @param mixed $item The item
  *
  * @return ItemBucket|null
  */
 protected function locate($item)
 {
     for ($this->rewind(); $this->valid(); $this->next()) {
         /** @var ItemBucket $current */
         $current = $this->current;
         if (Validate::areEqual($item, $current->item())) {
             return $current;
         }
     }
     return null;
 }
コード例 #3
0
ファイル: TableBucketChain.php プロジェクト: novuso/system
 /**
  * Locates a bucket by key
  *
  * Returns null if the key is not found.
  *
  * @param mixed $key The key
  *
  * @return KeyValueBucket|null
  */
 protected function locate($key)
 {
     for ($this->rewind(); $this->valid(); $this->next()) {
         /** @var KeyValueBucket $current */
         $current = $this->current;
         if (Validate::areEqual($key, $current->key())) {
             return $current;
         }
     }
     return null;
 }