@@ -87,7 +87,7 @@ class Diff
87
87
* The values can be of type string or array.
88
88
* If the type is string, it's split into array elements by line-end characters.
89
89
*
90
- * Options for comparison can be set by using the third parameter. The format of this value is expected to be a
90
+ * Options for comparison can be set by using the third parameter. The format of this value is expected to be an
91
91
* associative array where each key-value pair represents an option and its value (E.g. ['context' => 3], ...).
92
92
* When a keyName matches the name of a default option, that option's value will be overridden by the key's value.
93
93
* Any other keyName (and it's value) can be added as an option, but will not be used if not implemented.
@@ -110,7 +110,7 @@ public function __construct($version1, $version2, array $options = [])
110
110
}
111
111
112
112
/**
113
- * Get the type of a variable.
113
+ * Get the kind of variable.
114
114
*
115
115
* The return value depend on the type of variable:
116
116
* 0 If the type is 'array'
@@ -200,11 +200,11 @@ public function render(object $renderer)
200
200
* @param int|null $end The last element of the range to get.
201
201
* If not supplied, only the element at start will be returned.
202
202
*
203
- * @return array Array containing all of the elements of the specified range.
203
+ * @return array Array containing all the elements of the specified range.
204
204
* @throws OutOfRangeException When the value of start or end are invalid to define a range.
205
205
*
206
206
*/
207
- public function getArrayRange (array $ array , int $ start = 0 , $ end = null ): array
207
+ public function getArrayRange (array $ array , int $ start = 0 , ? int $ end = null ): array
208
208
{
209
209
if ($ start < 0 || $ end < 0 || $ end < $ start ) {
210
210
throw new OutOfRangeException ('Start parameter must be lower than End parameter while both are positive! ' );
@@ -274,7 +274,7 @@ public function getGroupedOpCodes(): array
274
274
*
275
275
* @return float Similarity ratio.
276
276
*/
277
- public function getSimilarity ($ method = Similarity::CALC_DEFAULT ): float
277
+ public function getSimilarity (int $ method = Similarity::CALC_DEFAULT ): float
278
278
{
279
279
if ($ this ->similarity !== null ) {
280
280
return $ this ->similarity ;
0 commit comments