DX: apply rector rules up to php8.0

This commit is contained in:
2023-04-15 01:05:37 +02:00
parent d8870e906f
commit dde3002100
714 changed files with 2348 additions and 9263 deletions

View File

@@ -19,14 +19,6 @@ use Doctrine\ORM\Mapping as ORM;
*/
class DocumentCategory
{
/**
* @ORM\Id
* @ORM\Column(type="string", name="bundle_id")
*
* @var string The id of the bundle that has create the category (i.e. 'person', 'activity', ....)
*/
private $bundleId;
/**
* @ORM\Column(type="string", name="document_class")
*
@@ -34,23 +26,31 @@ class DocumentCategory
*/
private $documentClass;
/**
* @ORM\Id
* @ORM\Column(type="integer", name="id_inside_bundle")
*
* @var int The id which is unique inside the bundle
*/
private $idInsideBundle;
/**
* @ORM\Column(type="json")
*/
private $name;
public function __construct($bundleId, $idInsideBundle)
{
$this->bundleId = $bundleId;
$this->idInsideBundle = $idInsideBundle;
/**
* @param string $bundleId
* @param int $idInsideBundle
*/
public function __construct(
/**
* @ORM\Id
* @ORM\Column(type="string", name="bundle_id")
*
* @var string The id of the bundle that has create the category (i.e. 'person', 'activity', ....)
*/
private $bundleId,
/**
* @ORM\Id
* @ORM\Column(type="integer", name="id_inside_bundle")
*
* @var int The id which is unique inside the bundle
*/
private $idInsideBundle
) {
}
public function getBundleId() // ::class BundleClass (FQDN)

View File

@@ -96,12 +96,6 @@ class StoredObject implements AsyncFileInterface, Document, TrackCreationInterfa
*/
private ?DocGeneratorTemplate $template = null;
/**
* @ORM\Column(type="text", options={"default": "ready"})
* @Serializer\Groups({"read"})
*/
private string $status;
/**
* Store the number of times a generation has been tryied for this StoredObject.
*
@@ -115,10 +109,13 @@ class StoredObject implements AsyncFileInterface, Document, TrackCreationInterfa
/**
* @param StoredObject::STATUS_* $status
*/
public function __construct(string $status = "ready")
{
public function __construct(/**
* @ORM\Column(type="text", options={"default": "ready"})
* @Serializer\Groups({"read"})
*/
private string $status = "ready"
) {
$this->uuid = Uuid::uuid4();
$this->status = $status;
}
public function addGenerationTrial(): self