original_string: public function makePetitionFor($new_email)
      {
          $petition = $this->emailChangePetitions()
              ->unconfirmedByEmail($new_email)
              ->first();
  
          if (! is_null($petition)) {
              $petition->refresh();
              return $petition->fresh();
          }
  
          return $this->emailChangePetitions()->create([
              'expires_at' => \Carbon\Carbon::now()->addMonth(),
              'old_email' => $this->email,
              'new_email' => $new_email,
              'token' => str_random(60),
          ]);
      }
code: public function makePetitionFor($new_email)
      {
          $petition = $this->emailChangePetitions()
              ->unconfirmedByEmail($new_email)
              ->first();
  
          if (! is_null($petition)) {
              $petition->refresh();
              return $petition->fresh();
          }
  
          return $this->emailChangePetitions()->create([
              'expires_at' => \Carbon\Carbon::now()->addMonth(),
              'old_email' => $this->email,
              'new_email' => $new_email,
              'token' => str_random(60),
          ]);
      }
code_tokens: public function makePetitionFor ( $ new_email ) { $ petition = $ this -> emailChangePetitions ( ) -> unconfirmedByEmail ( $ new_email ) -> first ( ) ; if ( ! is_null ( $ petition ) ) { $ petition -> refresh ( ) ; return $ petition -> fresh ( ) ; } return $ this -> emailChangePetitions ( ) -> create ( [ 'expires_at' => \ Carbon \ Carbon :: now ( ) -> addMonth ( ) , 'old_email' => $ this -> email , 'new_email' => $ new_email , 'token' => str_random ( 60 ) , ] ) ; }
docstring: Make a new email change petition with the given data.
  
  @param  array $data
  
  @return self
docstring_tokens: Make a new email change petition with the given data .