@@ -37,7 +37,7 @@ |
||
37 | 37 | /** |
38 | 38 | * {@inheritdoc} |
39 | 39 | * |
40 | - * @return int|null |
|
40 | + * @return DateTime |
|
41 | 41 | */ |
42 | 42 | public function convertFieldValueToForm(Value $value, FieldDefinition $fieldDefinition = null) |
43 | 43 | { |
@@ -41,7 +41,7 @@ |
||
41 | 41 | */ |
42 | 42 | public function convertFieldValueFromForm($value) |
43 | 43 | { |
44 | - return new SelectionValue\Value((array) $value); |
|
44 | + return new SelectionValue\Value((array)$value); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -10,7 +10,6 @@ |
||
10 | 10 | use Netgen\Bundle\EzFormsBundle\Form\FieldTypeHandler; |
11 | 11 | use Symfony\Component\Form\Extension\Core\Type\DateTimeType; |
12 | 12 | use Symfony\Component\Form\FormBuilderInterface; |
13 | -use Symfony\Component\Validator\Constraints; |
|
14 | 13 | use Symfony\Component\Validator\Constraints as Assert; |
15 | 14 | |
16 | 15 | class DateAndTime extends FieldTypeHandler |
@@ -85,7 +85,7 @@ |
||
85 | 85 | |
86 | 86 | if ($fieldDefinition->defaultValue instanceof FloatValue\Value) { |
87 | 87 | if (!$content instanceof Content) { |
88 | - $options['data'] = (float) $fieldDefinition->defaultValue->value; |
|
88 | + $options['data'] = (float)$fieldDefinition->defaultValue->value; |
|
89 | 89 | } |
90 | 90 | } |
91 | 91 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function convertFieldValueToForm(Value $value, FieldDefinition $fieldDefinition = null) |
38 | 38 | { |
39 | - return (int) $value->value; |
|
39 | + return (int)$value->value; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | if ($fieldDefinition->defaultValue instanceof IntegerValue\Value) { |
68 | 68 | if (!$content instanceof Content) { |
69 | - $options['data'] = (int) $fieldDefinition->defaultValue->value; |
|
69 | + $options['data'] = (int)$fieldDefinition->defaultValue->value; |
|
70 | 70 | } |
71 | 71 | } |
72 | 72 |
@@ -91,7 +91,7 @@ |
||
91 | 91 | } |
92 | 92 | } |
93 | 93 | |
94 | - return new CountryValue((array) $country); |
|
94 | + return new CountryValue((array)$country); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | /** @var $contentType \eZ\Publish\API\Repository\Values\ContentType\ContentType */ |
28 | 28 | $contentType = $data->definition; |
29 | 29 | |
30 | - $fieldDefinitionIdentifier = (string) $propertyPath; |
|
30 | + $fieldDefinitionIdentifier = (string)$propertyPath; |
|
31 | 31 | $fieldDefinition = $contentType->getFieldDefinition($fieldDefinitionIdentifier); |
32 | 32 | |
33 | 33 | if (null === $fieldDefinition) { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | /** @var $contentType \eZ\Publish\API\Repository\Values\ContentType\ContentType */ |
71 | 71 | $contentType = $data->definition; |
72 | 72 | |
73 | - $fieldDefinitionIdentifier = (string) $propertyPath; |
|
73 | + $fieldDefinitionIdentifier = (string)$propertyPath; |
|
74 | 74 | $fieldDefinition = $contentType->getFieldDefinition($fieldDefinitionIdentifier); |
75 | 75 | |
76 | 76 | if (null === $fieldDefinition) { |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $userCreateStruct = $data->payload; |
25 | 25 | $contentType = $userCreateStruct->contentType; |
26 | 26 | |
27 | - $fieldDefinitionIdentifier = (string) $propertyPath; |
|
27 | + $fieldDefinitionIdentifier = (string)$propertyPath; |
|
28 | 28 | $fieldDefinition = $contentType->getFieldDefinition($fieldDefinitionIdentifier); |
29 | 29 | |
30 | 30 | if (null === $fieldDefinition) { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $userCreateStruct = $data->payload; |
54 | 54 | $contentType = $userCreateStruct->contentType; |
55 | 55 | |
56 | - $fieldDefinitionIdentifier = (string) $propertyPath; |
|
56 | + $fieldDefinitionIdentifier = (string)$propertyPath; |
|
57 | 57 | $fieldDefinition = $contentType->getFieldDefinition($fieldDefinitionIdentifier); |
58 | 58 | |
59 | 59 | if (null === $fieldDefinition) { |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | /** @var ContentType $contentType */ |
31 | 31 | $contentType = $data->definition; |
32 | 32 | |
33 | - $fieldDefinitionIdentifier = (string) $propertyPath; |
|
33 | + $fieldDefinitionIdentifier = (string)$propertyPath; |
|
34 | 34 | $fieldDefinition = $contentType->getFieldDefinition($fieldDefinitionIdentifier); |
35 | 35 | |
36 | 36 | if (null === $fieldDefinition) { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | /** @var ContentType $contentType */ |
69 | 69 | $contentType = $data->definition; |
70 | 70 | |
71 | - $fieldDefinitionIdentifier = (string) $propertyPath; |
|
71 | + $fieldDefinitionIdentifier = (string)$propertyPath; |
|
72 | 72 | $fieldDefinition = $contentType->getFieldDefinition($fieldDefinitionIdentifier); |
73 | 73 | |
74 | 74 | if (null === $fieldDefinition) { |