LocalEntriesRepository.php 1.39 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
            false,
Jacob Priddy's avatar
Jacob Priddy committed
23
            'reason',
24
25
26
27
28
29
            Carbon::now()->subDays(1)
        ));

        $this->add(new Entry(
            2,
            LocalUsersRepository::getEngineeringLabAccessStudent()->getId(),
30
            LocalDoorsRepository::getTheBatCave()->getId(),
31
            true,
Jacob Priddy's avatar
Jacob Priddy committed
32
            'reason',
33
34
35
36
37
38
            Carbon::now()->subDays(1)
        ));

        $this->add(new Entry(
            3,
            LocalUsersRepository::getComputerScienceStudent()->getId(),
39
            LocalDoorsRepository::getAmazonDoor()->getId(),
40
            true,
Jacob Priddy's avatar
Jacob Priddy committed
41
            'reason',
42
43
44
45
46
47
            Carbon::now()->subMinutes(4)
        ));

        $this->add(new Entry(
            4,
            LocalUsersRepository::getComputerScienceStudent()->getId(),
48
            LocalDoorsRepository::getTheBatCave()->getId(),
49
            false,
Jacob Priddy's avatar
Jacob Priddy committed
50
            'reason',
51
52
53
            Carbon::now()->subYear()
        ));
    }
54
}