diff options
author | Andres Rey <[email protected]> | 2018-11-01 23:21:27 +0000 |
---|---|---|
committer | Andres Rey <[email protected]> | 2018-11-01 23:21:27 +0000 |
commit | 8e144af7cade71f4b5d72a102c9919e9fc0e6e8f (patch) | |
tree | f9e28ea79812ac44e691213aa26350e21eb75b31 /src/Readability.php | |
parent | 3a6a923391f540638ec8bae8ed62e75cea2dbea4 (diff) |
Switch to array_intersect
Diffstat (limited to 'src/Readability.php')
-rw-r--r-- | src/Readability.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Readability.php b/src/Readability.php index 506a478..7caf838 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -333,7 +333,7 @@ class Readability * Will probably replace it with ??s after dropping support of PHP5.6 */ - $key = current(array_intersect_key([ + $key = current(array_intersect([ 'dc:title', 'dcterm:title', 'og:title', @@ -350,7 +350,7 @@ class Readability } // get author - $key = current(array_intersect_key([ + $key = current(array_intersect([ 'dc:creator', 'dcterm:creator', 'author' @@ -359,7 +359,7 @@ class Readability $this->setAuthor(isset($values[$key]) ? $values[$key] : null); // get description - $key = current(array_intersect_key([ + $key = current(array_intersect([ 'dc:description', 'dcterm:description', 'og:description', @@ -372,7 +372,7 @@ class Readability $this->setExcerpt(isset($values[$key]) ? $values[$key] : null); // get main image - $key = current(array_intersect_key([ + $key = current(array_intersect([ 'og:image', 'twitter:image' ], array_keys($values))); |