original_string: protected function parseRequest(ServerRequestInterface $request): array
      {
          $method = $request->getMethod();
          if (!\in_array($method, ['PUT', 'POST', 'PATCH'])) {
              throw new \RuntimeException(sprintf('FlexForm: Bad HTTP method %s', $method));
          }
  
          $body = $request->getParsedBody();
          $data = isset($body['data']) ? $this->decodeData($body['data']) : null;
  
          $flash = $this->getFlash();
          /*
          if (null !== $data) {
              $flash->setData($data);
              $flash->save();
          }
          */
  
          $blueprint = $this->getBlueprint();
          $includeOriginal = (bool)($blueprint->form()['images']['original'] ?? null);
          $files = $flash->getFilesByFields($includeOriginal);
  
          $data = $blueprint->processForm($data ?? [], $body['toggleable_data'] ?? []);
  
          return [
              $data,
              $files ?? []
          ];
      }
code: protected function parseRequest(ServerRequestInterface $request): array
      {
          $method = $request->getMethod();
          if (!\in_array($method, ['PUT', 'POST', 'PATCH'])) {
              throw new \RuntimeException(sprintf('FlexForm: Bad HTTP method %s', $method));
          }
  
          $body = $request->getParsedBody();
          $data = isset($body['data']) ? $this->decodeData($body['data']) : null;
  
          $flash = $this->getFlash();
          /*
          if (null !== $data) {
              $flash->setData($data);
              $flash->save();
          }
          */
  
          $blueprint = $this->getBlueprint();
          $includeOriginal = (bool)($blueprint->form()['images']['original'] ?? null);
          $files = $flash->getFilesByFields($includeOriginal);
  
          $data = $blueprint->processForm($data ?? [], $body['toggleable_data'] ?? []);
  
          return [
              $data,
              $files ?? []
          ];
      }
code_tokens: protected function parseRequest ( ServerRequestInterface $ request ) : array { $ method = $ request -> getMethod ( ) ; if ( ! \ in_array ( $ method , [ 'PUT' , 'POST' , 'PATCH' ] ) ) { throw new \ RuntimeException ( sprintf ( 'FlexForm: Bad HTTP method %s' , $ method ) ) ; } $ body = $ request -> getParsedBody ( ) ; $ data = isset ( $ body [ 'data' ] ) ? $ this -> decodeData ( $ body [ 'data' ] ) : null ; $ flash = $ this -> getFlash ( ) ; /*
          if (null !== $data) {
              $flash->setData($data);
              $flash->save();
          }
          */ $ blueprint = $ this -> getBlueprint ( ) ; $ includeOriginal = ( bool ) ( $ blueprint -> form ( ) [ 'images' ] [ 'original' ] ?? null ) ; $ files = $ flash -> getFilesByFields ( $ includeOriginal ) ; $ data = $ blueprint -> processForm ( $ data ?? [ ] , $ body [ 'toggleable_data' ] ?? [ ] ) ; return [ $ data , $ files ?? [ ] ] ; }
docstring: Parse PSR-7 ServerRequest into data and files.
  
  @param ServerRequestInterface $request
  @return array
docstring_tokens: Parse PSR - 7 ServerRequest into data and files .