original_string: public function changePassword(string $newPassword, string $oldPassword): bool
      {
          //verfy password match
          if ($this->passwordUtility->verify($oldPassword, $this->password)) {
  
              //if match set new password
              $this->password = $this->passwordUtility->hash($newPassword);
  
              return true;
          }
  
          return false;
      }
code: public function changePassword(string $newPassword, string $oldPassword): bool
      {
          //verfy password match
          if ($this->passwordUtility->verify($oldPassword, $this->password)) {
  
              //if match set new password
              $this->password = $this->passwordUtility->hash($newPassword);
  
              return true;
          }
  
          return false;
      }
code_tokens: public function changePassword ( string $ newPassword , string $ oldPassword ) : bool { //verfy password match if ( $ this -> passwordUtility -> verify ( $ oldPassword , $ this -> password ) ) { //if match set new password $ this -> password = $ this -> passwordUtility -> hash ( $ newPassword ) ; return true ; } return false ; }
docstring: Change user password only after check old password.
  
  <pre><code class="php">$password = new Password();
  
  $user = new User($password);
  
  $user->changePassword('newPassword', 'oldPassword');
  </code></pre>
  
  @param string $newPassword
  @param string $oldPassword
  
  @return bool
docstring_tokens: Change user password only after check old password .