From 501e29f71c5d863879eb67ed311549ee46e5a04b Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Thu, 26 Jun 2014 11:55:23 +0200 Subject: style fixes --- articleenhancer/xpatharticleenhancer.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'articleenhancer') diff --git a/articleenhancer/xpatharticleenhancer.php b/articleenhancer/xpatharticleenhancer.php index 0f541c2ce..4037d88ac 100644 --- a/articleenhancer/xpatharticleenhancer.php +++ b/articleenhancer/xpatharticleenhancer.php @@ -56,11 +56,14 @@ class XPathArticleEnhancer implements ArticleEnhancer { $file = $this->getFile($item->getUrl()); // convert encoding by detecting charset from header - $contentType = $file->headers['content-type']; + /** @noinspection PhpUndefinedFieldInspection */ + $contentType = $file->headers['content-type']; if( preg_match( '/(?<=charset=)[^;]*/', $contentType, $matches ) ) { - $body = mb_convert_encoding($file->body, 'HTML-ENTITIES', $matches[0]); + /** @noinspection PhpUndefinedFieldInspection */ + $body = mb_convert_encoding($file->body, 'HTML-ENTITIES', $matches[0]); } else { - $body = $file->body; + /** @noinspection PhpUndefinedFieldInspection */ + $body = $file->body; } $dom = new \DOMDocument(); -- cgit v1.2.3