@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
| 104 | - * @param $class |
|
| 104 | + * @param null|string $class |
|
| 105 | 105 | * |
| 106 | 106 | * @return EntityInterface |
| 107 | 107 | */ |
@@ -192,6 +192,9 @@ discard block |
||
| 192 | 192 | return $entity; |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | + /** |
|
| 196 | + * @param string $default |
|
| 197 | + */ |
|
| 195 | 198 | protected function ask($text, $default = null) |
| 196 | 199 | { |
| 197 | 200 | $helper = $this->getQuestionHelper(); |
@@ -202,6 +205,9 @@ discard block |
||
| 202 | 205 | return $res; |
| 203 | 206 | } |
| 204 | 207 | |
| 208 | + /** |
|
| 209 | + * @param string $field |
|
| 210 | + */ |
|
| 205 | 211 | protected function askForField($field, $tName) |
| 206 | 212 | { |
| 207 | 213 | $question = "$field ($tName): "; |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | if ($result) { |
| 235 | - $result = (int)$result; |
|
| 235 | + $result = (int) $result; |
|
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | break; |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | if ($result) { |
| 248 | - $result = (float)$result; |
|
| 248 | + $result = (float) $result; |
|
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | break; |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | /** |
| 195 | - * @return \Smartbox\CoreBundle\Type\IntegerType[] |
|
| 195 | + * @return integer[] |
|
| 196 | 196 | */ |
| 197 | 197 | public function getArrayOfIntegers() |
| 198 | 198 | { |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | /** |
| 211 | - * @return \Smartbox\CoreBundle\Type\StringType[] |
|
| 211 | + * @return string[] |
|
| 212 | 212 | */ |
| 213 | 213 | public function getArrayOfStrings() |
| 214 | 214 | { |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | /** |
| 227 | - * @return \Smartbox\CoreBundle\Type\DoubleType[] |
|
| 227 | + * @return double[] |
|
| 228 | 228 | */ |
| 229 | 229 | public function getArrayOfDoubles() |
| 230 | 230 | { |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | /** |
| 243 | - * @return \Smartbox\CoreBundle\Type\Date[] |
|
| 243 | + * @return \DateTime[] |
|
| 244 | 244 | */ |
| 245 | 245 | public function getArrayOfDates() |
| 246 | 246 | { |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | /** |
| 100 | - * @return \Smartbox\CoreBundle\Tests\Fixtures\Entity\TestEntity[] |
|
| 100 | + * @return TestEntity |
|
| 101 | 101 | */ |
| 102 | 102 | public function getAssocItems() |
| 103 | 103 | { |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | /** |
| 116 | - * @return Entity[] |
|
| 116 | + * @return Entity |
|
| 117 | 117 | */ |
| 118 | 118 | public function getGenericItems() |
| 119 | 119 | { |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace Smartbox\CoreBundle\Tests\Fixtures\Entity; |
| 4 | 4 | |
| 5 | 5 | use JMS\Serializer\Annotation as JMS; |
| 6 | -use Symfony\Component\Validator\Constraints as Assert; |
|
| 7 | 6 | use Smartbox\CoreBundle\Type\Entity; |
| 8 | 7 | |
| 9 | 8 | class TestNestedEntity extends Entity |
@@ -29,6 +29,9 @@ |
||
| 29 | 29 | return $kernel; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | + /** |
|
| 33 | + * @param string $title |
|
| 34 | + */ |
|
| 32 | 35 | protected function createCacheableEntity($title) |
| 33 | 36 | { |
| 34 | 37 | $testEntity = new CacheableEntity(); |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | - * @param $method |
|
| 23 | + * @param string $method |
|
| 24 | 24 | * @param array $arguments |
| 25 | 25 | * @param null $result |
| 26 | 26 | */ |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $arrayData = $this->serializer->serialize($data, 'array'); |
| 46 | 46 | $this->assertEquals( |
| 47 | 47 | [ |
| 48 | - 'internalType' => TestEntity::class, // We are using the IdenticalPropertyNamingStrategy |
|
| 48 | + 'internalType' => TestEntity::class, // We are using the IdenticalPropertyNamingStrategy |
|
| 49 | 49 | 'title' => 'some title', |
| 50 | 50 | 'description' => 'some description', |
| 51 | 51 | 'note' => 'some note', |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $arrayData = $this->serializer->serialize($data, 'array', $context); |
| 71 | 71 | $this->assertEquals( |
| 72 | 72 | [ |
| 73 | - 'internalType' => TestEntity::class, // We are using the IdenticalPropertyNamingStrategy |
|
| 73 | + 'internalType' => TestEntity::class, // We are using the IdenticalPropertyNamingStrategy |
|
| 74 | 74 | 'title' => 'some title', |
| 75 | 75 | 'note' => 'some note', |
| 76 | 76 | ], |
@@ -95,8 +95,8 @@ |
||
| 95 | 95 | /** |
| 96 | 96 | * @param $typeName |
| 97 | 97 | * @param array|null $typeParams |
| 98 | - * @param null $group |
|
| 99 | - * @param null $version |
|
| 98 | + * @param string $group |
|
| 99 | + * @param string $version |
|
| 100 | 100 | * |
| 101 | 101 | * @return float|int|string|array|\DateTime|EntityInterface |
| 102 | 102 | * |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | |
| 32 | 32 | protected function setUp() |
| 33 | 33 | { |
| 34 | - static::bootKernel(); |
|
| 34 | + static::bootKernel(); |
|
| 35 | 35 | |
| 36 | 36 | $this->container = static::$kernel->getContainer(); |
| 37 | 37 | $this->serializer = $this->container->get('jms_serializer'); |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | * |
| 37 | 37 | * @param mixed $value Some value |
| 38 | 38 | * |
| 39 | - * @return MetadataInterface The metadata for the value |
|
| 39 | + * @return \Symfony\Component\Validator\Mapping\MetadataInterface The metadata for the value |
|
| 40 | 40 | * |
| 41 | 41 | * @throws Exception\NoSuchMetadataException If no metadata exists for the given value |
| 42 | 42 | */ |