Repository navigation
Expand file tree
/
Copy pathAchievement.php
More file actions
118 lines (111 loc) · 4.26 KB
/
Copy pathAchievement.php
File metadata and controls
118 lines (111 loc) · 4.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?php
declare(strict_types=1);
namespace App\Enums;
enum Achievement: string
{
case Init = 'init';
case Syntax = 'syntax';
case Uptime = 'uptime';
case Daemon = 'daemon';
case Sysadmin = 'sysadmin';
case Stdout = 'stdout';
case KernelSpace = 'kernel_space';
case Stargazer = 'stargazer';
case Superstar = 'superstar';
case Pipe = 'pipe';
case AuthorizedKeys = 'authorized_keys';
case SweetTooth = 'sweet_tooth';
case Luddite = 'luddite';
case ShellShocked = 'shell_shocked';
case SuperSaiyan = 'super_saiyan';
case Whoopsie = 'whoopsie';
case GitBlame = 'git_blame';
public function label(): string
{
return match ($this) {
self::Init => 'init',
self::Syntax => 'syntax',
self::Uptime => 'uptime',
self::Daemon => 'daemon',
self::Sysadmin => 'sysadmin',
self::Stdout => 'stdout',
self::KernelSpace => 'kernel space',
self::Stargazer => 'stargazer',
self::Superstar => 'superstar',
self::Pipe => 'pipe',
self::AuthorizedKeys => 'authorized_keys',
self::SweetTooth => 'sweet tooth',
self::Luddite => 'luddite',
self::ShellShocked => 'shell shocked',
self::SuperSaiyan => 'super-saiyan',
self::Whoopsie => 'whoopsie',
self::GitBlame => 'git blame',
};
}
public function description(): string
{
return match ($this) {
self::Init => 'Piped your first commit to /dev/null.',
self::Syntax => 'Committed formatted code blocks in markdown.',
self::Uptime => 'Maintained a 7-day commit streak without a reboot.',
self::Daemon => 'Maintained a 30-day commit streak.',
self::Sysadmin => 'Maintained a 100-day commit streak.',
self::Stdout => 'Reached 50 commits piped to /dev/null.',
self::KernelSpace => 'Reached 100 commits piped to /dev/null.',
self::Stargazer => 'Starred 10 commits by other developers.',
self::Superstar => 'Received 25 stars on your commits.',
self::Pipe => 'Joined conversations with 5 replies to other developers.',
self::AuthorizedKeys => 'Provisioned a public SSH key from GitHub.',
self::SweetTooth => 'Received 100 pastéis across your account.',
self::Luddite => 'Unfollowed Tom. Costs 100 XP until you follow him again.',
self::ShellShocked => "Survived the php2shell downtime of Oct '26. Earns 100 XP.",
self::SuperSaiyan => 'Y—your follower count. It... it’s over 9000!!!1!',
self::Whoopsie => 'Nuked production at least once.',
self::GitBlame => 'Landed a commit in the /dev/null repo itself. git blame now points at you.',
};
}
public function icon(): string
{
return match ($this) {
self::Init => 'terminal',
self::Syntax => 'file-code',
self::Uptime => 'flame',
self::Daemon => 'zap',
self::Sysadmin => 'server',
self::Stdout => 'box',
self::KernelSpace => 'shield',
self::Stargazer => 'star',
self::Superstar => 'sparkles',
self::Pipe => 'git-merge',
self::AuthorizedKeys => 'key',
self::SweetTooth => 'pastel-de-nata',
self::Luddite => 'bot-off',
self::ShellShocked => 'bomb',
self::SuperSaiyan => 'dragon-ball',
self::Whoopsie => 'mushroom-cloud',
self::GitBlame => 'git-commit-horizontal',
};
}
public function target(): int
{
return match ($this) {
self::Init => 1,
self::Syntax => 1,
self::Uptime => 7,
self::Daemon => 30,
self::Sysadmin => 100,
self::Stdout => 50,
self::KernelSpace => 100,
self::Stargazer => 10,
self::Superstar => 25,
self::Pipe => 5,
self::AuthorizedKeys => 1,
self::SweetTooth => 100,
self::Luddite => 1,
self::ShellShocked => 1,
self::SuperSaiyan => 9000,
self::Whoopsie => 1,
self::GitBlame => 1,
};
}
}