<?php
public function calculateDepartmentTotalSalary() {
	$totalSalary = 0;

	foreach ($this->employees as $key => $Employee) {
		$totalSalary += $Employee->salary; //Department.php line 30
	}

	return $totalSalary;
}

=====================================
class Employee {
	public $name;

	public $rang;
	public $salary;
	public $coffee;
	public $document;
	public $leader;

	public function __construct($name, $salary, $coffee, $document, $rang = 1, $leader = false) {
		$this->name = $name;
		$this->salary = $salary;
		$this->coffee = $coffee;
		$this->document = $document;
		$this->rang = $rang;
		$this->leader = $leader;

		$this->salary = $this->calculateSalary();
		$this->coffee  = $this->calculateCoffee();
		$this->document = $this->calculateDocument();
	}