Skip to content

Commit

Permalink
Remove static return type as it is only supported in PHP 8+.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixarntz committed Jul 25, 2024
1 parent b1b07ef commit 7bee5eb
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/Validation/Abstract_Validation_Rule_Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct( array $initial_rules = array() ) {
* @since n.e.x.t
*
* @param Validation_Rule $rule Rule to add.
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*
* @throws InvalidArgumentException Thrown when a forbidden rule is passed.
*/
Expand Down
6 changes: 3 additions & 3 deletions src/Validation/Array_Validation_Rule_Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function __construct( array $initial_rules = array(), bool $strict = fals
* @since n.e.x.t
*
* @param Validation_Rule $item_validation_rule Validation rule to validate all array items with.
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*
* @SuppressWarnings(PHPMD.BooleanArgumentFlag)
*/
Expand All @@ -61,7 +61,7 @@ public function with_items( Validation_Rule $item_validation_rule ): Validation_
*
* @param int $min_count Optional. Minimum count allowed. Default 0 (no limit).
* @param int $max_count Optional. Maximum count allowed. Default 0 (no limit).
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*/
public function with_item_count_range( int $min_count = 0, int $max_count = 0 ): Validation_Rule_Builder {
return $this->with_rule( new Item_Count_Range_Validation_Rule( $min_count, $max_count ) );
Expand All @@ -72,7 +72,7 @@ public function with_item_count_range( int $min_count = 0, int $max_count = 0 ):
*
* @since n.e.x.t
*
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*/
public function with_unique_items(): Validation_Rule_Builder {
return $this->with_rule( new Unique_Items_Validation_Rule() );
Expand Down
2 changes: 1 addition & 1 deletion src/Validation/Contracts/Validation_Rule_Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface Validation_Rule_Builder {
* @since n.e.x.t
*
* @param Validation_Rule $rule Rule to add.
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*
* @throws InvalidArgumentException Thrown when a forbidden rule is passed.
*/
Expand Down
8 changes: 4 additions & 4 deletions src/Validation/Float_Validation_Rule_Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct( array $initial_rules = array(), bool $strict = fals
* @since n.e.x.t
*
* @param string $regexp Regular expression to match.
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*/
public function format_regexp( string $regexp ): Validation_Rule_Builder {
return $this->with_rule( new Regexp_Validation_Rule( $regexp ) );
Expand All @@ -60,7 +60,7 @@ public function format_regexp( string $regexp ): Validation_Rule_Builder {
*
* @param string $min_datetime Minimum date-time or date allowed.
* @param string $max_datetime Optional. Maximum date-time or date allowed. Default no limit.
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*/
public function with_datetime_range( string $min_datetime, string $max_datetime = null ): Validation_Rule_Builder {
return $this->with_rule( new Datetime_Range_Validation_Rule( $min_datetime, $max_datetime ) );
Expand All @@ -73,7 +73,7 @@ public function with_datetime_range( string $min_datetime, string $max_datetime
*
* @param int|float $min Minimum value allowed.
* @param int|float $max Optional. Maximum value allowed. Default no limit.
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*/
public function with_numeric_range( $min, $max = null ): Validation_Rule_Builder {
return $this->with_rule( new Numeric_Range_Validation_Rule( $min, $max ) );
Expand All @@ -86,7 +86,7 @@ public function with_numeric_range( $min, $max = null ): Validation_Rule_Builder
*
* @param mixed[] $allowed_values List of values to allow.
* @param bool $strict Optional. True to enable strict mode, false to disable it. Default false.
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*
* @SuppressWarnings(PHPMD.BooleanArgumentFlag)
*/
Expand Down
8 changes: 4 additions & 4 deletions src/Validation/Integer_Validation_Rule_Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct( array $initial_rules = array(), bool $strict = fals
* @since n.e.x.t
*
* @param string $regexp Regular expression to match.
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*/
public function format_regexp( string $regexp ): Validation_Rule_Builder {
return $this->with_rule( new Regexp_Validation_Rule( $regexp ) );
Expand All @@ -60,7 +60,7 @@ public function format_regexp( string $regexp ): Validation_Rule_Builder {
*
* @param string $min_datetime Minimum date-time or date allowed.
* @param string $max_datetime Optional. Maximum date-time or date allowed. Default no limit.
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*/
public function with_datetime_range( string $min_datetime, string $max_datetime = null ): Validation_Rule_Builder {
return $this->with_rule( new Datetime_Range_Validation_Rule( $min_datetime, $max_datetime ) );
Expand All @@ -73,7 +73,7 @@ public function with_datetime_range( string $min_datetime, string $max_datetime
*
* @param int|float $min Minimum value allowed.
* @param int|float $max Optional. Maximum value allowed. Default no limit.
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*/
public function with_numeric_range( $min, $max = null ): Validation_Rule_Builder {
return $this->with_rule( new Numeric_Range_Validation_Rule( $min, $max ) );
Expand All @@ -86,7 +86,7 @@ public function with_numeric_range( $min, $max = null ): Validation_Rule_Builder
*
* @param mixed[] $allowed_values List of values to allow.
* @param bool $strict Optional. True to enable strict mode, false to disable it. Default false.
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*
* @SuppressWarnings(PHPMD.BooleanArgumentFlag)
*/
Expand Down
18 changes: 9 additions & 9 deletions src/Validation/String_Validation_Rule_Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function __construct( array $initial_rules = array(), bool $strict = fals
*
* @since n.e.x.t
*
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*/
public function format_date(): Validation_Rule_Builder {
return $this->with_rule( new Date_Validation_Rule() );
Expand All @@ -62,7 +62,7 @@ public function format_date(): Validation_Rule_Builder {
*
* @since n.e.x.t
*
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*/
public function format_datetime(): Validation_Rule_Builder {
return $this->with_rule( new Datetime_Validation_Rule() );
Expand All @@ -73,7 +73,7 @@ public function format_datetime(): Validation_Rule_Builder {
*
* @since n.e.x.t
*
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*/
public function format_email(): Validation_Rule_Builder {
return $this->with_rule( new Email_Validation_Rule() );
Expand All @@ -84,7 +84,7 @@ public function format_email(): Validation_Rule_Builder {
*
* @since n.e.x.t
*
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*/
public function format_version(): Validation_Rule_Builder {
return $this->with_rule( new Version_Validation_Rule() );
Expand All @@ -95,7 +95,7 @@ public function format_version(): Validation_Rule_Builder {
*
* @since n.e.x.t
*
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*/
public function format_hex_color(): Validation_Rule_Builder {
return $this->with_rule( new Hex_Color_Validation_Rule() );
Expand All @@ -107,7 +107,7 @@ public function format_hex_color(): Validation_Rule_Builder {
* @since n.e.x.t
*
* @param string $regexp Regular expression to match.
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*/
public function format_regexp( string $regexp ): Validation_Rule_Builder {
return $this->with_rule( new Regexp_Validation_Rule( $regexp ) );
Expand All @@ -118,7 +118,7 @@ public function format_regexp( string $regexp ): Validation_Rule_Builder {
*
* @since n.e.x.t
*
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*/
public function format_url(): Validation_Rule_Builder {
return $this->with_rule( new URL_Validation_Rule() );
Expand All @@ -131,7 +131,7 @@ public function format_url(): Validation_Rule_Builder {
*
* @param string $min_datetime Minimum date-time or date allowed.
* @param string $max_datetime Optional. Maximum date-time or date allowed. Default no limit.
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*/
public function with_datetime_range( string $min_datetime, string $max_datetime = null ): Validation_Rule_Builder {
return $this->with_rule( new Datetime_Range_Validation_Rule( $min_datetime, $max_datetime ) );
Expand All @@ -144,7 +144,7 @@ public function with_datetime_range( string $min_datetime, string $max_datetime
*
* @param mixed[] $allowed_values List of values to allow.
* @param bool $strict Optional. True to enable strict mode, false to disable it. Default false.
* @return static Builder instance for chaining.
* @return Validation_Rule_Builder Builder instance for chaining.
*
* @SuppressWarnings(PHPMD.BooleanArgumentFlag)
*/
Expand Down

0 comments on commit 7bee5eb

Please sign in to comment.