Showing 7 of 28 total issues
Function sendEventReminders
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
.onCreate((snapshot, context) => {
const eventData = snapshot.val();
const eventId = context.params.eventId;
// Get the time of the event and calculate the times for the reminders
Method onCreate
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_event_creator);
Method updateEventView
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private void updateEventView(Event event,
TextView title,
TextView description,
Button joinBtn,
Button interestedBtn,
Method editProfileValidation
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static boolean editProfileValidation(EditText nameInput, EditText emailInput, EditText bioInput, RadioButton male, RadioButton female, RadioButton other) {
Method setUpListAdapter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public void setUpListAdapter(Function<FirebaseListOptions.Builder<ChatMessage>, FirebaseListOptions.Builder<ChatMessage>> setLayout,
Function<FirebaseListOptions.Builder<ChatMessage>, FirebaseListOptions.Builder<ChatMessage>> setLifecycleOwner,
BiConsumer<View, ChatMessage> populateView,
Consumer<ListAdapter> setAdapter,
String chatId) {
Method onViewCreated
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
Button ratingEditButton = view.findViewById(R.id.buttonRatingEditProfile);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method generateQRCode
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
public static Bitmap generateQRCode(String data) throws IllegalArgumentException {
if (data == null || data.isEmpty()) {
throw new IllegalArgumentException("Data cannot be null or empty");
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"