diff -r 34716fd837a4 -r be944660c56a wp/wp-includes/Text/Diff.php --- a/wp/wp-includes/Text/Diff.php Tue Dec 15 15:52:01 2020 +0100 +++ b/wp/wp-includes/Text/Diff.php Wed Sep 21 18:19:35 2022 +0200 @@ -75,7 +75,7 @@ * * @since Text_Diff 1.1.0 * - * @return integer The number of new lines + * @return int The number of new lines */ function countAddedLines() { @@ -94,7 +94,7 @@ * * @since Text_Diff 1.1.0 * - * @return integer The number of deleted lines + * @return int The number of deleted lines */ function countDeletedLines() { @@ -139,7 +139,7 @@ /** * Checks for an empty diff. * - * @return boolean True if two sequences were identical. + * @return bool True if two sequences were identical. */ function isEmpty() { @@ -156,7 +156,7 @@ * * This is mostly for diagnostic purposes. * - * @return integer The length of the LCS. + * @return int The length of the LCS. */ function lcs() { @@ -210,7 +210,7 @@ * with array_walk(). * * @param string $line The line to trim. - * @param integer $key The index of the line in the array. Not used. + * @param int $key The index of the line in the array. Not used. */ static function trimNewlines(&$line, $key) { @@ -220,14 +220,12 @@ /** * Determines the location of the system temporary directory. * - * @static - * * @access protected * * @return string A directory name which can be used for temp files. * Returns false if one could not be found. */ - function _getTempDir() + static function _getTempDir() { $tmp_locations = array('/tmp', '/var/tmp', 'c:\WUTemp', 'c:\temp', 'c:\windows\temp', 'c:\winnt\temp'); @@ -278,7 +276,7 @@ $prevtype = null; foreach ($this->_edits as $edit) { - if ($prevtype == get_class($edit)) { + if ($edit instanceof $prevtype) { trigger_error("Edit sequence is non-optimal", E_USER_ERROR); } $prevtype = get_class($edit);