Completed
Pull Request — master (#90)
by Jonathan
02:59
created
lib/Doctrine/Inflector/RulesetInflector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 
32 32
     public function inflect(string $word) : string
33 33
     {
34
-        if (! isset($this->wordInflectionCache[$word])) {
34
+        if (!isset($this->wordInflectionCache[$word])) {
35 35
             $this->wordInflectionCache[$word] = $this->doInflect($word);
36 36
         }
37 37
 
Please login to merge, or discard this patch.
lib/Doctrine/Inflector/Rules/Irregular.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 
37 37
     public function inflect(string $word) : ?string
38 38
     {
39
-        if (preg_match('/(.*)\\b(' . $this->getRegex() . ')$/i', $word, $regs)) {
40
-            return $regs[1] . $word[0] . substr($this->irregular[strtolower($regs[2])], 1);
39
+        if (preg_match('/(.*)\\b('.$this->getRegex().')$/i', $word, $regs)) {
40
+            return $regs[1].$word[0].substr($this->irregular[strtolower($regs[2])], 1);
41 41
         }
42 42
 
43 43
         return null;
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     private function getRegex() : string
47 47
     {
48 48
         if ($this->regex === null) {
49
-            $this->regex = '(?:' . implode('|', array_keys($this->irregular)) . ')';
49
+            $this->regex = '(?:'.implode('|', array_keys($this->irregular)).')';
50 50
         }
51 51
 
52 52
         return $this->regex;
Please login to merge, or discard this patch.
lib/Doctrine/Inflector/Rules/Uninflected.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -147,13 +147,13 @@
 block discarded – undo
147 147
 
148 148
     public function isUninflected(string $word) : bool
149 149
     {
150
-        return preg_match('/^(' . $this->getRegex() . ')$/i', $word, $regs) === 1;
150
+        return preg_match('/^('.$this->getRegex().')$/i', $word, $regs) === 1;
151 151
     }
152 152
 
153 153
     private function getRegex() : string
154 154
     {
155 155
         if ($this->regex === null) {
156
-            $this->regex = '(?:' . implode('|', $this->uninflected) . ')';
156
+            $this->regex = '(?:'.implode('|', $this->uninflected).')';
157 157
         }
158 158
 
159 159
         return $this->regex;
Please login to merge, or discard this patch.