LDAP authentication support (#815)

This commit is contained in:
Kevin Papst
2019-06-07 22:48:39 +02:00
committed by GitHub
parent bcf1ebd778
commit 0c0e9c2f71
99 changed files with 3542 additions and 926 deletions

View File

@@ -23,7 +23,7 @@ use App\Repository\Query\InvoiceQuery;
class InvoiceModel
{
/**
* @var Customer
* @var Customer|null
*/
protected $customer;
@@ -95,36 +95,26 @@ class InvoiceModel
* @param Timesheet[] $entries
* @return InvoiceModel
*/
public function setEntries(array $entries)
public function setEntries(array $entries): InvoiceModel
{
$this->entries = $entries;
return $this;
}
/**
* @return InvoiceTemplate
*/
public function getTemplate(): ?InvoiceTemplate
{
return $this->template;
}
/**
* @param InvoiceTemplate $template
* @return InvoiceModel
*/
public function setTemplate(InvoiceTemplate $template)
public function setTemplate(InvoiceTemplate $template): InvoiceModel
{
$this->template = $template;
return $this;
}
/**
* @return Customer
*/
public function getCustomer()
public function getCustomer(): ?Customer
{
return $this->customer;
}
@@ -133,16 +123,13 @@ class InvoiceModel
* @param Customer $customer
* @return InvoiceModel
*/
public function setCustomer($customer)
public function setCustomer($customer): InvoiceModel
{
$this->customer = $customer;
return $this;
}
/**
* @return \DateTime
*/
public function getDueDate(): ?\DateTime
{
if (null === $this->getTemplate()) {
@@ -160,11 +147,7 @@ class InvoiceModel
return $this->invoiceDate;
}
/**
* @param NumberGeneratorInterface $generator
* @return InvoiceModel
*/
public function setNumberGenerator(NumberGeneratorInterface $generator)
public function setNumberGenerator(NumberGeneratorInterface $generator): InvoiceModel
{
$this->generator = $generator;
$this->generator->setModel($this);
@@ -172,19 +155,12 @@ class InvoiceModel
return $this;
}
/**
* @return NumberGeneratorInterface
*/
public function getNumberGenerator(): ?NumberGeneratorInterface
{
return $this->generator;
}
/**
* @param CalculatorInterface $calculator
* @return InvoiceModel
*/
public function setCalculator(CalculatorInterface $calculator)
public function setCalculator(CalculatorInterface $calculator): InvoiceModel
{
$this->calculator = $calculator;
$this->calculator->setModel($this);
@@ -192,9 +168,6 @@ class InvoiceModel
return $this;
}
/**
* @return CalculatorInterface
*/
public function getCalculator(): ?CalculatorInterface
{
return $this->calculator;

View File

@@ -33,7 +33,7 @@ class TimesheetStatistic
*/
protected $amountTotal = 0;
/**
* @var \DateTime
* @var \DateTime|null
*/
protected $firstEntry;
/**
@@ -41,10 +41,7 @@ class TimesheetStatistic
*/
protected $recordsTotal = 0;
/**
* @return int
*/
public function getDurationThisMonth()
public function getDurationThisMonth(): int
{
return $this->durationThisMonth;
}
@@ -57,10 +54,7 @@ class TimesheetStatistic
$this->durationThisMonth = (int) $durationThisMonth;
}
/**
* @return int
*/
public function getAmountTotal()
public function getAmountTotal(): int
{
return $this->amountTotal;
}
@@ -73,10 +67,7 @@ class TimesheetStatistic
$this->amountTotal = (int) $amountTotal;
}
/**
* @return int
*/
public function getDurationTotal()
public function getDurationTotal(): int
{
return $this->durationTotal;
}
@@ -89,10 +80,7 @@ class TimesheetStatistic
$this->durationTotal = (int) $durationTotal;
}
/**
* @return int
*/
public function getAmountThisMonth()
public function getAmountThisMonth(): int
{
return $this->amountThisMonth;
}
@@ -105,10 +93,7 @@ class TimesheetStatistic
$this->amountThisMonth = (int) $amountThisMonth;
}
/**
* @return DateTime
*/
public function getFirstEntry()
public function getFirstEntry(): ?\DateTime
{
return $this->firstEntry;
}