public static function castValues(Array $originalArray)
  {
    // Convert booleans and integers
    foreach ($originalArray as $key => $value) {

      // Value casting
      switch (true) {

        // Convert booleans
        case $value === 'true':
          $originalArray[$key] = true;
          break 1;
        case $value === 'false':
          $originalArray[$key] = false;
          break 1;

        // Convert integers
        case is_numeric($value):
          $originalArray[$key] = (int) $value;
          break 1;

        // Convert json
        case is_string($value) && null !== ($jsonToArray = json_decode($value, true)):
          $originalArray[$key] = $jsonToArray;
          break 1;
      }
    }

    // Return modfied array
    return $originalArray;
  }