Skip to content

[WIP] minor [Serializer] Fix CS #12127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 4, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Symfony/Component/Serializer/Encoder/JsonEncode.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function supportsEncoding($format)
/**
* Merge default json encode options with context.
*
* @param array $context
* @param array $context
*
* @return array
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function denormalize($data, $class, $format = null, array $context = arra
* As option, if attribute name is found on camelizedAttributes array
* returns attribute name in camelcase format.
*
* @param string $attributeName
* @param string $attributeName
*
* @return string
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function denormalize($data, $class, $format = null, array $context = arra
unset($data[$paramName]);
} elseif (!$constructorParameter->isOptional()) {
throw new RuntimeException(sprintf(
'Cannot create an instance of %s from serialized data because ' .
'Cannot create an instance of %s from serialized data because '.
'its constructor requires parameter "%s" to be present.',
$class,
$constructorParameter->name
Expand All @@ -140,7 +140,7 @@ public function denormalize($data, $class, $format = null, array $context = arra

$object = $reflectionClass->newInstanceArgs($params);
} else {
$object = new $class;
$object = new $class();
}

foreach ($data as $propertyName => $value) {
Expand All @@ -162,15 +162,15 @@ public function denormalize($data, $class, $format = null, array $context = arra
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function supportsNormalization($data, $format = null)
{
return is_object($data) && $this->supports(get_class($data));
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function supportsDenormalization($data, $type, $format = null)
{
Expand All @@ -181,6 +181,7 @@ public function supportsDenormalization($data, $type, $format = null)
* Format an attribute name, for example to convert a snake_case name to camelCase.
*
* @param string $attributeName
*
* @return string
*/
protected function formatAttribute($attributeName)
Expand All @@ -199,7 +200,7 @@ protected function formatAttribute($attributeName)
*
* @param string $class
*
* @return Boolean
* @return bool
*/
private function supports($class)
{
Expand Down