| @@ -1,32 +1,19 @@ | ||
| 1 | 1 | <?php |
| 2 | -/** | |
| 3 | - * Reuseable custom validation trait | |
| 4 | - * | |
| 5 | - * @package Tutor | |
| 6 | - * @author Themeum <support@themeum.com> | |
| 7 | - * @link https://themeum.com | |
| 8 | - * @since 2.0.0 | |
| 9 | - */ | |
| 10 | - | |
| 11 | 2 | namespace TUTOR; |
| 12 | - | |
| 13 | 3 | /** |
| 14 | - * Custom Validation Trait | |
| 15 | - * | |
| 16 | - * @since 2.0.0 | |
| 4 | + * Custom Valaidation Trait | |
| 17 | 5 | */ |
| 18 | -trait Custom_Validation { | |
| 19 | - | |
| 6 | +trait Custom_Validation | |
| 7 | +{ | |
| 20 | 8 | /** |
| 21 | 9 | * Check whether order value is asc or desc |
| 22 | 10 | * |
| 23 | - * @since 2.0.0 | |
| 24 | - * | |
| 25 | - * @param string $order sorting order. | |
| 11 | + * @param string $order | |
| 26 | 12 | * @return bool |
| 27 | 13 | */ |
| 28 | - public function validate_order( $order ) { | |
| 29 | - return in_array( strtolower( $order ), array( 'asc', 'desc' ), true ); | |
| 14 | + public function validate_order( $order ) | |
| 15 | + { | |
| 16 | + return in_array( strtolower( $order ), array( 'asc', 'desc' ) ); | |
| 30 | 17 | } |
| 31 | 18 | } |
| 32 | - | |
| 19 | +?> | |