Example #1
0
 /**
  * It adds the given goal to the list of goals.
  *
  * This function adds the given goal to this experiment's goal list. If the
  * given goal is the main goal, it's added in the first position.
  *
  * @param NelioABGoal $goal The goal to add.
  *
  * @return void
  *
  * @since 1.4.0
  */
 public function add_goal($goal)
 {
     if ($goal->is_main_goal()) {
         array_unshift($this->goals, $goal);
     } else {
         array_push($this->goals, $goal);
     }
 }