Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
19 | public static function getVersion() : string { |
||
20 | // Nextcloud 14 introduced a new API for this which is not available on ownCloud. |
||
21 | // Nextcloud 25 removed the old API for good. |
||
22 | $appManager = \OC::$server->getAppManager(); |
||
23 | if (\method_exists($appManager, 'getAppVersion')) { |
||
24 | return $appManager->getAppVersion(self::APP_ID); // NC14+ |
||
25 | } else { |
||
26 | return \OCP\App::getAppVersion(self::APP_ID); // OC or NC13 |
||
|
|||
27 | } |
||
39 | } |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.