File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 33
44namespace TheCodingMachine \FluidSchema ;
55
6- use Doctrine \Common \Inflector \Inflector ;
76use Doctrine \DBAL \Platforms \AbstractPlatform ;
7+ use Doctrine \Inflector \Inflector ;
8+ use Doctrine \Inflector \InflectorFactory ;
89
910class DefaultNamingStrategy implements NamingStrategyInterface
1011{
1112 /**
1213 * @var AbstractPlatform
1314 */
1415 private $ platform ;
16+ /**
17+ * @var Inflector
18+ */
19+ private $ inflector ;
1520
1621 public function __construct (AbstractPlatform $ platform = null )
1722 {
1823 $ this ->platform = $ platform ;
24+ $ this ->inflector = InflectorFactory::create ()->build ();
1925 }
2026
2127 /**
@@ -54,7 +60,7 @@ private function toSingular($plural): string
5460
5561 $ strs = [];
5662 foreach ($ tokens as $ token ) {
57- $ strs [] = Inflector:: singularize ($ token );
63+ $ strs [] = $ this -> inflector -> singularize ($ token );
5864 }
5965
6066 return implode ('_ ' , $ strs );
You can’t perform that action at this time.
0 commit comments