original_string: public static function update_competency($competency) {
          $params = self::validate_parameters(self::update_competency_parameters(), array(
              'competency' => $competency
          ));
          $params = $params['competency'];
  
          $competency = api::read_competency($params['id']);
          self::validate_context($competency->get_context());
  
          $params = (object) $params;
  
          return api::update_competency($params);
      }
code: public static function update_competency($competency) {
          $params = self::validate_parameters(self::update_competency_parameters(), array(
              'competency' => $competency
          ));
          $params = $params['competency'];
  
          $competency = api::read_competency($params['id']);
          self::validate_context($competency->get_context());
  
          $params = (object) $params;
  
          return api::update_competency($params);
      }
code_tokens: public static function update_competency ( $ competency ) { $ params = self :: validate_parameters ( self :: update_competency_parameters ( ) , array ( 'competency' => $ competency ) ) ; $ params = $ params [ 'competency' ] ; $ competency = api :: read_competency ( $ params [ 'id' ] ) ; self :: validate_context ( $ competency -> get_context ( ) ) ; $ params = ( object ) $ params ; return api :: update_competency ( $ params ) ; }
docstring: Update an existing competency
  
  @param array $competency The array of competency fields (id is required).
  @return boolean
docstring_tokens: Update an existing competency