Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
876e8bcb
Commit
876e8bcb
authored
10 years ago
by
Bernhard Posselt
Browse files
Options
Downloads
Patches
Plain Diff
add phpdoc
parent
2987d4ae
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/private/app/dependencyanalyzer.php
+20
-0
20 additions, 0 deletions
lib/private/app/dependencyanalyzer.php
with
20 additions
and
0 deletions
lib/private/app/dependencyanalyzer.php
+
20
−
0
View file @
876e8bcb
...
...
@@ -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
,
'<'
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment