| @@ -28,7 +28,7 @@ | ||
| 28 | 28 | /** | 
| 29 | 29 | * Construct. | 
| 30 | 30 | * | 
| 31 | - * @param FileLocator $fileLocator | |
| 31 | + * @param FileLocatorInterface $fileLocator | |
| 32 | 32 | */ | 
| 33 | 33 | public function __construct(FileLocatorInterface $fileLocator) | 
| 34 | 34 |      { | 
| @@ -47,7 +47,7 @@ discard block | ||
| 47 | 47 | * Register a loader for given entity class. | 
| 48 | 48 | * | 
| 49 | 49 | * @param string $entityClass | 
| 50 | - * @param string $loader | |
| 50 | + * @param LazyLoaderInterface $loader | |
| 51 | 51 | */ | 
| 52 | 52 | public function registerDoctrineLazyLoader($entityClass, LazyLoaderInterface $loader) | 
| 53 | 53 |      { | 
| @@ -65,7 +65,7 @@ discard block | ||
| 65 | 65 | /** | 
| 66 | 66 | * Retrieve a lazy loader for given class (or not). | 
| 67 | 67 | * | 
| 68 | - * @param object $entityClass | |
| 68 | + * @param object $entity | |
| 69 | 69 | * | 
| 70 | 70 | * @return | 
| 71 | 71 | */ | 
| @@ -17,6 +17,7 @@ discard block | ||
| 17 | 17 |  { | 
| 18 | 18 | /** | 
| 19 | 19 | * @see UserProviderInterface::loadUserByUsername() | 
| 20 | + * @param string $username | |
| 20 | 21 | */ | 
| 21 | 22 | public function loadUserByUsername($username) | 
| 22 | 23 |      { | 
| @@ -52,6 +53,7 @@ discard block | ||
| 52 | 53 | |
| 53 | 54 | /** | 
| 54 | 55 | * @see UserProviderInterface::supportsClass() | 
| 56 | + * @param string $class | |
| 55 | 57 | */ | 
| 56 | 58 | public function supportsClass($class) | 
| 57 | 59 |      { | 
| @@ -13,7 +13,6 @@ | ||
| 13 | 13 | * Hydrate lazy loads delegate into given Collectionnable, if enabled and if | 
| 14 | 14 | * entity supports it. | 
| 15 | 15 | * | 
| 16 | - * @param LazyPropertiesInterface $object (not hinted to help notation and custom exception) | |
| 17 | 16 | * | 
| 18 | 17 | * @return LazyPropertiesInterface | 
| 19 | 18 | */ | 
| @@ -88,6 +88,8 @@ | ||
| 88 | 88 | |
| 89 | 89 | /** | 
| 90 | 90 | * @see LoaderInterface::configureMetadata() | 
| 91 | + * @param string $entityClass | |
| 92 | + * @param string $collectionClass | |
| 91 | 93 | */ | 
| 92 | 94 | public function configureMetadata($entityClass, array $entityProperties, $collectionClass) | 
| 93 | 95 |      { | 
| @@ -38,7 +38,7 @@ discard block | ||
| 38 | 38 | * | 
| 39 | 39 | * @param string $format optional date format | 
| 40 | 40 | * | 
| 41 | - * @return \DateTime|string | |
| 41 | + * @return \DateTime|null | |
| 42 | 42 | */ | 
| 43 | 43 | public function getCreatedAt($format = null) | 
| 44 | 44 |      { | 
| @@ -67,7 +67,7 @@ discard block | ||
| 67 | 67 | * | 
| 68 | 68 | * @param string $format optional date format | 
| 69 | 69 | * | 
| 70 | - * @return \DateTime|string | |
| 70 | + * @return \DateTime|null | |
| 71 | 71 | */ | 
| 72 | 72 | public function getUpdatedAt($format = null) | 
| 73 | 73 |      { | 
| @@ -28,8 +28,7 @@ | ||
| 28 | 28 | protected function formatDateTime(\DateTime $date = null, $format = null) | 
| 29 | 29 |      { | 
| 30 | 30 | return $date && $format ? | 
| 31 | - $date->format($format) : | |
| 32 | - $date | |
| 31 | + $date->format($format) : $date | |
| 33 | 32 | ; | 
| 34 | 33 | } | 
| 35 | 34 | |
| @@ -19,7 +19,6 @@ | ||
| 19 | 19 | /** | 
| 20 | 20 | * define defaultLocale | 
| 21 | 21 | * | 
| 22 | - * @param string $currentLocale | |
| 23 | 22 | * @return self | 
| 24 | 23 | */ | 
| 25 | 24 | public function setDefaultLocale($defaultLocale); | 
| @@ -68,8 +68,7 @@ discard block | ||
| 68 | 68 | */ | 
| 69 | 69 | private function getPropertyAccessor() | 
| 70 | 70 |      { | 
| 71 | - $this->propertyAccessor = $this->propertyAccessor ?: | |
| 72 | - PropertyAccess::createPropertyAccessor() | |
| 71 | + $this->propertyAccessor = $this->propertyAccessor ?: PropertyAccess::createPropertyAccessor() | |
| 73 | 72 | ; | 
| 74 | 73 | |
| 75 | 74 | return $this->propertyAccessor; | 
| @@ -127,8 +126,7 @@ discard block | ||
| 127 | 126 | $propertyAccessor = $this->getPropertyAccessor(); | 
| 128 | 127 |          if (!$this->_has($field)) { | 
| 129 | 128 | return $propertyAccessor->isReadable($object, $field) ? | 
| 130 | - $propertyAccessor->getValue($object, $field) : | |
| 131 | - null | |
| 129 | + $propertyAccessor->getValue($object, $field) : null | |
| 132 | 130 | ; | 
| 133 | 131 | } | 
| 134 | 132 | |
| @@ -157,7 +155,7 @@ discard block | ||
| 157 | 155 | $data = $this->getAttributes()->toArray(); | 
| 158 | 156 | |
| 159 | 157 | $scopes = $this->getScopes(); | 
| 160 | -        if(empty($scopes[$scope])) { | |
| 158 | +        if (empty($scopes[$scope])) { | |
| 161 | 159 | return $data; | 
| 162 | 160 | } | 
| 163 | 161 | |
| @@ -167,11 +165,9 @@ discard block | ||
| 167 | 165 | $normalizedData[$field] = $propertyAccessor->isReadable( | 
| 168 | 166 | $data, | 
| 169 | 167 | $propertyPath = strpos($field, '[') === 0 ? | 
| 170 | - $field : | |
| 171 | -                        sprintf('[%s]', $field) | |
| 168 | +                        $field : sprintf('[%s]', $field) | |
| 172 | 169 | ) ? | 
| 173 | - $propertyAccessor->getValue($data, $propertyPath) : | |
| 174 | - null | |
| 170 | + $propertyAccessor->getValue($data, $propertyPath) : null | |
| 175 | 171 | ; | 
| 176 | 172 | } | 
| 177 | 173 | |
| @@ -36,8 +36,7 @@ | ||
| 36 | 36 | return $this->actionFactory | 
| 37 | 37 | ->createAction($name) | 
| 38 | 38 | ->denormalize(isset($arguments[0]) && is_array($arguments[0]) ? | 
| 39 | - $arguments[0] : | |
| 40 | - array() | |
| 39 | + $arguments[0] : array() | |
| 41 | 40 | ) | 
| 42 | 41 | ->init($relatedEntity, ...$arguments) | 
| 43 | 42 | ; |