Skip to content

Commit

Permalink
Remove static
Browse files Browse the repository at this point in the history
  • Loading branch information
meklis committed Jun 11, 2024
1 parent 05fb11a commit a7f2e73
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Config/Collector.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ abstract class Collector
/**
* @var Collector
*/
protected static $instance;
protected $instance;

/**
* @var Reader
Expand All @@ -20,11 +20,8 @@ public static function init(Reader $reader) {
$instance = new static();
$instance->reader = $reader;
$instance->read();
self::$instance = $instance;
return self::$instance;
}
public static function getInstance() {
return self::$instance;
$instance->instance = $instance;
return $instance;
}
protected abstract function read();
}

0 comments on commit a7f2e73

Please sign in to comment.