@@ -48,8 +48,7 @@ discard block |
||
| 48 | 48 | * </output> |
| 49 | 49 | * |
| 50 | 50 | */ |
| 51 | -class JsonViewHelper extends AbstractViewHelper |
|
| 52 | -{ |
|
| 51 | +class JsonViewHelper extends AbstractViewHelper { |
|
| 53 | 52 | /** |
| 54 | 53 | * Applies json_encode() on the specified value. |
| 55 | 54 | * |
@@ -64,8 +63,7 @@ discard block |
||
| 64 | 63 | * @see http://www.php.net/manual/en/function.json-encode.php |
| 65 | 64 | * @return string |
| 66 | 65 | */ |
| 67 | - public static function render(array $value, $forceObject = false) |
|
| 68 | - { |
|
| 66 | + public static function render(array $value, $forceObject = false) { |
|
| 69 | 67 | $options = JSON_HEX_TAG; |
| 70 | 68 | if ($forceObject !== false) { |
| 71 | 69 | $options = $options | JSON_FORCE_OBJECT; |
@@ -64,10 +64,10 @@ |
||
| 64 | 64 | * @see http://www.php.net/manual/en/function.json-encode.php |
| 65 | 65 | * @return string |
| 66 | 66 | */ |
| 67 | - public static function render(array $value, $forceObject = false) |
|
| 67 | + public static function render(array $value, $forceObject = FALSE) |
|
| 68 | 68 | { |
| 69 | 69 | $options = JSON_HEX_TAG; |
| 70 | - if ($forceObject !== false) { |
|
| 70 | + if ($forceObject !== FALSE) { |
|
| 71 | 71 | $options = $options | JSON_FORCE_OBJECT; |
| 72 | 72 | } |
| 73 | 73 | return json_encode($value, $options); |