original_string: protected function assertUploadedFilesStructure(array $uploadedFiles, $groupKey = null)
      {
          foreach ($uploadedFiles as $key => $item) {
              $parameterKey = isset($groupKey) ? "{$groupKey}[{$key}]" : $key;
              
              if (is_array($item)) {
                  $this->assertUploadedFilesStructure($item, $parameterKey);
              } elseif (!$item instanceof UploadedFileInterface) {
                  throw new \InvalidArgumentException("'$parameterKey' is not an UploadedFileInterface object, but a "
                      . (is_object($item) ? get_class($item) . ' ' : '') . gettype($item));
              }
          }
      }
code: protected function assertUploadedFilesStructure(array $uploadedFiles, $groupKey = null)
      {
          foreach ($uploadedFiles as $key => $item) {
              $parameterKey = isset($groupKey) ? "{$groupKey}[{$key}]" : $key;
              
              if (is_array($item)) {
                  $this->assertUploadedFilesStructure($item, $parameterKey);
              } elseif (!$item instanceof UploadedFileInterface) {
                  throw new \InvalidArgumentException("'$parameterKey' is not an UploadedFileInterface object, but a "
                      . (is_object($item) ? get_class($item) . ' ' : '') . gettype($item));
              }
          }
      }
code_tokens: protected function assertUploadedFilesStructure ( array $ uploadedFiles , $ groupKey = null ) { foreach ( $ uploadedFiles as $ key => $ item ) { $ parameterKey = isset ( $ groupKey ) ? "{$groupKey}[{$key}]" : $ key ; if ( is_array ( $ item ) ) { $ this -> assertUploadedFilesStructure ( $ item , $ parameterKey ) ; } elseif ( ! $ item instanceof UploadedFileInterface ) { throw new \ InvalidArgumentException ( "'$parameterKey' is not an UploadedFileInterface object, but a " . ( is_object ( $ item ) ? get_class ( $ item ) . ' ' : '' ) . gettype ( $ item ) ) ; } } }
docstring: Assert that each leaf is an UploadedFileInterface
  
  @param array  $uploadedFiles
  @param string $groupKey
  @throws \InvalidArgumentException if an invalid structure is provided.
docstring_tokens: Assert that each leaf is an UploadedFileInterface