original_string: public function getBy(array $condition) : User
      {
          if (!$user = User::find()->andWhere($condition)->limit(1)->one()) {
              throw new NotFoundException($this->i18n->t('setrun/user', 'User not found'));
          }
          return $user;
      }
code: public function getBy(array $condition) : User
      {
          if (!$user = User::find()->andWhere($condition)->limit(1)->one()) {
              throw new NotFoundException($this->i18n->t('setrun/user', 'User not found'));
          }
          return $user;
      }
code_tokens: public function getBy ( array $ condition ) : User { if ( ! $ user = User :: find ( ) -> andWhere ( $ condition ) -> limit ( 1 ) -> one ( ) ) { throw new NotFoundException ( $ this -> i18n -> t ( 'setrun/user' , 'User not found' ) ) ; } return $ user ; }
docstring: Get user by condition.
  @param array $condition
  @return User|array
docstring_tokens: Get user by condition .