File tree Expand file tree Collapse file tree 2 files changed +15
-15
lines changed
Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,14 @@ public function getVersion()
116116 {
117117 if ($ v = $ this ->getShellExec ('/usr/bin/sw_vers -productVersion ' ))
118118 {
119- $ this ->_darwin = new MacOsVersion ($ v );
119+ if ($ b = $ this ->getShellExec ('/usr/bin/sw_vers -buildVersion ' ))
120+ {
121+ $ this ->_darwin = new MacOsVersion ($ v , $ b );
122+ }
123+ else
124+ {
125+ $ this ->_darwin = new MacOsVersion ($ v );
126+ }
120127 }
121128 }
122129
Original file line number Diff line number Diff line change 22
33namespace DevCoding \Mac \Objects ;
44
5- use PHLAK \SemVer \Version ;
6-
7- class MacOsVersion extends Version
5+ class MacOsVersion extends SemanticVersion
86{
97 const NAMES = [
108 '10 ' => [
@@ -24,19 +22,14 @@ class MacOsVersion extends Version
2422 ],
2523 ];
2624
27- public function getMajor ()
28- {
29- return $ this ->major ;
30- }
31-
32- public function getMinor ()
25+ public function __construct ($ version = '0.1.0 ' , $ build = null )
3326 {
34- return $ this ->minor ;
35- }
27+ parent ::__construct ($ version );
3628
37- public function getRevision ()
38- {
39- return $ this ->patch ;
29+ if (!empty ($ build ))
30+ {
31+ $ this ->setBuild ($ build );
32+ }
4033 }
4134
4235 public function getName ()
You can’t perform that action at this time.
0 commit comments