mirror of
https://github.com/grocy/grocy.git
synced 2025-10-14 09:11:11 +00:00
Optimized imports
This commit is contained in:
@@ -10,12 +10,6 @@ use Mike42\Escpos\Printer;
|
||||
|
||||
class PrintService extends BaseService
|
||||
{
|
||||
/**
|
||||
* @param bool $printHeader Printing of Grocy logo
|
||||
* @param string[] $lines Items to print
|
||||
* @return string[] Returns array with result OK if no exception
|
||||
* @throws Exception If unable to print, an exception is thrown
|
||||
*/
|
||||
public function printShoppingList(bool $printHeader, array $lines): array
|
||||
{
|
||||
$printer = self::getPrinterHandle();
|
||||
@@ -43,11 +37,6 @@ class PrintService extends BaseService
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialises the printer
|
||||
* @return Printer Printer handle
|
||||
* @throws Exception If unable to connect to printer, an exception is thrown
|
||||
*/
|
||||
private static function getPrinterHandle()
|
||||
{
|
||||
if (GROCY_TPRINTER_IS_NETWORK_PRINTER)
|
||||
@@ -61,10 +50,6 @@ class PrintService extends BaseService
|
||||
return new Printer($connector);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints the grocy logo and date
|
||||
* @param Printer $printer Printer handle
|
||||
*/
|
||||
private static function printHeader(Printer $printer)
|
||||
{
|
||||
$date = new DateTime();
|
||||
|
Reference in New Issue
Block a user