original_string: private function calculateYIQValue(RGB $color)
      {
          $yiq = (($color->getRed() * 299) + ($color->getGreen() * 587) + ($color->getBlue() * 114)) / 1000;
          return $yiq;
      }
code: private function calculateYIQValue(RGB $color)
      {
          $yiq = (($color->getRed() * 299) + ($color->getGreen() * 587) + ($color->getBlue() * 114)) / 1000;
          return $yiq;
      }
code_tokens: private function calculateYIQValue ( RGB $ color ) { $ yiq = ( ( $ color -> getRed ( ) * 299 ) + ( $ color -> getGreen ( ) * 587 ) + ( $ color -> getBlue ( ) * 114 ) ) / 1000 ; return $ yiq ; }
docstring: calculates the YIQ value for a given color.
  
  @param RGB $color
  
  @return float 0-255
docstring_tokens: calculates the YIQ value for a given color .