Skip to content

Commit

Permalink
Add @psalm-assert and @psalm-pure to Assert::classExists (#186)
Browse files Browse the repository at this point in the history
Closes #185
  • Loading branch information
vudaltsov authored Apr 19, 2020
1 parent 589f484 commit e692710
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/Assert.php
Original file line number Diff line number Diff line change
Expand Up @@ -1668,6 +1668,9 @@ public static function writable($value, $message = '')
}

/**
* @psalm-pure
* @psalm-assert class-string $value
*
* @param mixed $value
* @param string $message
*
Expand Down
4 changes: 2 additions & 2 deletions tests/static-analysis/assert-classExists.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

use Webmozart\Assert\Assert;


/**
* @psalm-param class-string $value
* @psalm-pure
* @psalm-param mixed $value
*
* @psalm-return class-string
*/
Expand Down

0 comments on commit e692710

Please sign in to comment.