Skip to content

Commit e21461a

Browse files
feat(mueller): add local location check
1 parent e5a58b3 commit e21461a

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?php
2+
3+
namespace Emergence\Mueller;
4+
5+
use Emergence\People\IUser;
6+
7+
Investigator::$tests['has-local-location'] = [
8+
'points' => 500,
9+
'function' => function (IUser $User, array &$userCache) {
10+
if (!$User->Location) {
11+
return false;
12+
}
13+
14+
$location = strtolower($User->Location);
15+
16+
return (
17+
strpos($location, 'philly') !== false
18+
|| strpos($location, 'phila') !== false
19+
|| strpos($location, 'nj') !== false
20+
|| strpos($location, 'pa') !== false
21+
|| strpos($location, 'fishtown') !== false
22+
|| strpos($location, 'delaware') !== false
23+
|| strpos($location, 'chester') !== false
24+
|| strpos($location, 'drexel') !== false
25+
|| strpos($location, 'temple') !== false
26+
|| strpos($location, 'penn') !== false
27+
|| strpos($location, 'fairmount') !== false
28+
|| strpos($location, 'passyunk') !== false
29+
|| strpos($location, 'center city') !== false
30+
|| strpos($location, 'university city') !== false
31+
|| strpos($location, 'ucity') !== false
32+
|| strpos($location, 'new jersey') !== false
33+
|| strpos($location, 'south jersey') !== false
34+
|| strpos($location, 'swarthmore') !== false
35+
|| strpos($location, 'old city') !== false
36+
|| strpos($location, 'olde city') !== false
37+
|| strpos($location, 'northern liberties') !== false
38+
|| strpos($location, 'nolibs') !== false
39+
|| strpos($location, 'kingsessing') !== false
40+
|| strpos($location, 'kensington') !== false
41+
|| strpos($location, 'port richmond') !== false
42+
|| strpos($location, 'rittenhouse') !== false
43+
|| strpos($location, 'lansdale') !== false
44+
|| strpos($location, 'graduate hospital') !== false
45+
|| strpos($location, 'newtown square') !== false
46+
|| strpos($location, 'roxborough') !== false
47+
|| strpos($location, 'manayunk') !== false
48+
|| strpos($location, 'conshohocken') !== false
49+
|| strpos($location, 'cherry hill') !== false
50+
);
51+
}
52+
];

0 commit comments

Comments
 (0)