File tree 1 file changed +2
-6
lines changed
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 9
9
use Doctrine \Migrations \Tools \Console \Helper \MigrationDirectoryHelper ;
10
10
use InvalidArgumentException ;
11
11
12
- use function assert ;
13
12
use function explode ;
14
13
use function file_get_contents ;
15
14
use function file_put_contents ;
@@ -75,14 +74,11 @@ public function generateMigration(
75
74
string |null $ up = null ,
76
75
string |null $ down = null ,
77
76
): string {
78
- $ mch = [];
79
- $ matchResult = preg_match ('~(.*) \\\\([^ \\\\]+)~ ' , $ fqcn , $ mch );
80
- if ($ matchResult === 0 ) {
77
+ $ mch = [];
78
+ if (preg_match ('~(.*) \\\\([^ \\\\]+)~ ' , $ fqcn , $ mch ) !== 1 ) {
81
79
throw new InvalidArgumentException (sprintf ('Invalid FQCN ' ));
82
80
}
83
81
84
- assert ($ matchResult !== false );
85
-
86
82
[$ fqcn , $ namespace , $ className ] = $ mch ;
87
83
88
84
$ dirs = $ this ->configuration ->getMigrationDirectories ();
You can’t perform that action at this time.
0 commit comments