for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Drupal\graphql\Utility;
class JsonHelper {
/**
* @param array $values
*
* @return array
*/
public static function decodeParams(array $values = []) {
return array_map(function($value) {
if (!is_string($value)) {
return $value;
}
if (($decoded = json_decode($value, TRUE)) !== NULL && $decoded != $value) {
return static::decodeParams($decoded);
}, $values);