Skip to content

Commit

Permalink
phpcs fixes and another assert for Validation::count()
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Krämer committed Apr 27, 2016
1 parent dae46da commit e61f21d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Validation/Validation.php
Expand Up @@ -224,7 +224,7 @@ public static function cc($check, $type = 'fast', $deep = false, $regex = null)
* @param string $operator Can be either a word or operand
* is greater >, is less <, greater or equal >=
* less or equal <=, is less <, equal to ==, not equal !=
* @param int $check2 The expected count value.
* @param int $expectedCount The expected count value.
* @return bool Success
*/
public static function count($check1, $operator, $expectedCount)
Expand Down
3 changes: 3 additions & 0 deletions tests/TestCase/Validation/ValidationTest.php
Expand Up @@ -2787,5 +2787,8 @@ public function testCount()

$int = 0;
$this->assertTrue(Validation::count($int, '==', 0));

$this->assertFalse(Validation::count(null, '==', 0));
$this->assertFalse(Validation::count(new \stdClass(), '==', 0));
}
}

0 comments on commit e61f21d

Please sign in to comment.