original_string: protected function resolveMaxAttempts($request, $maxAttempts)
      {
          if (Str::contains($maxAttempts, '|')) {
              $maxAttempts = explode('|', $maxAttempts, 2)[$request->user() ? 1 : 0];
          }
  
          if (! is_numeric($maxAttempts) && $request->user()) {
              $maxAttempts = $request->user()->{$maxAttempts};
          }
  
          return (int) $maxAttempts;
      }
code: protected function resolveMaxAttempts($request, $maxAttempts)
      {
          if (Str::contains($maxAttempts, '|')) {
              $maxAttempts = explode('|', $maxAttempts, 2)[$request->user() ? 1 : 0];
          }
  
          if (! is_numeric($maxAttempts) && $request->user()) {
              $maxAttempts = $request->user()->{$maxAttempts};
          }
  
          return (int) $maxAttempts;
      }
code_tokens: protected function resolveMaxAttempts ( $ request , $ maxAttempts ) { if ( Str :: contains ( $ maxAttempts , '|' ) ) { $ maxAttempts = explode ( '|' , $ maxAttempts , 2 ) [ $ request -> user ( ) ? 1 : 0 ] ; } if ( ! is_numeric ( $ maxAttempts ) && $ request -> user ( ) ) { $ maxAttempts = $ request -> user ( ) -> { $ maxAttempts } ; } return ( int ) $ maxAttempts ; }
docstring: Resolve the number of attempts if the user is authenticated or not.
  
  @param  \Illuminate\Http\Request  $request
  @param  int|string  $maxAttempts
  @return int
docstring_tokens: Resolve the number of attempts if the user is authenticated or not .