@@ -87,7 +87,7 @@ class Diff
8787 * The values can be of type string or array.
8888 * If the type is string, it's split into array elements by line-end characters.
8989 *
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
9191 * associative array where each key-value pair represents an option and its value (E.g. ['context' => 3], ...).
9292 * When a keyName matches the name of a default option, that option's value will be overridden by the key's value.
9393 * 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 = [])
110110 }
111111
112112 /**
113- * Get the type of a variable.
113+ * Get the kind of variable.
114114 *
115115 * The return value depend on the type of variable:
116116 * 0 If the type is 'array'
@@ -200,11 +200,11 @@ public function render(object $renderer)
200200 * @param int|null $end The last element of the range to get.
201201 * If not supplied, only the element at start will be returned.
202202 *
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.
204204 * @throws OutOfRangeException When the value of start or end are invalid to define a range.
205205 *
206206 */
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
208208 {
209209 if ($ start < 0 || $ end < 0 || $ end < $ start ) {
210210 throw new OutOfRangeException ('Start parameter must be lower than End parameter while both are positive! ' );
@@ -274,7 +274,7 @@ public function getGroupedOpCodes(): array
274274 *
275275 * @return float Similarity ratio.
276276 */
277- public function getSimilarity ($ method = Similarity::CALC_DEFAULT ): float
277+ public function getSimilarity (int $ method = Similarity::CALC_DEFAULT ): float
278278 {
279279 if ($ this ->similarity !== null ) {
280280 return $ this ->similarity ;
0 commit comments