/** * Fills the given table with fake data. * * @param string|null $tableName * * @return array $rows * @throws \Fakerino\FakeData\Exception\MissingRequiredOptionException */ public function fakeTable($tableName = null) { if ($tableName === null) { throw new MissingRequiredOptionException('table name'); } $connectionParams = FakerinoConf::get('database'); $dbFiller = new DbFiller($connectionParams, $this->db, $tableName, $this, $this->num); $rows = $dbFiller->fill(); return $rows; }
/** * Fills the given table with fake data. * * @param string|null $tableName * * @return array $rows * @throws \Fakerino\FakeData\Exception\MissingRequiredOptionException */ public function fakeTable($tableName = null) { if (null === $tableName) { throw new MissingRequiredOptionException('table name'); } $dbFiller = new DbFiller($this->db, $tableName, $this, $this->num); $rows = $dbFiller->fill(); return $rows; }