PluginProbe ʕ •ᴥ•ʔ
Matomo Analytics – Powerful, Privacy-First Insights for WordPress / trunk
Matomo Analytics – Powerful, Privacy-First Insights for WordPress vtrunk
5.11.1 5.11.0 5.10.2 5.10.1 trunk 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.3.2 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.1.3 4.10.0 4.11.0 4.12.0 4.13.0 4.13.2 4.13.3 4.13.4 4.13.5 4.14.0 4.14.1 4.14.2 4.15.0 4.15.1 4.15.2 4.15.3 4.2.0 4.3.0 4.3.1 4.4.1 4.4.2 4.5.0 4.6.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.10.0 5.2.0 5.2.1 5.2.2 5.3.0 5.3.1 5.3.2 5.3.3 5.6.0 5.6.1 5.7.0 5.7.1 5.8.0 5.8.1 5.8.2
matomo / app / vendor / composer / semver / src / Interval.php
matomo / app / vendor / composer / semver / src Last commit date
Constraint 1 year ago Comparator.php 1 year ago CompilingMatcher.php 1 year ago Interval.php 1 year ago Intervals.php 1 year ago Semver.php 7 months ago VersionParser.php 1 year ago
Interval.php
99 lines
1 <?php
2
3 /*
4 * This file is part of composer/semver.
5 *
6 * (c) Composer <https://github.com/composer>
7 *
8 * For the full copyright and license information, please view
9 * the LICENSE file that was distributed with this source code.
10 */
11
12 namespace Composer\Semver;
13
14 use Composer\Semver\Constraint\Constraint;
15
16 class Interval
17 {
18 /** @var Constraint */
19 private $start;
20 /** @var Constraint */
21 private $end;
22
23 public function __construct(Constraint $start, Constraint $end)
24 {
25 $this->start = $start;
26 $this->end = $end;
27 }
28
29 /**
30 * @return Constraint
31 */
32 public function getStart()
33 {
34 return $this->start;
35 }
36
37 /**
38 * @return Constraint
39 */
40 public function getEnd()
41 {
42 return $this->end;
43 }
44
45 /**
46 * @return Constraint
47 */
48 public static function fromZero()
49 {
50 static $zero;
51
52 if (null === $zero) {
53 $zero = new Constraint('>=', '0.0.0.0-dev');
54 }
55
56 return $zero;
57 }
58
59 /**
60 * @return Constraint
61 */
62 public static function untilPositiveInfinity()
63 {
64 static $positiveInfinity;
65
66 if (null === $positiveInfinity) {
67 $positiveInfinity = new Constraint('<', PHP_INT_MAX.'.0.0.0');
68 }
69
70 return $positiveInfinity;
71 }
72
73 /**
74 * @return self
75 */
76 public static function any()
77 {
78 return new self(self::fromZero(), self::untilPositiveInfinity());
79 }
80
81 /**
82 * @return array{'names': string[], 'exclude': bool}
83 */
84 public static function anyDev()
85 {
86 // any == exclude nothing
87 return array('names' => array(), 'exclude' => true);
88 }
89
90 /**
91 * @return array{'names': string[], 'exclude': bool}
92 */
93 public static function noDev()
94 {
95 // nothing == no names included
96 return array('names' => array(), 'exclude' => false);
97 }
98 }
99