| @@ -69,21 +69,21 @@ discard block | ||
| 69 | 69 |      { | 
| 70 | 70 | $lowerSource = $this->addLowSpaces($this->text->getString()); | 
| 71 | 71 |          if (preg_match_all('/\s(([\w]+)[\*]+([\w]+))\s/', $lowerSource, $matches) > 0) { | 
| 72 | - $this->score += (self::ASTERISKS_MIDDLE * count($matches[0])); | |
| 72 | + $this->score += (self::ASTERISKS_MIDDLE * count($matches[ 0 ])); | |
| 73 | 73 |              if ($this->text->isReplaceable()) { | 
| 74 | 74 | $this->replaceMatches($matches); | 
| 75 | 75 | } | 
| 76 | 76 | } | 
| 77 | 77 | $lowerSource = $this->addLowSpaces($this->text->getString()); | 
| 78 | 78 |          if (preg_match_all('/\s(([\w]+)[\*]+)\s/', $lowerSource, $matches) > 0) { | 
| 79 | - $this->score += (self::ASTERISKS_RIGHT * count($matches[0])); | |
| 79 | + $this->score += (self::ASTERISKS_RIGHT * count($matches[ 0 ])); | |
| 80 | 80 |              if ($this->text->isReplaceable()) { | 
| 81 | 81 | $this->replaceMatches($matches); | 
| 82 | 82 | } | 
| 83 | 83 | } | 
| 84 | 84 | $lowerSource = $this->addLowSpaces($this->text->getString()); | 
| 85 | 85 |          if (preg_match_all('/\s([\*]+([\w]+))\s/', $lowerSource, $matches) > 0) { | 
| 86 | - $this->score += (self::ASTERISKS_LEFT * count($matches[0])); | |
| 86 | + $this->score += (self::ASTERISKS_LEFT * count($matches[ 0 ])); | |
| 87 | 87 |              if ($this->text->isReplaceable()) { | 
| 88 | 88 | $this->replaceMatches($matches); | 
| 89 | 89 | } | 
| @@ -136,7 +136,7 @@ discard block | ||
| 136 | 136 | private function replaceMatches(array $matches) : void | 
| 137 | 137 |      { | 
| 138 | 138 | /** @var array $matches */ | 
| 139 | -        foreach ($matches[0] as $word) { | |
| 139 | +        foreach ($matches[ 0 ] as $word) { | |
| 140 | 140 | $this->replace($word); | 
| 141 | 141 | } | 
| 142 | 142 | } | 
| @@ -7,8 +7,8 @@ | ||
| 7 | 7 | |
| 8 | 8 | class CustomSet implements SetContract | 
| 9 | 9 |  { | 
| 10 | - private $words = []; | |
| 11 | - private $phrases = []; | |
| 10 | + private $words = [ ]; | |
| 11 | + private $phrases = [ ]; | |
| 12 | 12 | |
| 13 | 13 | /** | 
| 14 | 14 | * @return array | 
| @@ -45,25 +45,25 @@ | ||
| 45 | 45 | 'anal', | 
| 46 | 46 | 'vagina', | 
| 47 | 47 | ], | 
| 48 | - '0.9' => ['ugly', 'stupid', 'dumb', 'boobs', 'pish', 'fanny', 'slag', 'squirt', 'torture', 'ass', 'nitwit', 'whiffet'], | |
| 49 | - '0.8' => ['silly', 'tit', 'tits', 'pussy', 'sick', 'git', 'poop', 'slaughter'], | |
| 50 | - '0.7' => ['shallow', 'foolish', 'nonce', 'bugger', 'naught', 'prick', 'schmuck', 'nonentity', 'idiot'], | |
| 51 | - '0.6' => ['rednack', 'mindless', 'fat', 'nude', 'wft', 'snot', 'bloodbath', 'massacre', 'massacrer'], | |
| 52 | - '0.5' => ['bully', 'sneaky', 'greedy', 'creep', 'kill', 'revenge', 'catfight', 'die', 'death', 'nought', 'nonentity'], | |
| 53 | - '0.4' => ['superficial', 'numb', 'clown', 'villager', 'flatter', 'murder', 'nothingness'], | |
| 54 | - '0.3' => ['fake', 'strange', 'ignorant', 'critical', 'nuts', 'cum', 'genitals', 'retaliation', 'freak'], | |
| 55 | - '0.2' => ['useless', 'thoughtless', 'crazy', 'bollocks', 'bit', 'hit', 'exterminate', 'gangster'], | |
| 48 | + '0.9' => [ 'ugly', 'stupid', 'dumb', 'boobs', 'pish', 'fanny', 'slag', 'squirt', 'torture', 'ass', 'nitwit', 'whiffet' ], | |
| 49 | + '0.8' => [ 'silly', 'tit', 'tits', 'pussy', 'sick', 'git', 'poop', 'slaughter' ], | |
| 50 | + '0.7' => [ 'shallow', 'foolish', 'nonce', 'bugger', 'naught', 'prick', 'schmuck', 'nonentity', 'idiot' ], | |
| 51 | + '0.6' => [ 'rednack', 'mindless', 'fat', 'nude', 'wft', 'snot', 'bloodbath', 'massacre', 'massacrer' ], | |
| 52 | + '0.5' => [ 'bully', 'sneaky', 'greedy', 'creep', 'kill', 'revenge', 'catfight', 'die', 'death', 'nought', 'nonentity' ], | |
| 53 | + '0.4' => [ 'superficial', 'numb', 'clown', 'villager', 'flatter', 'murder', 'nothingness' ], | |
| 54 | + '0.3' => [ 'fake', 'strange', 'ignorant', 'critical', 'nuts', 'cum', 'genitals', 'retaliation', 'freak' ], | |
| 55 | + '0.2' => [ 'useless', 'thoughtless', 'crazy', 'bollocks', 'bit', 'hit', 'exterminate', 'gangster' ], | |
| 56 | 56 | // <= 0.1 is almost noise for detox | 
| 57 | - '0.1' => ['punch', 'insect', 'annihilate', 'steal', 'kick', 'kidnap'], | |
| 58 | - '0.06' => ['dude', 'pal', 'yo'], | |
| 57 | + '0.1' => [ 'punch', 'insect', 'annihilate', 'steal', 'kick', 'kidnap' ], | |
| 58 | + '0.06' => [ 'dude', 'pal', 'yo' ], | |
| 59 | 59 | ]; | 
| 60 | 60 | |
| 61 | 61 | private $phrases = [ | 
| 62 | - '1.0' => ['dirty sanchez', 'gang bang', 'piss off', 'blow job', 'kick ass'], | |
| 63 | - '0.9' => ['swinger party', 'bloody hell', 'bugger off', 'black on white', 'double penetration'], | |
| 64 | - '0.8' => ['get staffed', 'get lost'], | |
| 65 | - '0.7' => ['screw you', 'screw u', 'get off'], | |
| 66 | - '0.3' => ['white supremacy', 'black supremacy', 'ku klux klan'], | |
| 62 | + '1.0' => [ 'dirty sanchez', 'gang bang', 'piss off', 'blow job', 'kick ass' ], | |
| 63 | + '0.9' => [ 'swinger party', 'bloody hell', 'bugger off', 'black on white', 'double penetration' ], | |
| 64 | + '0.8' => [ 'get staffed', 'get lost' ], | |
| 65 | + '0.7' => [ 'screw you', 'screw u', 'get off' ], | |
| 66 | + '0.3' => [ 'white supremacy', 'black supremacy', 'ku klux klan' ], | |
| 67 | 67 | '0.2' => [ | 
| 68 | 68 | 'black people', | 
| 69 | 69 | 'white people', |