Skip to content
Snippets Groups Projects
Commit f63dc3c4 authored by Eirik Morland's avatar Eirik Morland
Browse files

Issue #3486618 by eiriksm: New coder issues

parent 73dd0d45
No related branches found
No related tags found
1 merge request!75Code style
Pipeline #334756 passed with warnings
......@@ -39,7 +39,7 @@ final class EditRoleForm extends FormBase {
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state, TeamNode $team = NULL, $uid = NULL): array {
public function buildForm(array $form, FormStateInterface $form_state, ?TeamNode $team = NULL, $uid = NULL): array {
if (!$team instanceof TeamNode || !$uid) {
return $form;
}
......
......@@ -64,7 +64,7 @@ final class InviteMembersForm extends FormBase {
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state, TeamNode $team = NULL): array {
public function buildForm(array $form, FormStateInterface $form_state, ?TeamNode $team = NULL): array {
if (!$team instanceof TeamNode) {
return $form;
}
......
......@@ -102,7 +102,7 @@ class TeamManager {
/**
* Create a team, optionally with the first member of the team.
*/
public function createTeam(string $name, UserInterface $user = NULL) : TeamNode {
public function createTeam(string $name, ?UserInterface $user = NULL) : TeamNode {
/** @var \Drupal\violinist_teams\TeamNode $team */
$team = $this->entityTypeManager->getStorage('node')
->create([
......
......@@ -2,9 +2,9 @@
namespace Drupal\Tests\violinist_teams\Kernel;
use Drupal\KernelTests\KernelTestBase as CoreKernelTestBase;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\KernelTests\KernelTestBase as CoreKernelTestBase;
use Drupal\node\Entity\NodeType;
use Drupal\violinist_teams\TeamNode;
......
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