|
| 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, 'fishtown') !== false |
| 20 | + || strpos($location, 'delaware') !== false |
| 21 | + || strpos($location, 'west chester') !== false |
| 22 | + || strpos($location, 'drexel') !== false |
| 23 | + || strpos($location, 'temple') !== false |
| 24 | + || strpos($location, 'penn') !== false |
| 25 | + || strpos($location, 'fairmount') !== false |
| 26 | + || strpos($location, 'passyunk') !== false |
| 27 | + || strpos($location, 'center city') !== false |
| 28 | + || strpos($location, 'university city') !== false |
| 29 | + || strpos($location, 'ucity') !== false |
| 30 | + || strpos($location, 'new jersey') !== false |
| 31 | + || strpos($location, 'south jersey') !== false |
| 32 | + || strpos($location, 'swarthmore') !== false |
| 33 | + || strpos($location, 'old city') !== false |
| 34 | + || strpos($location, 'olde city') !== false |
| 35 | + || strpos($location, 'northern liberties') !== false |
| 36 | + || strpos($location, 'nolibs') !== false |
| 37 | + || strpos($location, 'kingsessing') !== false |
| 38 | + || strpos($location, 'kensington') !== false |
| 39 | + || strpos($location, 'port richmond') !== false |
| 40 | + || strpos($location, 'rittenhouse') !== false |
| 41 | + || strpos($location, 'lansdale') !== false |
| 42 | + || strpos($location, 'graduate hospital') !== false |
| 43 | + || strpos($location, 'newtown square') !== false |
| 44 | + || strpos($location, 'roxborough') !== false |
| 45 | + || strpos($location, 'manayunk') !== false |
| 46 | + || strpos($location, 'conshohocken') !== false |
| 47 | + || strpos($location, 'cherry hill') !== false |
| 48 | + || strpos($location, 'phoenixville') !== false |
| 49 | + || strpos($location, 'brewerytown') !== false |
| 50 | + ); |
| 51 | + } |
| 52 | +]; |
0 commit comments