BUGFIX: Add missing argumentName

* As this is not mandantory.
This commit is contained in:
Daniel Siepmann 2017-03-06 11:38:43 +01:00
parent 26c8f8b83a
commit 3c53a4de5b
No known key found for this signature in database
GPG key ID: 33D6629915560EF4
3 changed files with 5 additions and 5 deletions

View file

@ -12,7 +12,7 @@ Lets imagine you have this action-method::
/**
* @param Order $order
* @Flow\Validate(type="DigiComp.SettingValidator:Settings")
* @Flow\Validate(type="DigiComp.SettingValidator:Settings", argumentName="$order")
*/
public function createOrder(Order $order) {...}

View file

@ -33,7 +33,7 @@ If you prefer the name, you have to configure the validator to use the specific
/**
* @param OrderCustomer $orderCustomer
* @Flow\Validate(argumentName="orderCustomer", type="DigiComp.SettingValidator:Settings", options={"name"="OrderCustomer"})
* @Flow\Validate(argumentName="$orderCustomer", type="DigiComp.SettingValidator:Settings", options={"name"="OrderCustomer"})
*/
public function createOrder(OrderCustomer $orderCustomer) {...}
@ -47,7 +47,7 @@ argument, the following code will be enough::
/**
* @param Order $order
* @Flow\Validate(argumentName="order, type="DigiComp.SettingValidator:Settings")
* @Flow\Validate(argumentName="$order, type="DigiComp.SettingValidator:Settings")
*/
public function createOrder(Order $order) {...}

View file

@ -9,7 +9,7 @@ Lets imagine you had this action-method:
/**
* @param Order $order
* @Flow\Validate(type="DigiComp.SettingValidator:Settings")
* @Flow\Validate(type="DigiComp.SettingValidator:Settings", argumentName="$order")
*/
public function createOrder($order) {...}
@ -43,4 +43,4 @@ Then your Validation.yaml could look like this:
As you see: Nesting is possible ;) That way you can easily construct flexible structures.
The SettingsValidator has an optional option: "name" - If you don't give one, it assumes your validation value is an
object and searches in Validation.yaml for the FQCN.
object and searches in Validation.yaml for the FQCN.