Миграция на php8.1

* enum-ы теперь enum-ы, а не говно -- теперь всё переведено на них, где это было возможно
* некоторые свойства классов объявлены в конструкторе
* некоторые классы перемещены в корневой неймспейс
* исправлен код-стайл, вычищен некоторый мусор, выправлены тесты... работы над этим продолжаются
This commit is contained in:
2022-12-15 00:19:55 +08:00
parent 692ae43f9f
commit 4157ab68f5
120 changed files with 1098 additions and 1401 deletions

View File

@@ -1,4 +1,5 @@
<?php
/*
* Copyright (c) 2020-2021 Антон Аксенов (Anthony Axenov)
*
@@ -30,7 +31,7 @@ class PayingAgentTest extends BasicTestCase
*/
public function testConstructorWithoutArgs(): void
{
$this->assertEquals('[]', (string)(new PayingAgent()));
$this->assertSame('[]', (string)(new PayingAgent()));
}
/**
@@ -49,13 +50,16 @@ class PayingAgentTest extends BasicTestCase
public function testConstructorWithArgs(): void
{
$operation = Helpers::randomStr();
$this->assertIsAtolable(new PayingAgent(
$operation,
['+122997365456'],
), [
'operation' => $operation,
'phones' => ['+122997365456'],
]);
$this->assertIsAtolable(
new PayingAgent(
$operation,
['+122997365456'],
),
[
'operation' => $operation,
'phones' => ['+122997365456'],
]
);
$this->assertIsAtolable(
new PayingAgent($operation),
['operation' => $operation]