@@ -47,6 +47,11 @@ discard block |
||
47 | 47 | */ |
48 | 48 | private $build; |
49 | 49 | |
50 | + /** |
|
51 | + * @param integer $major |
|
52 | + * @param integer $minor |
|
53 | + * @param integer $patch |
|
54 | + */ |
|
50 | 55 | private function __construct($major, $minor, $patch, PreRelease $preRelease, Build $build) |
51 | 56 | { |
52 | 57 | $this->major = $major; |
@@ -83,6 +88,10 @@ discard block |
||
83 | 88 | return new self($major, $minor, $patch, $preRelease, $build); |
84 | 89 | } |
85 | 90 | |
91 | + /** |
|
92 | + * @param string $element |
|
93 | + * @param integer $value |
|
94 | + */ |
|
86 | 95 | private static function validateVersionElement($element, $value) |
87 | 96 | { |
88 | 97 | if (!is_int($value) || $value < 0) { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $identifiers = []; |
52 | 52 | |
53 | 53 | foreach ($identifiersArray as $id) { |
54 | - $identifiers[]= self::createIdentifier($id); |
|
54 | + $identifiers[] = self::createIdentifier($id); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | return new static($identifiers); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $ids = explode('.', $identifiersString); |
66 | 66 | |
67 | 67 | foreach ($ids as $id) { |
68 | - $identifiers[]= self::createIdentifier($id); |
|
68 | + $identifiers[] = self::createIdentifier($id); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | return new static($identifiers); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | public function toArray() |
123 | 123 | { |
124 | - return array_map(function ($identifier) { |
|
124 | + return array_map(function($identifier) { |
|
125 | 125 | return $identifier->getValue(); |
126 | 126 | }, $this->identifiers); |
127 | 127 | } |
@@ -84,7 +84,7 @@ |
||
84 | 84 | $direction = (true === $direction) ? self::SORT_DESC : self::SORT_ASC; |
85 | 85 | } |
86 | 86 | |
87 | - usort($this->versions, function (Version $a, Version $b) use ($direction) { |
|
87 | + usort($this->versions, function(Version $a, Version $b) use ($direction) { |
|
88 | 88 | $result = $a->compareTo($b); |
89 | 89 | |
90 | 90 | if ($direction == self::SORT_DESC) { |