Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function __construct()
$this->isBitrix24UserAdmin = true;
$this->memberId = Uuid::v4()->toRfc4122();
$this->domainUrl = Uuid::v4()->toRfc4122().'-example.com';
$this->authToken = new AuthToken('old_1', 'old_2', 3600);
$this->authToken = new AuthToken('old_1', 'old_2', 3600,time() + 60 * 60 * 24);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve readability and avoid magic numbers, it's better to express time durations as calculations. For example, 3600 can be written as 60 * 60. Additionally, for calculating a day in seconds, the conventional order is from largest to smallest unit, like 24 * 60 * 60.

        $this->authToken = new AuthToken('old_1', 'old_2', 60 * 60, time() + 24 * 60 * 60);

$this->applicationVersion = 1;
$this->applicationScope = new Scope();
}
Expand Down