Skip to content

Commit

Permalink
Review
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed May 16, 2023
1 parent be7de29 commit ad8ce8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ public static function provideConstraintsWithIgnoreNullEnabled(): iterable
yield 'Named arguments' => [new UniqueEntity(message: 'myMessage', fields: ['name', 'name2'], em: 'foo', ignoreNull: true)];
}

public function provideConstraintsWithIgnoreNullEnabledOnFirstField(): iterable
public static function provideConstraintsWithIgnoreNullEnabledOnFirstField(): iterable
{
yield 'Doctrine style (name field)' => [new UniqueEntity([
'message' => 'myMessage',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* Constraint for the Unique Entity validator.
*
* @Annotation
*
* @Target({"CLASS", "ANNOTATION"})
*
* @author Benjamin Eberlei <kontakt@beberlei.de>
Expand Down Expand Up @@ -46,8 +45,8 @@ class UniqueEntity extends Constraint
protected static $errorNames = self::ERROR_NAMES;

/**
* @param array|string $fields the combination of fields that must contain unique values or a set of options
* @param bool|array|string $ignoreNull the combination of fields that ignore null values
* @param array|string $fields The combination of fields that must contain unique values or a set of options
* @param bool|array|string $ignoreNull The combination of fields that ignore null values
*/
public function __construct(
$fields,
Expand Down

0 comments on commit ad8ce8a

Please sign in to comment.