original_string: public function confirmPetition(string $token, string $email)
      {
          $petition = $this->emailChangePetitions()
              ->unconfirmedByTokenAndEmail($token, $email)
              ->first();
  
          if (! is_null($petition)) {
              $petition->confirmed();
          }
  
          $this->email = $email;
          $this->save();
      }
code: public function confirmPetition(string $token, string $email)
      {
          $petition = $this->emailChangePetitions()
              ->unconfirmedByTokenAndEmail($token, $email)
              ->first();
  
          if (! is_null($petition)) {
              $petition->confirmed();
          }
  
          $this->email = $email;
          $this->save();
      }
code_tokens: public function confirmPetition ( string $ token , string $ email ) { $ petition = $ this -> emailChangePetitions ( ) -> unconfirmedByTokenAndEmail ( $ token , $ email ) -> first ( ) ; if ( ! is_null ( $ petition ) ) { $ petition -> confirmed ( ) ; } $ this -> email = $ email ; $ this -> save ( ) ; }
docstring: Mark a found petition by the given token and email as confirmed.
  
  @param  string $token
  @param  string $email
  
  @return void
docstring_tokens: Mark a found petition by the given token and email as confirmed .