File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ public function register($class)
4949 $ this ->mapRepository ($ name , $ class );
5050 }
5151 }
52+ return $ this ;
5253 }
5354
5455 public function migrate ()
@@ -116,6 +117,8 @@ public function migrate()
116117 $ space ->addIndex (['id ' ]);
117118 }
118119 }
120+
121+ return $ this ;
119122 }
120123
121124 private $ underscores = [];
Original file line number Diff line number Diff line change @@ -12,14 +12,12 @@ public function test()
1212 $ mapper = $ this ->createMapper ();
1313 $ this ->clean ($ mapper );
1414
15- $ orm = $ mapper ->addPlugin (Sequence::class);
16- $ orm = $ mapper ->addPlugin (DocBlock::class);
17-
18- $ orm ->register ('Entities \\Post ' );
19- $ orm ->register ('Entities \\Person ' );
20- $ orm ->register ('Repositories \\Post ' );
21-
22- $ orm ->migrate ();
15+ $ sequence = $ mapper ->addPlugin (Sequence::class);
16+ $ mapper ->addPlugin (DocBlock::class)
17+ ->register ('Entities \\Post ' )
18+ ->register ('Entities \\Person ' )
19+ ->register ('Repositories \\Post ' )
20+ ->migrate ();
2321
2422 $ nekufa = $ mapper ->create ('person ' , [
2523 'name ' => 'Dmitry.Krokhin '
You can’t perform that action at this time.
0 commit comments