diff --git a/modules/content_lock_timeout/src/Tests/ContentLockTimeoutTest.php b/modules/content_lock_timeout/src/Tests/ContentLockTimeoutTest.php index 89f15ca..5cdb736 100644 --- a/modules/content_lock_timeout/src/Tests/ContentLockTimeoutTest.php +++ b/modules/content_lock_timeout/src/Tests/ContentLockTimeoutTest.php @@ -29,16 +29,18 @@ class ContentLockTimeoutTest extends ContentLockTestBase { 'taxonomy', 'block', 'block_content', - 'content_lock_timeout' + 'content_lock_timeout', ]; /** + * Lock service. + * * @var \Drupal\content_lock\ContentLock\ContentLock */ protected $lockService; /** - * {@inheritDoc} + * {@inheritdoc} */ public function setUp() { parent::setUp(); @@ -126,8 +128,10 @@ class ContentLockTimeoutTest extends ContentLockTestBase { /** * Run the same tests for node, block and term. * - * @param Entity $entity + * @param \Drupal\Core\Entity\Entity $entity * The entity to tests. + * + * @throws \Drupal\Core\Entity\EntityMalformedException */ protected function doTestForEntity(Entity $entity) { // We lock article1. @@ -168,7 +172,7 @@ class ContentLockTimeoutTest extends ContentLockTestBase { // Jump into the future. \Drupal::time()->setCurrentTime(time() + 60 * 60); - // lock should be release by form prepare. + // Lock should be release by form prepare. $this->drupalGet($entity->toUrl('edit-form')->toString()); $this->assertText(t('This content is now locked against simultaneous editing.')); } @@ -176,9 +180,11 @@ class ContentLockTimeoutTest extends ContentLockTestBase { /** * Create lock from user 1. * - * As login/logout is always clearing locks, its only possible over service directly. + * As logout is removing locks, it is only possible to set a lock from another + * user with the lock service. * * @param \Drupal\Core\Entity\Entity $entity + * The entity which should be locked. */ protected function lockContentByUser1(Entity $entity) { $this->lockService->releaseAllUserLocks($this->user2->id()); diff --git a/modules/content_lock_timeout/src/Tests/TimeChanger.php b/modules/content_lock_timeout/src/Tests/TimeChanger.php index aaa0061..6ae43a8 100644 --- a/modules/content_lock_timeout/src/Tests/TimeChanger.php +++ b/modules/content_lock_timeout/src/Tests/TimeChanger.php @@ -14,7 +14,7 @@ class TimeChanger extends Time { protected $overwrittenTime = NULL; /** - * {@inheritDoc} + * {@inheritdoc} */ public function getCurrentTime() { $time = \Drupal::keyValue('time')->get('time', NULL); @@ -42,7 +42,7 @@ class TimeChanger extends Time { } /** - * {@inheritDoc} + * {@inheritdoc} */ public function getRequestTime() { $time = \Drupal::keyValue('time')->get('time', NULL);