diff --git a/src/Controller/ProfileController.php b/src/Controller/ProfileController.php
index ed50c80..dd5303d 100644
--- a/src/Controller/ProfileController.php
+++ b/src/Controller/ProfileController.php
@@ -106,8 +106,9 @@ class ProfileController extends ControllerBase implements ContainerInjectionInte
     /** @var \Drupal\profile\Entity\ProfileType $profile_type */
 
     /** @var \Drupal\profile\Entity\ProfileInterface|bool $active_profile */
-    $active_profile = $this->entityTypeManager()->getStorage('profile')
-                           ->loadByUser($user, $profile_type->id());
+    $active_profile = $this->entityTypeManager()
+      ->getStorage('profile')
+      ->loadByUser($user, $profile_type->id());
 
     // If the profile type does not support multiple, only display an add form
     // if there are no entities, or an edit for the current.
diff --git a/src/Entity/Profile.php b/src/Entity/Profile.php
index 01193b4..bc8e097 100644
--- a/src/Entity/Profile.php
+++ b/src/Entity/Profile.php
@@ -13,7 +13,6 @@ use Drupal\profile\Event\ProfileEvents;
 use Drupal\profile\Event\ProfileLabelEvent;
 use Drupal\user\UserInterface;
 
-
 /**
  * Defines the profile entity class.
  *
diff --git a/src/Entity/ProfileType.php b/src/Entity/ProfileType.php
index b8da364..a1d887f 100644
--- a/src/Entity/ProfileType.php
+++ b/src/Entity/ProfileType.php
@@ -54,7 +54,7 @@ class ProfileType extends ConfigEntityBundleBase implements ProfileTypeInterface
   /**
    * The primary identifier of the profile type.
    *
-   * @var integer
+   * @var int
    */
   protected $id;
 
@@ -75,14 +75,14 @@ class ProfileType extends ConfigEntityBundleBase implements ProfileTypeInterface
   /**
    * Whether the profile type is shown during registration.
    *
-   * @var boolean
+   * @var bool
    */
   protected $registration = FALSE;
 
   /**
    * Whether the profile type allows multiple profiles.
    *
-   * @var boolean
+   * @var bool
    */
   protected $multiple = FALSE;
 
@@ -96,7 +96,7 @@ class ProfileType extends ConfigEntityBundleBase implements ProfileTypeInterface
   /**
    * The weight of the profile type compared to others.
    *
-   * @var integer
+   * @var int
    */
   protected $weight = 0;
 
@@ -140,7 +140,7 @@ class ProfileType extends ConfigEntityBundleBase implements ProfileTypeInterface
   /**
    * {@inheritdoc}
    */
-  public function setRoles($roles) {
+  public function setRoles(array $roles) {
     $this->roles = $roles;
     return $this;
   }
diff --git a/src/Entity/ProfileTypeInterface.php b/src/Entity/ProfileTypeInterface.php
index d831ddc..310e8ac 100644
--- a/src/Entity/ProfileTypeInterface.php
+++ b/src/Entity/ProfileTypeInterface.php
@@ -50,7 +50,7 @@ interface ProfileTypeInterface extends ConfigEntityInterface {
    *
    * @return $this
    */
-  public function setRoles($roles);
+  public function setRoles(array $roles);
 
   /**
    * Returns the profile type's weight.
diff --git a/src/Form/ProfileDeleteForm.php b/src/Form/ProfileDeleteForm.php
index 79d4ec5..9d4dc27 100644
--- a/src/Form/ProfileDeleteForm.php
+++ b/src/Form/ProfileDeleteForm.php
@@ -3,7 +3,6 @@
 namespace Drupal\profile\Form;
 
 use Drupal\Core\Entity\ContentEntityDeleteForm;
-use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Url;
 
 /**
diff --git a/src/Form/ProfileTypeDeleteForm.php b/src/Form/ProfileTypeDeleteForm.php
index 5d1def1..8deebd5 100644
--- a/src/Form/ProfileTypeDeleteForm.php
+++ b/src/Form/ProfileTypeDeleteForm.php
@@ -48,7 +48,7 @@ class ProfileTypeDeleteForm extends EntityDeleteForm {
       ->execute();
     if ($num_profiles) {
       $caption = '<p>' . \Drupal::translation()
-          ->formatPlural($num_profiles, '%type is used by 1 profile on your site. You can not remove this profile type until you have removed all of the %type profiles.', '%type is used by @count profiles on your site. You may not remove %type until you have removed all of the %type profiles.', ['%type' => $this->entity->label()]) . '</p>';
+        ->formatPlural($num_profiles, '%type is used by 1 profile on your site. You can not remove this profile type until you have removed all of the %type profiles.', '%type is used by @count profiles on your site. You may not remove %type until you have removed all of the %type profiles.', ['%type' => $this->entity->label()]) . '</p>';
       $form['#title'] = $this->entity->label();
       $form['description'] = ['#markup' => $caption];
       return $form;
diff --git a/src/Form/ProfileTypeForm.php b/src/Form/ProfileTypeForm.php
index 89696fe..fc363d5 100644
--- a/src/Form/ProfileTypeForm.php
+++ b/src/Form/ProfileTypeForm.php
@@ -8,7 +8,6 @@ use Drupal\Core\Form\FormStateInterface;
 use Drupal\field_ui\FieldUI;
 use Drupal\user\Entity\Role;
 
-
 /**
  * Form controller for profile type forms.
  */
@@ -84,7 +83,7 @@ class ProfileTypeForm extends BundleEntityFormBase {
     ) {
       $actions['save_continue'] = $actions['submit'];
       $actions['save_continue']['#value'] = $this->t('Save and manage fields');
-      $actions['save_continue']['#submit'][] = [$this, 'redirectToFieldUI'];
+      $actions['save_continue']['#submit'][] = [$this, 'redirectToFieldUi'];
     }
     return $actions;
   }
@@ -108,7 +107,7 @@ class ProfileTypeForm extends BundleEntityFormBase {
   /**
    * Form submission handler to redirect to Manage fields page of Field UI.
    */
-  public function redirectToFieldUI(array $form, FormStateInterface $form_state) {
+  public function redirectToFieldUi(array $form, FormStateInterface $form_state) {
     if ($form_state->getTriggeringElement()['#parents'][0] === 'save_continue' && $route_info = FieldUI::getOverviewRouteInfo('profile', $this->entity->id())) {
       $form_state->setRedirectUrl($route_info);
     }
diff --git a/src/Plugin/EntityReferenceSelection/ProfileSelection.php b/src/Plugin/EntityReferenceSelection/ProfileSelection.php
index 55c5b64..a3e4bca 100644
--- a/src/Plugin/EntityReferenceSelection/ProfileSelection.php
+++ b/src/Plugin/EntityReferenceSelection/ProfileSelection.php
@@ -26,4 +26,5 @@ class ProfileSelection extends DefaultSelection {
     $form['target_bundles']['#title'] = $this->t('Profile types');
     return $form;
   }
+
 }
diff --git a/src/ProfileAccessControlHandler.php b/src/ProfileAccessControlHandler.php
index b26d3e2..8c4eac4 100644
--- a/src/ProfileAccessControlHandler.php
+++ b/src/ProfileAccessControlHandler.php
@@ -3,7 +3,6 @@
 namespace Drupal\profile;
 
 use Drupal\Core\Access\AccessResult;
-use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Session\AccountInterface;
 use Drupal\entity\EntityAccessControlHandler as EntityApiAccessControlHandler;
 use Drupal\profile\Entity\ProfileType;
diff --git a/src/ProfileStorage.php b/src/ProfileStorage.php
index fadef58..4ae10cf 100644
--- a/src/ProfileStorage.php
+++ b/src/ProfileStorage.php
@@ -28,10 +28,10 @@ class ProfileStorage extends SqlContentEntityStorage implements ProfileStorageIn
    */
   public function loadMultipleByUser(AccountInterface $account, $profile_type, $active = TRUE) {
     return $this->loadByProperties([
-        'uid' => $account->id(),
-        'type' => $profile_type,
-        'status' => $active,
-      ]);
+      'uid' => $account->id(),
+      'type' => $profile_type,
+      'status' => $active,
+    ]);
   }
 
   /**
diff --git a/src/ProfileTestTrait.php b/src/ProfileTestTrait.php
index ff87c0c..af39329 100644
--- a/src/ProfileTestTrait.php
+++ b/src/ProfileTestTrait.php
@@ -29,7 +29,7 @@ trait ProfileTestTrait {
    * @return \Drupal\profile\Entity\ProfileTypeInterface
    *   Returns a profile type entity.
    */
-  protected function createProfileType($id = NULL, $label = NULL, $registration = FALSE, $roles = []) {
+  protected function createProfileType($id = NULL, $label = NULL, $registration = FALSE, array $roles = []) {
     $id = !empty($id) ? $id : $this->randomMachineName();
     $label = !empty($label) ? $label : $this->randomMachineName();
 
diff --git a/tests/src/Functional/ProfileDefaultTest.php b/tests/src/Functional/ProfileDefaultTest.php
index 03076cc..ae5f023 100644
--- a/tests/src/Functional/ProfileDefaultTest.php
+++ b/tests/src/Functional/ProfileDefaultTest.php
@@ -22,7 +22,7 @@ class ProfileDefaultTest extends ProfileTestBase {
   /**
    * Testing demo user 2.
    *
-   * @var \Drupal\user\UserInterface;
+   * @var \Drupal\user\UserInterface
    */
   public $user2;
 
diff --git a/tests/src/Functional/ProfileFieldAccessTest.php b/tests/src/Functional/ProfileFieldAccessTest.php
index eebf776..1206be6 100644
--- a/tests/src/Functional/ProfileFieldAccessTest.php
+++ b/tests/src/Functional/ProfileFieldAccessTest.php
@@ -1,6 +1,7 @@
 <?php
 
 namespace Drupal\Tests\profile\Functional;
+
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
 
@@ -12,11 +13,15 @@ use Drupal\field\Entity\FieldStorageConfig;
 class ProfileFieldAccessTest extends ProfileTestBase {
 
   /**
+   * A test user.
+   *
    * @var \Drupal\user\Entity\User
    */
   protected $webUser;
 
   /**
+   * A test user.
+   *
    * @var \Drupal\user\Entity\User
    */
   protected $otherUser;
diff --git a/tests/src/Functional/ProfileTabTest.php b/tests/src/Functional/ProfileTabTest.php
index c8c45a9..87dd2e2 100644
--- a/tests/src/Functional/ProfileTabTest.php
+++ b/tests/src/Functional/ProfileTabTest.php
@@ -27,7 +27,7 @@ class ProfileTabTest extends ProfileTestBase {
   /**
    * Testing demo user 2.
    *
-   * @var \Drupal\user\UserInterface;
+   * @var \Drupal\user\UserInterface
    */
   public $user2;
 
diff --git a/tests/src/Functional/ProfileTestBase.php b/tests/src/Functional/ProfileTestBase.php
index ef22f76..bda6b4d 100644
--- a/tests/src/Functional/ProfileTestBase.php
+++ b/tests/src/Functional/ProfileTestBase.php
@@ -8,7 +8,6 @@ use Drupal\Core\Session\AccountInterface;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
 use Drupal\profile\ProfileTestTrait;
-use Drupal\simpletest\WebTestBase;
 use Drupal\Tests\BrowserTestBase;
 
 /**
@@ -30,14 +29,14 @@ abstract class ProfileTestBase extends BrowserTestBase {
   /**
    * Testing profile type entity view display.
    *
-   * @var \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display
+   * @var \Drupal\Core\Entity\Display\EntityViewDisplayInterface
    */
   protected $display;
 
   /**
    * Testing profile type entity form display.
    *
-   * @var \Drupal\Core\Entity\Display\EntityFormDisplayInterface $form
+   * @var \Drupal\Core\Entity\Display\EntityFormDisplayInterface
    */
   protected $form;
 
diff --git a/tests/src/Functional/ProfileTypeCRUDTest.php b/tests/src/Functional/ProfileTypeCRUDTest.php
index 149032e..038d3c9 100644
--- a/tests/src/Functional/ProfileTypeCRUDTest.php
+++ b/tests/src/Functional/ProfileTypeCRUDTest.php
@@ -40,7 +40,7 @@ class ProfileTypeCRUDTest extends ProfileTestBase {
   /**
    * Tests CRUD operations for profile types through the UI.
    */
-  public function testCRUDUI() {
+  public function testUi() {
     $this->drupalLogin($this->adminUser);
 
     // Create a new profile type.
diff --git a/tests/src/Kernel/ProfileAccessTest.php b/tests/src/Kernel/ProfileAccessTest.php
index 5fb48c9..961f7d0 100644
--- a/tests/src/Kernel/ProfileAccessTest.php
+++ b/tests/src/Kernel/ProfileAccessTest.php
@@ -2,7 +2,6 @@
 
 namespace Drupal\Tests\profile\Kernel;
 
-use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Session\AccountInterface;
 use Drupal\KernelTests\Core\Entity\EntityKernelTestBase;
 use Drupal\profile\Entity\Profile;
@@ -84,7 +83,6 @@ class ProfileAccessTest extends EntityKernelTestBase {
       $web_user1
     ));
 
-
     // Test user with permission to only add a profile.
     $web_user2 = $this->createUser([], ["create {$this->type->id()} profile"]);
     $web_user1->addRole($web_user2->get('roles')->first()->target_id);
@@ -172,7 +170,7 @@ class ProfileAccessTest extends EntityKernelTestBase {
     $this->assertFalse($profile2->access('view', User::getAnonymousUser()));
 
     // @todo Fix in https://www.drupal.org/node/2820209
-    // user_role_grant_permissions(AccountInterface::ANONYMOUS_ROLE, ["view any {$this->type->id()} profile"]);
+    user_role_grant_permissions(AccountInterface::ANONYMOUS_ROLE, ["view any {$this->type->id()} profile"]);
     // $this->assertTrue($profile1->access('view', User::getAnonymousUser()));
     // $this->assertTrue($profile2->access('view', User::getAnonymousUser()));
   }
diff --git a/tests/src/Kernel/ProfileRoleAccessTest.php b/tests/src/Kernel/ProfileRoleAccessTest.php
index f9c6b7c..9c476c2 100644
--- a/tests/src/Kernel/ProfileRoleAccessTest.php
+++ b/tests/src/Kernel/ProfileRoleAccessTest.php
@@ -69,6 +69,8 @@ class ProfileRoleAccessTest extends EntityKernelTestBase {
   protected $role2;
 
   /**
+   * The profile access handler.
+   *
    * @var \Drupal\profile\ProfileAccessControlHandler
    */
   protected $accessHandler;
@@ -93,7 +95,7 @@ class ProfileRoleAccessTest extends EntityKernelTestBase {
     $this->type2 = $this->createProfileType(NULL, NULL, FALSE, [$this->role2->id()]);
     $this->type3 = $this->createProfileType(NULL, NULL, FALSE, [
       $this->role1->id(),
-      $this->role2->id()
+      $this->role2->id(),
     ]);
 
     $this->accessHandler = $this->container->get('entity_type.manager')
@@ -104,8 +106,7 @@ class ProfileRoleAccessTest extends EntityKernelTestBase {
   }
 
   /**
-   * Tests add profile form access for a profile type that does not require
-   * users to have a role.
+   * Tests profile form access for a type that has no role requirement.
    */
   public function testProfileWithNoRoles() {
     // Create user with add profile permissions.
@@ -113,6 +114,9 @@ class ProfileRoleAccessTest extends EntityKernelTestBase {
     $this->assertTrue($this->accessHandler->createAccess($this->type1->id(), $web_user1));
   }
 
+  /**
+   * Tests profile form access for a type that has the locked role requirement.
+   */
   public function testLockedRoles() {
     $locked_role_type = $this->createProfileType(NULL, NULL, FALSE, [AccountInterface::AUTHENTICATED_ROLE]);
     // Create user with add profile permissions.
@@ -121,8 +125,7 @@ class ProfileRoleAccessTest extends EntityKernelTestBase {
   }
 
   /**
-   * Tests add profile form access for a profile type that requires users to
-   * have a single role.
+   * Tests profile form access for a type that requires a role.
    */
   public function testProfileWithSingleRole() {
     // Create user with add own profile permissions.
@@ -149,12 +152,10 @@ class ProfileRoleAccessTest extends EntityKernelTestBase {
     $this->reloadEntity($web_user1);
 
     $this->assertTrue($this->accessHandler->createAccess($this->type2->id(), $web_user1));
-
   }
 
   /**
-   * Tests add profile form access for a profile type that requires users to
-   * have one of multiple roles.
+   * Tests profile form access for a type that requires multiple roles.
    */
   public function testProfileWithAllRoles() {
     // Create user with add own profile permissions.
diff --git a/tests/src/Kernel/ProfileTest.php b/tests/src/Kernel/ProfileTest.php
index 0fc2237..0c60edf 100644
--- a/tests/src/Kernel/ProfileTest.php
+++ b/tests/src/Kernel/ProfileTest.php
@@ -6,7 +6,6 @@ use Drupal\Core\StringTranslation\TranslatableMarkup;
 use Drupal\KernelTests\Core\Entity\EntityKernelTestBase;
 use Drupal\profile\Entity\Profile;
 use Drupal\profile\Entity\ProfileType;
-use Drupal\profile\ProfileTestTrait;
 
 /**
  * Tests basic functionality of profiles.
@@ -36,7 +35,7 @@ class ProfileTest extends EntityKernelTestBase {
   /**
    * Testing demo user 2.
    *
-   * @var \Drupal\user\UserInterface;
+   * @var \Drupal\user\UserInterface
    */
   public $user2;
 
diff --git a/tests/src/Kernel/ProfileViewTest.php b/tests/src/Kernel/ProfileViewTest.php
index e820b08..6324242 100644
--- a/tests/src/Kernel/ProfileViewTest.php
+++ b/tests/src/Kernel/ProfileViewTest.php
@@ -29,6 +29,9 @@ class ProfileViewTest extends ViewsKernelTestBase {
     'users',
   ];
 
+  /**
+   * {@inheritdoc}
+   */
   protected function setUp($import_test_views = TRUE) {
     parent::setUp($import_test_views);
 
