Skip to content

Commit

Permalink
chore: prepare for 1.1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonTheAdams committed Feb 7, 2023
1 parent cc7c12a commit fc1fa26
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion src/Commands/SkipValidationRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Returning this command from ValidationRule::__invoke() tells the Validator to skip all subsequent rules.
*
* @unreleased
* @since 1.1.0
*/
class SkipValidationRules
{
Expand Down
10 changes: 5 additions & 5 deletions src/Rules/Nullable.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,28 @@
* This rule skips further validation if the field is null. It is similar to Optional, but the only allowed value is
* null.
*
* @unreleased
* @since 1.1.0
*/
class Nullable implements ValidationRule, ValidatesOnFrontEnd
{
/**
* @unreleased
* @since 1.1.0
*/
public static function id(): string
{
return 'nullable';
}

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

/**
* @unreleased
* @since 1.1.0
*
* @return SkipValidationRules|void
*/
Expand All @@ -46,7 +46,7 @@ public function __invoke($value, Closure $fail, string $key, array $values)
}

/**
* @unreleased
* @since 1.1.0
*/
public function serializeOption()
{
Expand Down
10 changes: 5 additions & 5 deletions src/Rules/Optional.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@
/**
* This rule marks a field as optional and skips further validation if the rule is either null or an empty string.
*
* @unreleased
* @since 1.1.0
*/
class Optional implements ValidationRule, ValidatesOnFrontEnd
{
/**
* @unreleased
* @since 1.1.0
*/
public static function id(): string
{
return 'optional';
}

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

/**
* @unreleased
* @since 1.1.0
*
* @return SkipValidationRules|void
*/
Expand All @@ -45,7 +45,7 @@ public function __invoke($value, Closure $fail, string $key, array $values)
}

/**
* @unreleased
* @since 1.1.0
*/
public function serializeOption()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Rules/CurrencyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class CurrencyTest extends TestCase
{
/**
* @unreleased
* @since 1.1.0
* @dataProvider currencyProvider
*/
public function testCurrencyValidations($currency, $shouldPass)
Expand All @@ -24,7 +24,7 @@ public function testCurrencyValidations($currency, $shouldPass)
}

/**
* @unreleased
* @since 1.1.0
*/
public function currencyProvider(): array
{
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Rules/EmailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class EmailTest extends TestCase
{
/**
* @unreleased
* @since 1.1.0
*
* @dataProvider emailsProvider
*/
Expand All @@ -26,7 +26,7 @@ public function testEmailRule($email, bool $shouldBeValid)
}

/**
* @unreleased
* @since 1.1.0
*
* @return array<int, array<mixed, bool>>
*/
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/Rules/IntegerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class IntegerTest extends TestCase
{
/**
* @unreleased
* @since 1.1.0
*
* @dataProvider integersProvider
*/
Expand All @@ -26,7 +26,7 @@ public function testRuleValidatesIntegers($value, $pass)
}

/**
* @unreleased
* @since 1.1.0
*/
public function testCastsToInteger()
{
Expand All @@ -35,7 +35,7 @@ public function testCastsToInteger()
}

/**
* @unreleased
* @since 1.1.0
*/
public function integersProvider(): array
{
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Rules/NullableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class NullableTest extends TestCase
{
/**
* @unreleased
* @since 1.1.0
*/
public function testNullableValidation()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Rules/NumericTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class NumericTest extends TestCase
{
/**
* @unreleased
* @since 1.1.0
*/
public function testShouldPassWhenValueIsNumeric()
{
Expand All @@ -22,7 +22,7 @@ public function testShouldPassWhenValueIsNumeric()
}

/**
* @unreleased
* @since 1.1.0
*/
public function testShouldFailWhenValueIsNotNumeric()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Rules/OptionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class OptionalTest extends TestCase
{
/**
* @unreleased
* @since 1.1.0
*/
public function testNullableValidation()
{
Expand Down
32 changes: 16 additions & 16 deletions tests/unit/ValidationRuleSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
/**
* @covers ValidationRuleSet
*
* @unreleased
* @since 1.1.0
*/
class ValidationRuleSetTest extends TestCase
{
/**
* @unreleased
* @since 1.1.0
*/
public function testRulesCanBePassedAsStrings()
{
Expand All @@ -30,7 +30,7 @@ public function testRulesCanBePassedAsStrings()
}

/**
* @unreleased
* @since 1.1.0
*/
public function testRulesCanBePassedAsInstances()
{
Expand All @@ -41,7 +41,7 @@ public function testRulesCanBePassedAsInstances()
}

/**
* @unreleased
* @since 1.1.0
*/
public function testRulesCanBePassedAsClosures()
{
Expand All @@ -53,7 +53,7 @@ public function testRulesCanBePassedAsClosures()
}

/**
* @unreleased
* @since 1.1.0
*/
public function testCheckingHasRule()
{
Expand All @@ -66,7 +66,7 @@ public function testCheckingHasRule()
}

/**
* @unreleased
* @since 1.1.0
*/
public function testGettingARule()
{
Expand All @@ -79,7 +79,7 @@ public function testGettingARule()
}

/**
* @unreleased
* @since 1.1.0
*/
public function testGettingAllRules()
{
Expand All @@ -90,7 +90,7 @@ public function testGettingAllRules()
}

/**
* @unreleased
* @since 1.1.0
*/
public function testForgettingARule()
{
Expand All @@ -103,7 +103,7 @@ public function testForgettingARule()
}

/**
* @unreleased
* @since 1.1.0
*/
public function testRulesCanBeSerializedToJson()
{
Expand All @@ -120,15 +120,15 @@ public function testRulesCanBeSerializedToJson()
}

/**
* @unreleased
* @since 1.1.0
*/
public function testRulesAreIterable()
{
$this->assertIsIterable(new ValidationRuleSet($this->getMockRulesRegister()));
}

/**
* @unreleased
* @since 1.1.0
*/
public function testClosuresMustHaveAtLeastTwoParameters()
{
Expand All @@ -141,7 +141,7 @@ public function testClosuresMustHaveAtLeastTwoParameters()
}

/**
* @unreleased
* @since 1.1.0
*/
public function testClosureMustHaveAtMostFourParameters()
{
Expand All @@ -154,7 +154,7 @@ public function testClosureMustHaveAtMostFourParameters()
}

/**
* @unreleased
* @since 1.1.0
*/
public function testClosureSecondParameterMustBeClosure()
{
Expand All @@ -169,7 +169,7 @@ public function testClosureSecondParameterMustBeClosure()
}

/**
* @unreleased
* @since 1.1.0
*/
public function testClosureThirdParameterMustBeString()
{
Expand All @@ -182,7 +182,7 @@ public function testClosureThirdParameterMustBeString()
}

/**
* @unreleased
* @since 1.1.0
*/
public function testClosureFourthParameterMustBeArray()
{
Expand All @@ -195,7 +195,7 @@ public function testClosureFourthParameterMustBeArray()
}

/**
* @unreleased
* @since 1.1.0
*/
private function getMockRulesRegister(): ValidationRulesRegistrar
{
Expand Down
Loading

0 comments on commit fc1fa26

Please sign in to comment.