public function check($data) { try { $row = 0; for ($i = 0; $i < count($data); $i++) { $row++; if (isset($data[$i]['date'])) { DataChecker::checkDate($data[$i]['date']); } if (isset($data[$i]['amount_to_develop'])) { DataChecker::checkAmount($data[$i]['amount_to_develop']); } if (isset($data[$i]['id_size'])) { DataChecker::checkSize($data[$i]['id_size']); } if ($data[$i]['id_style']) { DataChecker::checkStyle($data[$i]['id_style']); } if (isset($data[$i]['manufactured'])) { DataChecker::checkManufactured($data[$i]['manufactured'], $data[$i]['amount_to_develop']); } if (isset($data[$i]['id_worker'])) { DataChecker::checkWorker($data[$i]['id_worker']); } } } catch (Exception $e) { throw new Exception($e->getMessage() . 'в строчці ' . $row); } return true; }