summaryrefslogtreecommitdiffstats
path: root/lib/private/app
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2015-02-26 11:49:51 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2015-02-26 11:49:51 +0100
commit876e8bcb551f1770f539af1e2e07efd2571928b7 (patch)
tree495b2bc442f7b7d5072709d15f8cba3b1c98e5b3 /lib/private/app
parent2987d4aec89b8b0ea80d6024baf07d751235b4ac (diff)
downloadnextcloud-server-876e8bcb551f1770f539af1e2e07efd2571928b7.tar.gz
nextcloud-server-876e8bcb551f1770f539af1e2e07efd2571928b7.zip
add phpdoc
Diffstat (limited to 'lib/private/app')
-rw-r--r--lib/private/app/dependencyanalyzer.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/private/app/dependencyanalyzer.php b/lib/private/app/dependencyanalyzer.php
index 277303eac55..38f96fea2a4 100644
--- a/lib/private/app/dependencyanalyzer.php
+++ b/lib/private/app/dependencyanalyzer.php
@@ -82,6 +82,14 @@ class DependencyAnalyzer {
return [implode('.', $first), implode('.', $second)];
}
+ /**
+ * Parameters will be normalized and then passed into version_compare
+ * in the same order they are specified in the method header
+ * @param string $first
+ * @param string $second
+ * @param string $operator
+ * @return bool result similar to version_compare
+ */
private function compare($first, $second, $operator) {
// we cant normalize versions if one of the given parameters is not a
// version string but null. In case one parameter is null normalization
@@ -93,10 +101,22 @@ class DependencyAnalyzer {
return version_compare($first, $second, $operator);
}
+ /**
+ * Checks if a version is bigger than another version
+ * @param string $first
+ * @param string $second
+ * @return bool true if the first version is bigger than the second
+ */
private function compareBigger($first, $second) {
return $this->compare($first, $second, '>');
}
+ /**
+ * Checks if a version is smaller than another version
+ * @param string $first
+ * @param string $second
+ * @return bool true if the first version is smaller than the second
+ */
private function compareSmaller($first, $second) {
return $this->compare($first, $second, '<');
}