1
0
mirror of https://github.com/jupeter/clean-code-php.git synced 2025-09-26 05:59:04 +02:00

Update Prefer composition over inheritance

This commit is contained in:
Jack Sheppard
2020-03-11 13:33:12 +01:00
committed by GitHub
parent 006f2c440f
commit 390ff76f93

View File

@@ -1298,9 +1298,9 @@ class Employee
$this->email = $email; $this->email = $email;
} }
public function setTaxData(string $ssn, string $salary) public function setTaxData(EmployeeTaxData $taxData)
{ {
$this->taxData = new EmployeeTaxData($ssn, $salary); $this->taxData = $taxData;
} }
// ... // ...