diff --git a/src/Readability.php b/src/Readability.php index 01744b1..906b37b 100755 --- a/src/Readability.php +++ b/src/Readability.php @@ -9,8 +9,13 @@ class Readability { - private $content; + private ?FFReadability $content; + /** + * Parse the content + * + * @throws Exception + */ public function parse(string $content): self { $this->content = new FFReadability(new Configuration()); @@ -18,8 +23,8 @@ public function parse(string $content): self $this->content->parse($content); } catch (ParseException $e) { $this->content = null; - error_log('Cannot parse: '.$e->getMessage()); - throw new Exception('Cannot parse: '.$e->getMessage()); + error_log('Cannot parse: ' . $e->getMessage()); + throw new Exception('Cannot parse: ' . $e->getMessage()); } return $this;