Passed
Pull Request — master (#97)
by Jonathan
02:30
created
lib/Doctrine/Inflector/Rules/Pattern.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
             return $this->pattern;
28 28
         }
29 29
 
30
-        return '/' . $this->pattern . '/i';
30
+        return '/'.$this->pattern.'/i';
31 31
     }
32 32
 
33 33
     public function matches(string $word) : bool
Please login to merge, or discard this patch.
lib/Doctrine/Inflector/Rules/Patterns.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,11 +150,11 @@
 block discarded – undo
150 150
     private function getRegex() : string
151 151
     {
152 152
         if ($this->regex === null) {
153
-            $patterns = array_map(function (Pattern $word) : string {
153
+            $patterns = array_map(function(Pattern $word) : string {
154 154
                 return $word->getPattern();
155 155
             }, $this->patterns);
156 156
 
157
-            $this->regex = '/^(?:' . implode('|', $patterns) . ')$/i';
157
+            $this->regex = '/^(?:'.implode('|', $patterns).')$/i';
158 158
         }
159 159
 
160 160
         return $this->regex;
Please login to merge, or discard this patch.
lib/Doctrine/Inflector/Rules/Substitutions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
 
44 44
     public function inflect(string $word) : string
45 45
     {
46
-        if (preg_match('/(.*)\\b(' . $this->getRegex() . ')$/i', $word, $regs) === 1) {
47
-            return $regs[1] . $word[0] . substr($this->substitutions[strtolower($regs[2])]->getTo()->getWord(), 1);
46
+        if (preg_match('/(.*)\\b('.$this->getRegex().')$/i', $word, $regs) === 1) {
47
+            return $regs[1].$word[0].substr($this->substitutions[strtolower($regs[2])]->getTo()->getWord(), 1);
48 48
         }
49 49
 
50 50
         return $word;
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     private function getRegex() : string
54 54
     {
55 55
         if ($this->regex === null) {
56
-            $this->regex = '(?:' . implode('|', array_keys($this->substitutions)) . ')';
56
+            $this->regex = '(?:'.implode('|', array_keys($this->substitutions)).')';
57 57
         }
58 58
 
59 59
         return $this->regex;
Please login to merge, or discard this patch.