original_string: protected function manipulateRuleValues(array $rules) {
          $finalrules = [];
  
          foreach ($rules as $rule) {
              $property = $rule->getRule();
              $value = $rule->getValue();
  
              if ($property === 'position' && $value === 'sticky') {
                  $newrule = clone $rule;
                  $newrule->setValue('-webkit-sticky');
                  $finalrules[] = $newrule;
  
              } else if ($property === 'background-image' &&
                      $value instanceof CSSFunction &&
                      $value->getName() === 'linear-gradient') {
  
                  foreach (['-webkit-', '-o-'] as $prefix) {
                      $newfunction = clone $value;
                      $newfunction->setName($prefix . $value->getName());
                      $newrule = clone $rule;
                      $newrule->setValue($newfunction);
                      $finalrules[] = $newrule;
                  }
              }
  
              $finalrules[] = $rule;
          }
  
          return $finalrules;
      }
code: protected function manipulateRuleValues(array $rules) {
          $finalrules = [];
  
          foreach ($rules as $rule) {
              $property = $rule->getRule();
              $value = $rule->getValue();
  
              if ($property === 'position' && $value === 'sticky') {
                  $newrule = clone $rule;
                  $newrule->setValue('-webkit-sticky');
                  $finalrules[] = $newrule;
  
              } else if ($property === 'background-image' &&
                      $value instanceof CSSFunction &&
                      $value->getName() === 'linear-gradient') {
  
                  foreach (['-webkit-', '-o-'] as $prefix) {
                      $newfunction = clone $value;
                      $newfunction->setName($prefix . $value->getName());
                      $newrule = clone $rule;
                      $newrule->setValue($newfunction);
                      $finalrules[] = $newrule;
                  }
              }
  
              $finalrules[] = $rule;
          }
  
          return $finalrules;
      }
code_tokens: protected function manipulateRuleValues ( array $ rules ) { $ finalrules = [ ] ; foreach ( $ rules as $ rule ) { $ property = $ rule -> getRule ( ) ; $ value = $ rule -> getValue ( ) ; if ( $ property === 'position' && $ value === 'sticky' ) { $ newrule = clone $ rule ; $ newrule -> setValue ( '-webkit-sticky' ) ; $ finalrules [ ] = $ newrule ; } else if ( $ property === 'background-image' && $ value instanceof CSSFunction && $ value -> getName ( ) === 'linear-gradient' ) { foreach ( [ '-webkit-' , '-o-' ] as $ prefix ) { $ newfunction = clone $ value ; $ newfunction -> setName ( $ prefix . $ value -> getName ( ) ) ; $ newrule = clone $ rule ; $ newrule -> setValue ( $ newfunction ) ; $ finalrules [ ] = $ newrule ; } } $ finalrules [ ] = $ rule ; } return $ finalrules ; }
docstring: Manipulate an array of rules to adapt their values.
  
  @param array $rules The rules.
  @return New array of rules.
docstring_tokens: Manipulate an array of rules to adapt their values .