Skip to content
Snippets Groups Projects

Ptps function 9

Merged Адлан Шамавов requested to merge PTPS_Function_9 into main
1 unresolved thread
2 files
+ 7
16
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 5
13
@@ -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 год, в котором необходимо произвести расчет
Loading