Skip to content

Commit

Permalink
codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpts committed Mar 17, 2016
1 parent cbd4e85 commit 4db662e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/PTS/DataTransformer/Types/BoolType.php
Expand Up @@ -9,7 +9,7 @@ class BoolType
*/
public function toModel($value)
{
return (bool)$value;
return (bool) $value;
}

/**
Expand All @@ -18,6 +18,6 @@ public function toModel($value)
*/
public function toData($value)
{
return (bool)$value;
return (bool) $value;
}
}
4 changes: 2 additions & 2 deletions src/PTS/DataTransformer/Types/FloatType.php
Expand Up @@ -9,7 +9,7 @@ class FloatType
*/
public function toModel($value)
{
return (float)$value;
return (float) $value;
}

/**
Expand All @@ -18,6 +18,6 @@ public function toModel($value)
*/
public function toData($value)
{
return (float)$value;
return (float) $value;
}
}
4 changes: 2 additions & 2 deletions src/PTS/DataTransformer/Types/IntType.php
Expand Up @@ -9,7 +9,7 @@ class IntType
*/
public function toModel($value)
{
return (int)$value;
return (int) $value;
}

/**
Expand All @@ -18,6 +18,6 @@ public function toModel($value)
*/
public function toData($value)
{
return (int)$value;
return (int) $value;
}
}
6 changes: 4 additions & 2 deletions src/PTS/DataTransformer/Types/RefModelType.php
Expand Up @@ -9,7 +9,9 @@ class RefModelType
*/
public function toData($value)
{
return $value->getId();
return property_exists($value, 'getId')
? $value->getId()
: $value;
}

/**
Expand All @@ -18,6 +20,6 @@ public function toData($value)
*/
public function toModel($value)
{
return (string)$value;
return (string) $value;
}
}
Expand Up @@ -15,7 +15,7 @@ public function toData(array $value)
{
$newValue = [];
foreach ($value as $model) {
$relId = is_object($model) ? $model->getId() : (string)$model;
$relId = is_object($model) ? $model->getId() : (string) $model;
$newValue[] = $relId;
}

Expand Down
4 changes: 2 additions & 2 deletions src/PTS/DataTransformer/Types/StringType.php
Expand Up @@ -9,7 +9,7 @@ class StringType
*/
public function toModel($value)
{
return (string)$value;
return (string) $value;
}

/**
Expand All @@ -18,6 +18,6 @@ public function toModel($value)
*/
public function toData($value)
{
return (string)$value;
return (string) $value;
}
}

0 comments on commit 4db662e

Please sign in to comment.