@@ -148,10 +148,12 @@ public function getNextPatchVersion()
148148 */
149149 public function getNextPreReleaseVersion ()
150150 {
151- return new Version ($ this ->major ,
151+ return new Version (
152+ $ this ->major ,
152153 $ this ->minor ,
153154 $ this ->isPreRelease () ? $ this ->patch : $ this ->patch + 1 ,
154- $ this ->isPreRelease () ? $ this ->preRelease ->increment () : PreRelease::createDefault ());
155+ $ this ->isPreRelease () ? $ this ->preRelease ->increment () : PreRelease::createDefault ()
156+ );
155157 }
156158
157159 /**
@@ -232,15 +234,17 @@ public static function parse($versionString)
232234 throw new VersionFormatException (sprintf ("Invalid version: %s. " , $ versionString ));
233235 }
234236
235- return new Version (intval ($ matches ['major ' ]),
237+ return new Version (
238+ intval ($ matches ['major ' ]),
236239 intval ($ matches ['minor ' ]),
237240 intval ($ matches ['patch ' ]),
238241 isset ($ matches ['prerelease ' ]) && $ matches ['prerelease ' ] != ""
239242 ? PreRelease::parse ($ matches ['prerelease ' ])
240243 : null ,
241244 isset ($ matches ['buildmetadata ' ]) && $ matches ['buildmetadata ' ] != ""
242245 ? $ matches ['buildmetadata ' ]
243- : null );
246+ : null
247+ );
244248 }
245249
246250 /**
@@ -260,11 +264,13 @@ public static function create($major, $minor, $patch, $preRelease = null, $build
260264 self ::ensureValidState ($ minor >= 0 , "The minor number must be >= 0. " );
261265 self ::ensureValidState ($ patch >= 0 , "The patch number must be >= 0. " );
262266
263- return new Version ($ major ,
267+ return new Version (
268+ $ major ,
264269 $ minor ,
265270 $ patch ,
266271 $ preRelease != null ? PreRelease::parse ($ preRelease ) : null ,
267- $ buildMeta );
272+ $ buildMeta
273+ );
268274 }
269275
270276 /**
0 commit comments