Skip to content

Commit

Permalink
More type hint fixes found by static analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Quadling authored and Richard Quadling committed Aug 23, 2019
1 parent dce360b commit ba56167
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions lib/Assert/Assert.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ abstract class Assert
* that is happening on the passed value.
*
* @param mixed $value
* @param string $defaultMessage
* @param string $defaultPropertyPath
* @param string|callable|null $defaultMessage
* @param string|null $defaultPropertyPath
*
* @return AssertionChain
*
Expand All @@ -45,7 +45,7 @@ abstract class Assert
* The assertion chain can be stateful, that means be careful when you reuse
* it. You should never pass around the chain.
*/
public static function that($value, $defaultMessage = null, $defaultPropertyPath = null): AssertionChain
public static function that($value, $defaultMessage = null, string $defaultPropertyPath = null): AssertionChain
{
$assertionChain = new AssertionChain($value, $defaultMessage, $defaultPropertyPath);

Expand All @@ -56,12 +56,12 @@ public static function that($value, $defaultMessage = null, $defaultPropertyPath
* Start validation on a set of values, returns {@link AssertionChain}.
*
* @param mixed $values
* @param string $defaultMessage
* @param string $defaultPropertyPath
* @param string|callable|null $defaultMessage
* @param string|null $defaultPropertyPath
*
* @return AssertionChain
*/
public static function thatAll($values, $defaultMessage = null, $defaultPropertyPath = null): AssertionChain
public static function thatAll($values, $defaultMessage = null, string $defaultPropertyPath = null): AssertionChain
{
return static::that($values, $defaultMessage, $defaultPropertyPath)->all();
}
Expand All @@ -70,12 +70,12 @@ public static function thatAll($values, $defaultMessage = null, $defaultProperty
* Start validation and allow NULL, returns {@link AssertionChain}.
*
* @param mixed $value
* @param string $defaultMessage
* @param string $defaultPropertyPath
* @param string|callable|null $defaultMessage
* @param string|null $defaultPropertyPath
*
* @return AssertionChain
*/
public static function thatNullOr($value, $defaultMessage = null, $defaultPropertyPath = null): AssertionChain
public static function thatNullOr($value, $defaultMessage = null, string $defaultPropertyPath = null): AssertionChain
{
return static::that($value, $defaultMessage, $defaultPropertyPath)->nullOr();
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Assert/AssertionChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class AssertionChain
/**
* AssertionChain constructor.
*
* @param $value
* @param mixed $value
* @param string|callable|null $defaultMessage
* @param string|null $defaultPropertyPath
*/
Expand Down

0 comments on commit ba56167

Please sign in to comment.