original_string: protected function normalize($data)
      {
          if (null === $data || is_scalar($data)) {
              return $data;
          }
  
          if (is_array($data)) {
              foreach ($data as $key => $val) {
                  $data[$key] = $this->normalize($val);
              }
  
              return $data;
          }
  
          throw new \RuntimeException('An unexpected value could not be normalized: '.var_export($data, true));
      }
code: protected function normalize($data)
      {
          if (null === $data || is_scalar($data)) {
              return $data;
          }
  
          if (is_array($data)) {
              foreach ($data as $key => $val) {
                  $data[$key] = $this->normalize($val);
              }
  
              return $data;
          }
  
          throw new \RuntimeException('An unexpected value could not be normalized: '.var_export($data, true));
      }
code_tokens: protected function normalize ( $ data ) { if ( null === $ data || is_scalar ( $ data ) ) { return $ data ; } if ( is_array ( $ data ) ) { foreach ( $ data as $ key => $ val ) { $ data [ $ key ] = $ this -> normalize ( $ val ) ; } return $ data ; } throw new \ RuntimeException ( 'An unexpected value could not be normalized: ' . var_export ( $ data , true ) ) ; }
docstring: Normalize php data for mongo
  
  This code chunk was inspired by the Symfony framework
  and is subject to the MIT license. Please see the LICENCE
  at https://github.com/symfony/symfony
  
  (c) Fabien Potencier <fabien@symfony.com>
  Author Nils Adermann <naderman@naderman.de>
  
  @param mixed $data
  
  @return mixed
docstring_tokens: Normalize php data for mongo