original_string: private function findUser($id)
      {
          if (is_array($id)) {
              /** @var User $user */
              $model = User::findIdentities($id);
          } else {
              /** @var User $user */
              $model = User::findIdentity($id);
          }
          if ($model !== null) {
              return $model;
          } else {
              throw new NotFoundHttpException('User not found');
          }
      }
code: private function findUser($id)
      {
          if (is_array($id)) {
              /** @var User $user */
              $model = User::findIdentities($id);
          } else {
              /** @var User $user */
              $model = User::findIdentity($id);
          }
          if ($model !== null) {
              return $model;
          } else {
              throw new NotFoundHttpException('User not found');
          }
      }
code_tokens: private function findUser ( $ id ) { if ( is_array ( $ id ) ) { /** @var User $user */ $ model = User :: findIdentities ( $ id ) ; } else { /** @var User $user */ $ model = User :: findIdentity ( $ id ) ; } if ( $ model !== null ) { return $ model ; } else { throw new NotFoundHttpException ( 'User not found' ) ; } }
docstring: Find User model by ID
  
  @param integer|array $id User ID
  
  @return \cubiclab\users\models\User User
  @throws NotFoundHttpException User not found
docstring_tokens: Find User model by ID