diff --git a/app/Services/DirectonHtmlBuilder.php b/app/Services/DirectonHtmlBuilder.php index 640ebcb..aa558f5 100644 --- a/app/Services/DirectonHtmlBuilder.php +++ b/app/Services/DirectonHtmlBuilder.php @@ -27,10 +27,10 @@ class DirectonHtmlBuilder } $education_form = substr($education_form, 0, -2); - + // phpcs:disable $period = '
'; foreach ($direction['period'] as $key => $el) { - $period .= '' . $key . ' - ' . '' . $el . '
' ; + $period .= '' . $key . ' - ' . '' . $el . '
'; } @@ -42,20 +42,18 @@ class DirectonHtmlBuilder
'; foreach ($direction['cost_paid_place'] as $key => $el) { - $paid_cost .= '' . $key . ' - ' . '' . $el . '
' ; + $paid_cost .= '' . $key . ' - ' . '' . $el . '
'; } $paid_cost .= '
'; - - $EGE = '
ЕГЭ

'; foreach ($direction['entrance_examinations']['ЕГЭ']['Обязательные'] as $key => $el) { - $EGE .= '' . $key . ' - ' . '' . $el . '
' ; + $EGE .= '' . $key . ' - ' . '' . $el . '
'; } $EGE .= '
'; @@ -64,12 +62,12 @@ class DirectonHtmlBuilder

'; - if(array_key_exists('Предметы по выбору', $direction['entrance_examinations']['ЕГЭ'])){ + if (array_key_exists('Предметы по выбору', $direction['entrance_examinations']['ЕГЭ'])) { foreach ($direction['entrance_examinations']['ЕГЭ']['Предметы по выбору'] as $key => $el) { - $po_viboru .= '' . $key . ' - ' . '' . $el . '
' ; + $po_viboru .= '' . $key . ' - ' . '' . $el . '
'; } $po_viboru .= '
'; - }else { + } else { $po_viboru = ''; } @@ -79,23 +77,21 @@ class DirectonHtmlBuilder

'; - if(array_key_exists('СПО', $direction['entrance_examinations'])){ - + if (array_key_exists('СПО', $direction['entrance_examinations'])) { foreach ($direction['entrance_examinations']['СПО']['Обязательные'] as $key => $el) { - $SPO .= '' . $key . ' - ' . '' . $el . '
' ; + $SPO .= '' . $key . ' - ' . '' . $el . '
'; } $SPO .= '
'; - }else { + } else { $SPO = ''; } $mgtu = ''; - if(array_key_exists('МГТУ', $direction['budget_places'])){ - + if (array_key_exists('МГТУ', $direction['budget_places'])) { foreach ($direction['budget_places']['МГТУ'] as $profile_name => $profile) { - $profile_content =''; - foreach($profile as $forms => $budget_places){ + $profile_content = ''; + foreach ($profile as $forms => $budget_places) { $profile_content .= " {$forms} - " . " {$budget_places}
"; } $tmp = str_replace(' ', '', $profile_name); @@ -113,7 +109,7 @@ class DirectonHtmlBuilder - " ; + "; } } // if($direction['name'] == 'Нефтегазовое дело') { @@ -122,15 +118,11 @@ class DirectonHtmlBuilder // dd($direction); - - - $filial = ''; - if(array_key_exists('Филиал МГТУ (пос. Яблоновский)', $direction['budget_places'])){ - + if (array_key_exists('Филиал МГТУ (пос. Яблоновский)', $direction['budget_places'])) { foreach ($direction['budget_places']['Филиал МГТУ (пос. Яблоновский)'] as $profile_name => $profile) { - $profile_content =''; - foreach($profile as $forms => $budget_places){ + $profile_content = ''; + foreach ($profile as $forms => $budget_places) { $profile_content .= " {$forms} - " . " {$budget_places}
"; } $tmp = str_replace(' ', '', $profile_name); @@ -148,23 +140,21 @@ class DirectonHtmlBuilder - " ; + "; } - } - else { + } else { $filial = '
Этой специальности нет в филиалле
'; } $paid_places_content = ''; foreach ($direction['paid_places'] as $institution) { foreach ($institution as $profile_name => $profile) { - - $profile_content = ''; - foreach ($profile as $forms => $paid_places) { - $profile_content .= " {$forms} - " . " {$paid_places}
"; - } - $tmp = str_replace(' ', '', $profile_name); - $tmp = str_replace(',', '', $tmp); - $paid_places_content .= "
+ $profile_content = ''; + foreach ($profile as $forms => $paid_places) { + $profile_content .= " {$forms} - " . " {$paid_places}
"; + } + $tmp = str_replace(' ', '', $profile_name); + $tmp = str_replace(',', '', $tmp); + $paid_places_content .= "

- " ; - + "; } }