original_string: protected function shortenFontWeights($content)
      {
          $weights = array(
              'normal' => 400,
              'bold' => 700,
          );
  
          $callback = function ($match) use ($weights) {
              return $match[1].$weights[$match[2]];
          };
  
          return preg_replace_callback('/(font-weight\s*:\s*)('.implode('|', array_keys($weights)).')(?=[;}])/', $callback, $content);
      }
code: protected function shortenFontWeights($content)
      {
          $weights = array(
              'normal' => 400,
              'bold' => 700,
          );
  
          $callback = function ($match) use ($weights) {
              return $match[1].$weights[$match[2]];
          };
  
          return preg_replace_callback('/(font-weight\s*:\s*)('.implode('|', array_keys($weights)).')(?=[;}])/', $callback, $content);
      }
code_tokens: protected function shortenFontWeights ( $ content ) { $ weights = array ( 'normal' => 400 , 'bold' => 700 , ) ; $ callback = function ( $ match ) use ( $ weights ) { return $ match [ 1 ] . $ weights [ $ match [ 2 ] ] ; } ; return preg_replace_callback ( '/(font-weight\s*:\s*)(' . implode ( '|' , array_keys ( $ weights ) ) . ')(?=[;}])/' , $ callback , $ content ) ; }
docstring: Shorten CSS font weights.
  
  @param string $content The CSS content to shorten the font weights for
  
  @return string
docstring_tokens: Shorten CSS font weights .