Back to all rules
What this rule checks
Has a function or class method that returns a value or takes a parameter (composed post-Zita from Marker-only rule 25 + Marker-only rule 28)
Configuration
When off, this rule is excluded from pipeline runs. Changes apply immediately.
Code Examples
PASS — this code satisfies the rule
void setup() {
  size(400, 400);
}

void draw() {
  background(255);
  drawBall(mouseX);
}

void drawBall(float x) {
  ellipse(x, 200, 50, 50);
}
FAIL — this code triggers the rule
void setup() {
  size(400, 400);
}

void draw() {
  background(255);
  drawBall();
}

void drawBall() {  // no parameter, no return value
  ellipse(mouseX, 200, 50, 50);
}
Overview
Category Topic Functions
Level Intermediate
Type Custom Zita
Priority 3 (1 = highest, 5 = lowest)
Status Active
PMD Configuration
Message template No function or method returns a value or takes a parameter.