Browse Source

Reset data between queries

pull/3/head
Richard Dern 3 months ago
parent
commit
936dfcac6d
  1. 6
      package/Analyzer.php

6
package/Analyzer.php

@ -104,7 +104,7 @@ class Analyzer extends GenericObject
* @param string $source
* @return void
*/
protected function setSourceAttribute(string $source)
protected function setSourceAttribute(?string $source)
{
if (!empty($this->attributes['source'])) {
return;
@ -136,6 +136,8 @@ class Analyzer extends GenericObject
*/
public function analyzeUrl(string $url): self
{
$this->reset();
$this->source = self::SOURCE_URL;
$this->sourceUrl = $url;
@ -159,6 +161,8 @@ class Analyzer extends GenericObject
*/
public function analyzeBody(string $body, bool $deleteAfter = true): self
{
$this->reset();
$this->source = self::SOURCE_BODY;
$filename = $this->storeBodyOnDisk($body);

Loading…
Cancel
Save