original_string: public static function last($user = null)
      {
          if (!User::isValid($user)) {
              throw new InvalidParamException('User Invalid.');
          }
          return static::find()->createdBy($user)->orderByCreatedAt(SORT_DESC)->one();
      }
code: public static function last($user = null)
      {
          if (!User::isValid($user)) {
              throw new InvalidParamException('User Invalid.');
          }
          return static::find()->createdBy($user)->orderByCreatedAt(SORT_DESC)->one();
      }
code_tokens: public static function last ( $ user = null ) { if ( ! User :: isValid ( $ user ) ) { throw new InvalidParamException ( 'User Invalid.' ) ; } return static :: find ( ) -> createdBy ( $ user ) -> orderByCreatedAt ( SORT_DESC ) -> one ( ) ; }
docstring: Get last password hash.
  
  @param User $user
  @return static
  @throws InvalidParamException throw if user invalid.
docstring_tokens: Get last password hash .