LocalEntriesRepository.php 1.31 KB
Newer Older
1
2
3
4
5
<?php


namespace Source\Gateways\Entries;

6
7
8
9
10
use Carbon\Carbon;
use Source\Entities\Entry;
use Source\Gateways\Doors\LocalDoorsRepository;
use Source\Gateways\Users\LocalUsersRepository;

11
12
class LocalEntriesRepository extends InMemoryEntriesRepository
{
13
14
15
16
17
18
19
20
    /**
     * @throws \Exception
     */
    public function __construct()
    {
        $this->add(new Entry(
            1,
            LocalUsersRepository::getEngineeringLabAccessStudent()->getId(),
21
            LocalDoorsRepository::getAmazonDoor()->getId(),
22
23
24
25
26
27
28
            false,
            Carbon::now()->subDays(1)
        ));

        $this->add(new Entry(
            2,
            LocalUsersRepository::getEngineeringLabAccessStudent()->getId(),
29
            LocalDoorsRepository::getTheBatCave()->getId(),
30
31
32
33
34
35
36
            true,
            Carbon::now()->subDays(1)
        ));

        $this->add(new Entry(
            3,
            LocalUsersRepository::getComputerScienceStudent()->getId(),
37
            LocalDoorsRepository::getAmazonDoor()->getId(),
38
39
40
41
42
43
44
            true,
            Carbon::now()->subMinutes(4)
        ));

        $this->add(new Entry(
            4,
            LocalUsersRepository::getComputerScienceStudent()->getId(),
45
            LocalDoorsRepository::getTheBatCave()->getId(),
46
47
48
49
            false,
            Carbon::now()->subYear()
        ));
    }
50
}