Skip to content

Commit

Permalink
chore: prepare for 1.2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonTheAdams committed Mar 16, 2023
1 parent 871c476 commit a293d6f
Show file tree
Hide file tree
Showing 24 changed files with 84 additions and 84 deletions.
2 changes: 1 addition & 1 deletion src/Commands/ExcludeValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Returning this value from the __invoke method of a ValidationRule will stop all validation rules and exclude the
* value from the validated dataset.
*
* @unreleased
* @since 1.2.0
*/
class ExcludeValue
{
Expand Down
2 changes: 1 addition & 1 deletion src/Contracts/ValidationRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static function fromString(string $options = null): ValidationRule;
* The invokable method used to validate the value. If the value is invalid, the fail callback should be invoked
* with the error message. Use {field} to reference the field name in the error message.
*
* @unreleased add ExcludeValue return option
* @since 1.2.0 add ExcludeValue return option
* @since 1.0.0
*
* @return void|ExcludeValue|SkipValidationRules
Expand Down
4 changes: 2 additions & 2 deletions src/Rules/Abstracts/ConditionalRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct($conditions)
*
* Each rule is assumed to be a basic condition with an equals operator.
*
* @unreleased
* @since 1.2.0
*/
public static function fromString(string $options = null): ValidationRule
{
Expand All @@ -64,7 +64,7 @@ public static function fromString(string $options = null): ValidationRule
/**
* {@inheritdoc}
*
* @unreleased
* @since 1.2.0
*/
public function serializeOption()
{
Expand Down
14 changes: 7 additions & 7 deletions src/Rules/DateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/**
* This rule validates that the given value is a valid date.
*
* @unreleased
* @since 1.2.0
*/
class DateTime implements ValidationRule, ValidatesOnFrontEnd, Sanitizer
{
Expand All @@ -23,31 +23,31 @@ class DateTime implements ValidationRule, ValidatesOnFrontEnd, Sanitizer
protected $format;

/**
* @unreleased
* @since 1.2.0
*/
public static function id(): string
{
return 'dateTime';
}

/**
* @unreleased
* @since 1.2.0
*/
public static function fromString(string $options = null): ValidationRule
{
return new static($options);
}

/**
* @unreleased
* @since 1.2.0
*/
public function __construct(string $format = null)
{
$this->format = $format;
}

/**
* @unreleased
* @since 1.2.0
*/
public function __invoke($value, Closure $fail, string $key, array $values)
{
Expand Down Expand Up @@ -94,7 +94,7 @@ public function __invoke($value, Closure $fail, string $key, array $values)
}

/**
* @unreleased
* @since 1.2.0
*/
public function sanitize($value)
{
Expand All @@ -110,7 +110,7 @@ public function sanitize($value)
}

/**
* @unreleased
* @since 1.2.0
*/
public function serializeOption()
{
Expand Down
8 changes: 4 additions & 4 deletions src/Rules/Exclude.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
/**
* Applying this rule will prevent all further validations and exclude the value from the validated dataset.
*
* @unreleased
* @since 1.2.0
*/
class Exclude implements ValidationRule
{
/**
* @inheritDoc
*
* @unreleased
* @since 1.2.0
*/
public static function id(): string
{
Expand All @@ -28,7 +28,7 @@ public static function id(): string
/**
* @inheritDoc
*
* @unreleased
* @since 1.2.0
*/
public static function fromString(string $options = null): ValidationRule
{
Expand All @@ -38,7 +38,7 @@ public static function fromString(string $options = null): ValidationRule
/**
* @inheritDoc
*
* @unreleased
* @since 1.2.0
*/
public function __invoke($value, Closure $fail, string $key, array $values): ExcludeValue
{
Expand Down
6 changes: 3 additions & 3 deletions src/Rules/ExcludeIf.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
*
* @see Exclude
*
* @unreleased
* @since 1.2.0
*/
class ExcludeIf extends ConditionalRule
{
/**
* @inheritDoc
*
* @unreleased
* @since 1.2.0
*/
public static function id(): string
{
Expand All @@ -30,7 +30,7 @@ public static function id(): string
/**
* @inheritDoc
*
* @unreleased
* @since 1.2.0
*
* @return ExcludeValue|void
*/
Expand Down
6 changes: 3 additions & 3 deletions src/Rules/ExcludeUnless.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
*
* @see Exclude
*
* @unreleased
* @since 1.2.0
*/
class ExcludeUnless extends ConditionalRule
{
/**
* @inheritDoc
*
* @unreleased
* @since 1.2.0
*/
public static function id(): string
{
Expand All @@ -30,7 +30,7 @@ public static function id(): string
/**
* @inheritDoc
*
* @unreleased
* @since 1.2.0
*/
public function __invoke($value, Closure $fail, string $key, array $values)
{
Expand Down
10 changes: 5 additions & 5 deletions src/Rules/In.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ class In implements ValidationRule, ValidatesOnFrontEnd
protected $acceptedValues;

/**
* @unreleased
* @since 1.2.0
*/
public static function id(): string
{
return 'in';
}

/**
* @unreleased
* @since 1.2.0
*/
final public function __construct(...$acceptedValues)
{
Expand All @@ -35,7 +35,7 @@ final public function __construct(...$acceptedValues)
}

/**
* @unreleased
* @since 1.2.0
*/
public static function fromString(string $options = null): ValidationRule
{
Expand All @@ -53,7 +53,7 @@ public static function fromString(string $options = null): ValidationRule
}

/**
* @unreleased
* @since 1.2.0
*/
public function __invoke($value, Closure $fail, string $key, array $values)
{
Expand All @@ -63,7 +63,7 @@ public function __invoke($value, Closure $fail, string $key, array $values)
}

/**
* @unreleased
* @since 1.2.0
*/
public function serializeOption(): array
{
Expand Down
4 changes: 2 additions & 2 deletions src/Rules/InStrict.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
class InStrict extends In
{
/**
* @unreleased
* @since 1.2.0
*/
public static function id(): string
{
return 'inStrict';
}

/**
* @unreleased
* @since 1.2.0
*/
public function __invoke($value, Closure $fail, string $key, array $values)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Rules/NullableIf.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
/**
* The value is nullable if the conditions pass.
*
* @unreleased
* @since 1.2.0
*/
class NullableIf extends ConditionalRule
{
/**
* {@inheritDoc}
*
* @unreleased
* @since 1.2.0
*/
public static function id(): string
{
Expand All @@ -28,7 +28,7 @@ public static function id(): string
/**
* {@inheritDoc}
*
* @unreleased
* @since 1.2.0
*/
public function __invoke($value, Closure $fail, string $key, array $values)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Rules/NullableUnless.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
/**
* The value is nullable unless the conditions pass.
*
* @unreleased
* @since 1.2.0
*/
class NullableUnless extends ConditionalRule
{
/**
* {@inheritDoc}
*
* @unreleased
* @since 1.2.0
*/
public static function id(): string
{
Expand All @@ -28,7 +28,7 @@ public static function id(): string
/**
* {@inheritDoc}
*
* @unreleased
* @since 1.2.0
*/
public function __invoke($value, Closure $fail, string $key, array $values)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Rules/OptionalIf.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@
/**
* Mark the value as optional if the conditions pass
*
* @unreleased
* @since 1.2.0
*
* @see Optional
*/
class OptionalIf extends ConditionalRule
{
/**
* @unreleased
* @since 1.2.0
*/
public static function id(): string
{
return 'optionalIf';
}

/**
* @unreleased
* @since 1.2.0
*/
public function __invoke($value, Closure $fail, string $key, array $values)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Rules/OptionalUnless.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@
/**
* Mark the value as optional unless the conditions pass
*
* @unreleased
* @since 1.2.0
*
* @see Optional
*/
class OptionalUnless extends ConditionalRule
{
/**
* @unreleased
* @since 1.2.0
*/
public static function id(): string
{
return 'optionalIf';
}

/**
* @unreleased
* @since 1.2.0
*/
public function __invoke($value, Closure $fail, string $key, array $values)
{
Expand Down
Loading

0 comments on commit a293d6f

Please sign in to comment.