Skip to content
Snippets Groups Projects
Commit e932e694 authored by Адлан Шамавов's avatar Адлан Шамавов
Browse files

Merge branch 'PTPS_Function_7' into PTPS_Function_8

parents 6d8198ea 4d1bcb5b
Branches PTPS_Function_8
No related tags found
1 merge request!8Ptps function 8
This commit is part of merge request !9. Comments created here will be created in the context of that merge request.
......@@ -5,7 +5,6 @@
use Hp\Test\Functions;
$func = new Functions();
?>
<!DOCTYPE html>
......@@ -72,7 +71,8 @@
];
print_r($func->prepareMenu($aMenu));
?>
<h1>Function 5</h1>
<?php
print "<h2>До НГ: </h2>";
......@@ -83,7 +83,6 @@
}
?>
<h1>Function 6</h1>
<?php
print "<h2>Пятницы 13: </h2>";
......
......@@ -4,20 +4,13 @@ declare(strict_types=1);
namespace Hp\Test;
use DateTimeImmutable;
use DateTime;
use DateInterval;
use DatePeriod;
use Exception;
use RuntimeException;
class Functions
{
/**
* Выполняет сортировку массива по убыванию цены
* @param array $array
* @return array
*/
* Выполняет сортировку массива по убыванию цены
* @param array $array
* @return array
*/
public function sortPrice(array $array): array
{
......@@ -144,7 +137,7 @@ class Functions
* ['name' => 'Посуда','depth' => 1,],]],
* ];
*/
/**
* Функция рассчитывает кол-во дней до нового года
* @param DateTimeImmutable $date дата от которой, необходимо рассчитать кол-во дней
......@@ -159,7 +152,6 @@ class Functions
return (int)$dateInterval->format("%a") + 1;
}
/**
* Вернет все пятницы 13 в году
* @param int $year год, в котором необходимо произвести расчет
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment