original_string: protected function recursiveToArray($item)
      {
          if (is_array($item)) {
  
              foreach ($item as &$subitem) {
                  $subitem = $this->recursiveToArray($subitem);
              }
  
              unset($subitem);
  
              return $item;
          }
  
          if ($item instanceof Arrayable) {
              return $item->toArray();
          }
  
          return $item;
      }
code: protected function recursiveToArray($item)
      {
          if (is_array($item)) {
  
              foreach ($item as &$subitem) {
                  $subitem = $this->recursiveToArray($subitem);
              }
  
              unset($subitem);
  
              return $item;
          }
  
          if ($item instanceof Arrayable) {
              return $item->toArray();
          }
  
          return $item;
      }
code_tokens: protected function recursiveToArray ( $ item ) { if ( is_array ( $ item ) ) { foreach ( $ item as & $ subitem ) { $ subitem = $ this -> recursiveToArray ( $ subitem ) ; } unset ( $ subitem ) ; return $ item ; } if ( $ item instanceof Arrayable ) { return $ item -> toArray ( ) ; } return $ item ; }
docstring: Recursively converts parameter to array
  
  @param mixed $item
  @return array|string
docstring_tokens: Recursively converts parameter to array