original_string: protected function extractForFromForwardedHeader($forwarded)
      {
          $ips = [];
          $parts = array_map('trim', explode(',', $forwarded));
          
          foreach ($parts as $part) {
              list($key, $value) = explode('=', $part, 2) + [1 => null];
              
              if ($key === 'for') {
                  $ips[] = trim($value, '[]');
              }
          }
          
          return $ips;
      }
code: protected function extractForFromForwardedHeader($forwarded)
      {
          $ips = [];
          $parts = array_map('trim', explode(',', $forwarded));
          
          foreach ($parts as $part) {
              list($key, $value) = explode('=', $part, 2) + [1 => null];
              
              if ($key === 'for') {
                  $ips[] = trim($value, '[]');
              }
          }
          
          return $ips;
      }
code_tokens: protected function extractForFromForwardedHeader ( $ forwarded ) { $ ips = [ ] ; $ parts = array_map ( 'trim' , explode ( ',' , $ forwarded ) ) ; foreach ( $ parts as $ part ) { list ( $ key , $ value ) = explode ( '=' , $ part , 2 ) + [ 1 => null ] ; if ( $ key === 'for' ) { $ ips [ ] = trim ( $ value , '[]' ) ; } } return $ ips ; }
docstring: Extract the `for` part from the Forwarded header
  
  @param string $forwarded
  @return string
docstring_tokens: Extract the for part from the Forwarded header