original_string: protected function isDuplicateUserAppRole($uar)
      {
          $userId = $uar['user_id'];
          $appId = $uar['app_id'];
          $roleId = $uar['role_id'];
  
          return UserAppRole::whereRaw(
              "user_id = '$userId' AND 
              role_id = '$roleId' AND 
              app_id = '$appId'"
          )->exists();
      }
code: protected function isDuplicateUserAppRole($uar)
      {
          $userId = $uar['user_id'];
          $appId = $uar['app_id'];
          $roleId = $uar['role_id'];
  
          return UserAppRole::whereRaw(
              "user_id = '$userId' AND 
              role_id = '$roleId' AND 
              app_id = '$appId'"
          )->exists();
      }
code_tokens: protected function isDuplicateUserAppRole ( $ uar ) { $ userId = $ uar [ 'user_id' ] ; $ appId = $ uar [ 'app_id' ] ; $ roleId = $ uar [ 'role_id' ] ; return UserAppRole :: whereRaw ( "user_id = '$userId' AND 
              role_id = '$roleId' AND 
              app_id = '$appId'" ) -> exists ( ) ; }
docstring: Checks for duplicate user_to_app_to_role relation.
  
  @param $uar
  
  @return bool
docstring_tokens: Checks for duplicate user_to_app_to_role relation .