public function __construct(DbInterface $db, $tableName, FakeDataFactory $faker, $num = 1) { $this->db = $db; $this->faker = $faker; $db->connect(); $db->setTable($tableName); $this->num = $num; }