diff --git a/~dev_rating/application/classes/Model/Helper/StudentBuilder.php b/~dev_rating/application/classes/Model/Helper/StudentBuilder.php index 23ee765fda72855f961a3ece19483d691dd50efa..7d63a1491e4173118d09baf4137757c6a0f5edc2 100644 --- a/~dev_rating/application/classes/Model/Helper/StudentBuilder.php +++ b/~dev_rating/application/classes/Model/Helper/StudentBuilder.php @@ -20,49 +20,49 @@ class Model_Helper_StudentBuilder extends Model_Helper_Builder return new Model_Student($this->data, false); } - function & lastName($string) { + public function & lastName($string) { $string = trim($string); # todo: remove empty symbols - if (!strlen($string)) + if (!$string) throw new InvalidArgumentException('Last name can\'t be empty'); $this->data['LastName'] = $string; return $this; } - function & firstName($string) { + public function & firstName($string) { $string = trim($string); - if (!strlen($string)) + if (!$string) throw new InvalidArgumentException('First name can\'t be empty'); $this->data['FirstName'] = $string; return $this; } - function & secondName($string) { + public function & secondName($string) { $this->data['SecondName'] = trim($string); return $this; } - function & grade($id) { + public function & grade($id) { if (!is_numeric($id) || $id <= 0) throw new InvalidArgumentException('Grade id is incorrect'); $this->data['GradeID'] = (int) $id; return $this; } - function & group($num) { + public function & group($num) { if (!is_numeric($num) || $num <= 0) throw new InvalidArgumentException('GroupNum id is incorrect'); $this->data['GroupNum'] = (int) $num; return $this; } - function & faculty($id) { + public function & faculty($id) { if (!is_numeric($id) || $id <= 0) throw new InvalidArgumentException('Faculty id is incorrect'); $this->data['FacultyID'] = (int) $id; return $this; } - function & semester($id) { + public function & semester($id) { if (!is_numeric($id) || $id <= 0) throw new InvalidArgumentException('Semester id is incorrect'); $this->data['SemesterID'] = (int) $id;