Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4095545
Interval.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
Interval.php
View Options
<?php
/*
* This file is part of composer/semver.
*
* (c) Composer <https://github.com/composer>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace
Composer\Semver
;
use
Composer\Semver\Constraint\Constraint
;
class
Interval
{
/** @var Constraint */
private
$start
;
/** @var Constraint */
private
$end
;
public
function
__construct
(
Constraint
$start
,
Constraint
$end
)
{
$this
->
start
=
$start
;
$this
->
end
=
$end
;
}
/**
* @return Constraint
*/
public
function
getStart
()
{
return
$this
->
start
;
}
/**
* @return Constraint
*/
public
function
getEnd
()
{
return
$this
->
end
;
}
/**
* @return Constraint
*/
public
static
function
fromZero
()
{
static
$zero
;
if
(
null
===
$zero
)
{
$zero
=
new
Constraint
(
'>='
,
'0.0.0.0-dev'
);
}
return
$zero
;
}
/**
* @return Constraint
*/
public
static
function
untilPositiveInfinity
()
{
static
$positiveInfinity
;
if
(
null
===
$positiveInfinity
)
{
$positiveInfinity
=
new
Constraint
(
'<'
,
PHP_INT_MAX
.
'.0.0.0'
);
}
return
$positiveInfinity
;
}
/**
* @return self
*/
public
static
function
any
()
{
return
new
self
(
self
::
fromZero
(),
self
::
untilPositiveInfinity
());
}
/**
* @return array{'names': string[], 'exclude': bool}
*/
public
static
function
anyDev
()
{
// any == exclude nothing
return
array
(
'names'
=>
array
(),
'exclude'
=>
true
);
}
/**
* @return array{'names': string[], 'exclude': bool}
*/
public
static
function
noDev
()
{
// nothing == no names included
return
array
(
'names'
=>
array
(),
'exclude'
=>
false
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Aug 18, 13:55 (4 w, 8 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b6/2b/7cbe01f8b7b03ec9a21de09176d2
Default Alt Text
Interval.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment