original_string: public static function findByPasswordResetToken($token, $status = self::STATUS_ACTIVE)
      {
          if (!static::isPasswordResetTokenValid($token)) {
              return null;
          }
          if ($status == null) {
              return static::find()->where(['password_reset_token' => $token])->limit(1)->one();
          }
          return static::find()->where(['password_reset_token' => $token, 'status' => $status])->limit(1)->one();
      }
code: public static function findByPasswordResetToken($token, $status = self::STATUS_ACTIVE)
      {
          if (!static::isPasswordResetTokenValid($token)) {
              return null;
          }
          if ($status == null) {
              return static::find()->where(['password_reset_token' => $token])->limit(1)->one();
          }
          return static::find()->where(['password_reset_token' => $token, 'status' => $status])->limit(1)->one();
      }
code_tokens: public static function findByPasswordResetToken ( $ token , $ status = self :: STATUS_ACTIVE ) { if ( ! static :: isPasswordResetTokenValid ( $ token ) ) { return null ; } if ( $ status == null ) { return static :: find ( ) -> where ( [ 'password_reset_token' => $ token ] ) -> limit ( 1 ) -> one ( ) ; } return static :: find ( ) -> where ( [ 'password_reset_token' => $ token , 'status' => $ status ] ) -> limit ( 1 ) -> one ( ) ; }
docstring: Finds user of given status by password reset token
  @param string $token password reset token
  @param string|null $status user status or null
  @return static|null
docstring_tokens: Finds user of given status by password reset token