Skip to content
Permalink
Browse files

Fix PHPCS errors and failing test.

Refs #7577
  • Loading branch information...
markstory committed Oct 21, 2015
1 parent 0cdfed0 commit c26b7bbffe351ebb0c991319a094ff09dbda9059
Showing with 20 additions and 20 deletions.
  1. +1 −1 lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php
  2. +19 −19 lib/Cake/Utility/Validation.php
@@ -400,7 +400,7 @@ public function testSkippingAnotherInteractiveFieldValidation() {
public function testInteractiveDoValidationWithSkipping() {
$this->Task->expects($this->any())
->method('in')
->will($this->onConsecutiveCalls('34', '24', 'n', '10', 's'));
->will($this->onConsecutiveCalls('35', '24', 'n', '10', 's'));
$this->Task->interactive = true;
$Model = $this->getMock('Model');
$Model->primaryKey = 'id';
@@ -1038,25 +1038,25 @@ public static function uploadError($check, $allowNoFile = false) {
}
/**
* Validate an uploaded file.
*
* Helps join `uploadError`, `fileSize` and `mimeType` into
* one higher level validation method.
*
* ### Options
*
* - `types` - A list of valid mime types. If empty all types
* will be accepted. The `type` will not be looked at, instead
* the file type will be checked with ext/finfo.
* - `minSize` - The minimum file size. Defaults to not checking.
* - `maxSize` - The maximum file size. Defaults to not checking.
* - `optional` - Whether or not this file is optional. Defaults to false.
* If true a missing file will pass the validator regardless of other constraints.
*
* @param array $file The uploaded file data from PHP.
* @param array $options An array of options for the validation.
* @return bool
*/
* Validate an uploaded file.
*
* Helps join `uploadError`, `fileSize` and `mimeType` into
* one higher level validation method.
*
* ### Options
*
* - `types` - A list of valid mime types. If empty all types
* will be accepted. The `type` will not be looked at, instead
* the file type will be checked with ext/finfo.
* - `minSize` - The minimum file size. Defaults to not checking.
* - `maxSize` - The maximum file size. Defaults to not checking.
* - `optional` - Whether or not this file is optional. Defaults to false.
* If true a missing file will pass the validator regardless of other constraints.
*
* @param array $file The uploaded file data from PHP.
* @param array $options An array of options for the validation.
* @return bool
*/
public static function uploadedFile($file, $options = array()) {
$options += array(
'minSize' => null,

0 comments on commit c26b7bb

Please sign in to comment.
You can’t perform that action at this time.