getCounter($entity); } public function hasSharedCounter() : bool { return $this->getSettingsByKey($shared_invoice_quote_counter)->shared_invoice_quote_counter; } private function incrementCounter($entity) { } private function entity_name($entity) { return strtolower(class_basename($entity)); } public function getCounter($entity) : int { $counter = $this->entity_name($entity) . '_number_counter'; return $this->getSettingsByKey( $counter )->{$counter}; } }