Skip to content
Snippets Groups Projects
Commit 979e0b9c authored by Stephen Mustgrave's avatar Stephen Mustgrave
Browse files

Last phpcs

parent d0fd05dc
No related branches found
No related tags found
No related merge requests found
...@@ -11,9 +11,9 @@ use Drupal\Core\Entity\EntityInterface; ...@@ -11,9 +11,9 @@ use Drupal\Core\Entity\EntityInterface;
class QuizResultTypeListBuilder extends ConfigEntityListBuilder { class QuizResultTypeListBuilder extends ConfigEntityListBuilder {
/** /**
* * {@inheritdoc}
*/ */
public function render() { public function render(): array {
$build = parent::render(); $build = parent::render();
$build['table']['#caption'] = $this->t('Result types.'); $build['table']['#caption'] = $this->t('Result types.');
return $build; return $build;
...@@ -22,7 +22,7 @@ class QuizResultTypeListBuilder extends ConfigEntityListBuilder { ...@@ -22,7 +22,7 @@ class QuizResultTypeListBuilder extends ConfigEntityListBuilder {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function buildHeader() { public function buildHeader(): array {
$header['type'] = $this->t('Result type'); $header['type'] = $this->t('Result type');
return $header + parent::buildHeader(); return $header + parent::buildHeader();
} }
...@@ -30,7 +30,7 @@ class QuizResultTypeListBuilder extends ConfigEntityListBuilder { ...@@ -30,7 +30,7 @@ class QuizResultTypeListBuilder extends ConfigEntityListBuilder {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function buildRow(EntityInterface $entity) { public function buildRow(EntityInterface $entity): array {
$row['type'] = $entity->toLink(NULL, 'edit-form'); $row['type'] = $entity->toLink(NULL, 'edit-form');
return $row + parent::buildRow($entity); return $row + parent::buildRow($entity);
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Drupal\quiz\Entity; namespace Drupal\quiz\Entity;
/** /**
* * Represents a broken question, thus empty.
*/ */
class QuizQuestionBroken extends QuizQuestion { class QuizQuestionBroken extends QuizQuestion {
......
...@@ -128,7 +128,7 @@ class QuizResultAnswerField extends PrerenderList { ...@@ -128,7 +128,7 @@ class QuizResultAnswerField extends PrerenderList {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
// phpcs:ignore Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:ignore Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps, Drupal.Commenting.FunctionComment.Missing
public function render_item($count, $item) { public function render_item($count, $item) {
return $item['answer']; return $item['answer'];
} }
......
...@@ -101,7 +101,13 @@ class QuizViewBuilder extends EntityViewBuilder { ...@@ -101,7 +101,13 @@ class QuizViewBuilder extends EntityViewBuilder {
} }
/** /**
* Helper function to build stats.
* *
* @param \Drupal\quiz\Entity\quiz $quiz
* Quiz to pull stats from
*
* @return array
* Array formed to hold "Stats" component.
*/ */
protected function buildStatsComponent(Quiz $quiz): array { protected function buildStatsComponent(Quiz $quiz): array {
$stats = [ $stats = [
...@@ -163,7 +169,13 @@ class QuizViewBuilder extends EntityViewBuilder { ...@@ -163,7 +169,13 @@ class QuizViewBuilder extends EntityViewBuilder {
} }
/** /**
* Helper function to build take attempts.
*
* @param \Drupal\quiz\Entity\quiz $quiz
* Quiz to pull take attempts from
* *
* @return array
* Array formed to hold "Take" component.
*/ */
protected function buildTakeComponent(Quiz $quiz): array { protected function buildTakeComponent(Quiz $quiz): array {
$build = []; $build = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment