Changeset 10290 for sites/trunk/wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/src/class-restapi.php
- Timestamp:
- 09/28/2020 02:51:03 AM (4 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter
- Property svn:ignore
-
old new 2 2 Makefile 3 3 README.md 4 CODE_OF_CONDUCT.md 5 CONTRIBUTING.md 4 6 docker-compose.yml 5 7 node_modules
-
- Property svn:ignore
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/src/class-restapi.php
r9884 r10290 20 20 'args' => array( 21 21 'commit' => array( 22 'required' => true, 23 'description' => 'The SVN commit changeset number.', 24 'type' => 'numeric', 25 'validate_callback' => array( __CLASS__, 'validate_callback' ), 22 'required' => true, 23 'description' => 'The SVN commit changeset number.', 24 'type' => 'integer', 26 25 ), 27 26 'results' => array( … … 51 50 public static function validate_callback( $value, $request, $key ) { 52 51 switch ( $key ) { 53 case 'commit':54 if ( ! is_numeric( $value ) ) {55 return new WP_Error(56 'rest_invalid',57 __( 'Value must be numeric.', 'ptr' ),58 array(59 'status' => 400,60 )61 );62 }63 return true;64 52 case 'message': 65 53 if ( empty( $value ) || ! is_string( $value ) ) {
Note: See TracChangeset
for help on using the changeset viewer.