original_string: protected function getParsedBodyParam(ServerRequestInterface $request, $param_name, $default = null)
      {
          $parsed_body = $request->getParsedBody();
  
          if ($parsed_body) {
              if (is_array($parsed_body) && array_key_exists($param_name, $parsed_body)) {
                  return $parsed_body[$param_name];
              } elseif (is_object($parsed_body) && property_exists($parsed_body, $param_name)) {
                  return $parsed_body->$param_name;
              }
          }
  
          return $default;
      }
code: protected function getParsedBodyParam(ServerRequestInterface $request, $param_name, $default = null)
      {
          $parsed_body = $request->getParsedBody();
  
          if ($parsed_body) {
              if (is_array($parsed_body) && array_key_exists($param_name, $parsed_body)) {
                  return $parsed_body[$param_name];
              } elseif (is_object($parsed_body) && property_exists($parsed_body, $param_name)) {
                  return $parsed_body->$param_name;
              }
          }
  
          return $default;
      }
code_tokens: protected function getParsedBodyParam ( ServerRequestInterface $ request , $ param_name , $ default = null ) { $ parsed_body = $ request -> getParsedBody ( ) ; if ( $ parsed_body ) { if ( is_array ( $ parsed_body ) && array_key_exists ( $ param_name , $ parsed_body ) ) { return $ parsed_body [ $ param_name ] ; } elseif ( is_object ( $ parsed_body ) && property_exists ( $ parsed_body , $ param_name ) ) { return $ parsed_body -> $ param_name ; } } return $ default ; }
docstring: Return a param from a parsed body.
  
  This method is NULL or object safe - it will check for body type, and do it's best to return a value without
  breaking or throwing a warning.
  
  @param  ServerRequestInterface $request
  @param                         $param_name
  @param  null                   $default
  @return mixed|null
docstring_tokens: Return a param from a parsed body .