Skip to content

Commit

Permalink
Fix declaration of inheritable function #2946
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Jul 4, 2019
1 parent 090e7ab commit f6b1677
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 36 deletions.
2 changes: 1 addition & 1 deletion main/exercise/Annotation.php
Expand Up @@ -127,7 +127,7 @@ public function processAnswersCreation($form, $exercise)
/**
* {@inheritdoc}
*/
public function return_header($exercise, $counter = null, $score = [])
public function return_header(Exercise $exercise, $counter = null, $score = [])
{
$score['revised'] = $this->isQuestionWaitingReview($score);

Expand Down
2 changes: 1 addition & 1 deletion main/exercise/Draggable.php
Expand Up @@ -210,7 +210,7 @@ public function processAnswersCreation($form, $exercise)
/**
* {@inheritdoc}
*/
public function return_header($exercise, $counter = null, $score = null)
public function return_header(Exercise $exercise, $counter = null, $score = [])
{
$header = parent::return_header($exercise, $counter, $score);
$header .= '<table class="'.$this->question_table_class.'"><tr>';
Expand Down
2 changes: 1 addition & 1 deletion main/exercise/MatchingDraggable.php
Expand Up @@ -260,7 +260,7 @@ public function processAnswersCreation($form, $exercise)
/**
* {@inheritdoc}
*/
public function return_header($exercise, $counter = null, $score = null)
public function return_header(Exercise $exercise, $counter = null, $score = [])
{
$header = parent::return_header($exercise, $counter, $score);
$header .= '<table class="matching '.$this->question_table_class.'"><tr>';
Expand Down
10 changes: 2 additions & 8 deletions main/exercise/MultipleAnswerTrueFalseDegreeCertainty.php
Expand Up @@ -301,15 +301,9 @@ public function processAnswersCreation($form, $exercise)
}

/**
* Show result table headers.
*
* @param Exercise $exercise
* @param int $counter
* @param float $score
*
* @return string|null
* {@inheritdoc}
*/
public function return_header($exercise, $counter = null, $score = null)
public function return_header(Exercise $exercise, $counter = null, $score = [])
{
$header = parent::return_header($exercise, $counter, $score);
$header .= '<table class="'
Expand Down
8 changes: 2 additions & 6 deletions main/exercise/UniqueAnswerImage.php
Expand Up @@ -371,13 +371,9 @@ public function processAnswersCreation($form, $exercise)
}

/**
* @param Exercise $exercise
* @param null $counter
* @param null $score
*
* @return string
* {@inheritdoc}
*/
public function return_header($exercise, $counter = null, $score = null)
public function return_header(Exercise $exercise, $counter = null, $score = [])
{
if ($exercise->showExpectedChoice()) {
$header = '<table class="'.$this->question_table_class.'">
Expand Down
2 changes: 1 addition & 1 deletion main/exercise/calculated_answer.class.php
Expand Up @@ -245,7 +245,7 @@ public function processAnswersCreation($form, $exercise)
/**
* {@inheritdoc}
*/
public function return_header($exercise, $counter = null, $score = null)
public function return_header(Exercise $exercise, $counter = null, $score = [])
{
$header = parent::return_header($exercise, $counter, $score);
$header .= '<table class="'.$this->question_table_class.'"><tr>';
Expand Down
2 changes: 1 addition & 1 deletion main/exercise/fill_blanks.class.php
Expand Up @@ -484,7 +484,7 @@ function ($matches) use ($blankStartSeparator, $blankEndSeparator) {
/**
* {@inheritdoc}
*/
public function return_header($exercise, $counter = null, $score = null)
public function return_header(Exercise $exercise, $counter = null, $score = [])
{
$header = parent::return_header($exercise, $counter, $score);
$header .= '<table class="'.$this->question_table_class.'">
Expand Down
2 changes: 1 addition & 1 deletion main/exercise/freeanswer.class.php
Expand Up @@ -55,7 +55,7 @@ public function processAnswersCreation($form, $exercise)
/**
* {@inheritdoc}
*/
public function return_header($exercise, $counter = null, $score = [])
public function return_header(Exercise $exercise, $counter = null, $score = [])
{
$score['revised'] = $this->isQuestionWaitingReview($score);
$header = parent::return_header($exercise, $counter, $score);
Expand Down
6 changes: 1 addition & 5 deletions main/exercise/global_multiple_answer.class.php
Expand Up @@ -261,11 +261,7 @@ public function processAnswersCreation($form, $exercise)
/**
* {@inheritdoc}
*/
public function return_header(
$exercise,
$counter = null,
$score = null
) {
public function return_header(Exercise $exercise, $counter = null, $score = []) {
$header = parent::return_header($exercise, $counter, $score);
$header .= '<table class="'.$this->question_table_class.'"><tr>';

Expand Down
2 changes: 1 addition & 1 deletion main/exercise/matching.class.php
Expand Up @@ -280,7 +280,7 @@ public function processAnswersCreation($form, $exercise)
/**
* {@inheritdoc}
*/
public function return_header($exercise, $counter = null, $score = null)
public function return_header(Exercise $exercise, $counter = null, $score = [])
{
$header = parent::return_header($exercise, $counter, $score);
$header .= '<table class="'.$this->question_table_class.'">';
Expand Down
2 changes: 1 addition & 1 deletion main/exercise/multiple_answer.class.php
Expand Up @@ -229,7 +229,7 @@ public function processAnswersCreation($form, $exercise)
/**
* {@inheritdoc}
*/
public function return_header($exercise, $counter = null, $score = null)
public function return_header(Exercise $exercise, $counter = null, $score = [])
{
$header = parent::return_header($exercise, $counter, $score);
$header .= '<table class="'.$this->question_table_class.'"><tr>';
Expand Down
2 changes: 1 addition & 1 deletion main/exercise/multiple_answer_combination.class.php
Expand Up @@ -227,7 +227,7 @@ public function processAnswersCreation($form, $exercise)
/**
* {@inheritdoc}
*/
public function return_header($exercise, $counter = null, $score = null)
public function return_header(Exercise $exercise, $counter = null, $score = [])
{
$header = parent::return_header($exercise, $counter, $score);
$header .= '<table class="'.$this->question_table_class.'"><tr>';
Expand Down
2 changes: 1 addition & 1 deletion main/exercise/multiple_answer_true_false.class.php
Expand Up @@ -308,7 +308,7 @@ public function processAnswersCreation($form, $exercise)
/**
* {@inheritdoc}
*/
public function return_header($exercise, $counter = null, $score = null)
public function return_header(Exercise $exercise, $counter = null, $score = [])
{
$header = parent::return_header($exercise, $counter, $score);
$header .= '<table class="'.$this->question_table_class.'"><tr>';
Expand Down
2 changes: 1 addition & 1 deletion main/exercise/oral_expression.class.php
Expand Up @@ -67,7 +67,7 @@ public function processAnswersCreation($form, $exercise)
/**
* {@inheritdoc}
*/
public function return_header($exercise, $counter = null, $score = null)
public function return_header(Exercise $exercise, $counter = null, $score = [])
{
$score['revised'] = $this->isQuestionWaitingReview($score);
$header = parent::return_header($exercise, $counter, $score);
Expand Down
6 changes: 1 addition & 5 deletions main/exercise/unique_answer.class.php
Expand Up @@ -408,11 +408,7 @@ public function processAnswersCreation($form, $exercise)
/**
* {@inheritdoc}
*/
public function return_header(
$exercise,
$counter = null,
$score = null
) {
public function return_header(Exercise $exercise, $counter = null, $score = []) {
$header = parent::return_header($exercise, $counter, $score);
$header .= '<table class="'.$this->question_table_class.'"><tr>';

Expand Down
2 changes: 1 addition & 1 deletion main/exercise/unique_answer_no_option.class.php
Expand Up @@ -399,7 +399,7 @@ public function processAnswersCreation($form, $exercise)
/**
* {@inheritdoc}
*/
public function return_header($exercise, $counter = null, $score = null)
public function return_header(Exercise $exercise, $counter = null, $score = [])
{
$header = parent::return_header($exercise, $counter, $score);
$header .= '<table class="'.$this->question_table_class.'"><tr>';
Expand Down

0 comments on commit f6b1677

Please sign in to comment.