diff --git a/app/Services/DirectonHtmlBuilder.php b/app/Services/DirectonHtmlBuilder.php index aa558f5..0cbe345 100644 --- a/app/Services/DirectonHtmlBuilder.php +++ b/app/Services/DirectonHtmlBuilder.php @@ -4,6 +4,7 @@ namespace App\Services; use Illuminate\Support\Facades\URL; +// phpcs:disable class DirectonHtmlBuilder { private array $direction; @@ -27,10 +28,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,18 +43,20 @@ 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,7 +67,7 @@ class DirectonHtmlBuilder
'; 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 { @@ -79,7 +82,7 @@ class DirectonHtmlBuilder
'; if (array_key_exists('СПО', $direction['entrance_examinations'])) { foreach ($direction['entrance_examinations']['СПО']['Обязательные'] as $key => $el) { - $SPO .= '' . $key . ' - ' . '' . $el . '
'; + $SPO .= '' . $key . ' - ' . '' . $el . '
' ; } $SPO .= '
'; } else { @@ -87,12 +90,13 @@ class DirectonHtmlBuilder } + $mgtu = ''; 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 .= " {$forms} - " . " {$budget_places}
"; + $profile_content .= " {$forms} - " . " {$budget_places}
"; } $tmp = str_replace(' ', '', $profile_name); $tmp = str_replace(',', '', $tmp); @@ -109,7 +113,7 @@ class DirectonHtmlBuilder - "; + " ; } } // if($direction['name'] == 'Нефтегазовое дело') { @@ -118,6 +122,9 @@ class DirectonHtmlBuilder // dd($direction); + + + $filial = ''; if (array_key_exists('Филиал МГТУ (пос. Яблоновский)', $direction['budget_places'])) { foreach ($direction['budget_places']['Филиал МГТУ (пос. Яблоновский)'] as $profile_name => $profile) { @@ -140,7 +147,7 @@ class DirectonHtmlBuilder - "; + " ; } } else { $filial = '
Этой специальности нет в филиалле
'; @@ -148,13 +155,13 @@ class DirectonHtmlBuilder $paid_places_content = ''; foreach ($direction['paid_places'] as $institution) { foreach ($institution as $profile_name => $profile) { - $profile_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 .= "
+ $tmp = str_replace(' ', '', $profile_name); + $tmp = str_replace(',', '', $tmp); + $paid_places_content .= "

- "; + " ; } }