Passed
Pull Request — master (#96)
by Gabriel
02:32
created
lib/Doctrine/Inflector/Rules/Irregular.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
 
48 48
     public function inflect(string $word) : string
49 49
     {
50
-        if (preg_match('/(.*)\\b(' . $this->getRegex() . ')$/i', $word, $regs) > 0) {
51
-            return $regs[1] . $word[0] . substr($this->rules[strtolower($regs[2])]->getTo(), 1);
50
+        if (preg_match('/(.*)\\b('.$this->getRegex().')$/i', $word, $regs) > 0) {
51
+            return $regs[1].$word[0].substr($this->rules[strtolower($regs[2])]->getTo(), 1);
52 52
         }
53 53
 
54 54
         return $word;
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     private function getRegex() : string
58 58
     {
59 59
         if ($this->regex === null) {
60
-            $this->regex = '(?:' . implode('|', array_keys($this->rules)) . ')';
60
+            $this->regex = '(?:'.implode('|', array_keys($this->rules)).')';
61 61
         }
62 62
 
63 63
         return $this->regex;
Please login to merge, or discard this patch.