oliverdavies.uk/content/node.84a6f9be-759c-42ea-815b-6b29a90b7742.json
2025-05-30 02:34:52 +01:00

100 lines
No EOL
3.8 KiB
JSON

{
"uuid": [
{
"value": "84a6f9be-759c-42ea-815b-6b29a90b7742"
}
],
"langcode": [
{
"value": "en"
}
],
"type": [
{
"target_id": "daily_email",
"target_type": "node_type",
"target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7"
}
],
"revision_timestamp": [
{
"value": "2025-05-11T09:00:26+00:00"
}
],
"revision_uid": [
{
"target_type": "user",
"target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849"
}
],
"revision_log": [],
"status": [
{
"value": true
}
],
"uid": [
{
"target_type": "user",
"target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849"
}
],
"title": [
{
"value": "Suffixing names\n"
}
],
"created": [
{
"value": "2023-12-10T00:00:00+00:00"
}
],
"changed": [
{
"value": "2025-05-11T09:00:26+00:00"
}
],
"promote": [
{
"value": false
}
],
"sticky": [
{
"value": false
}
],
"default_langcode": [
{
"value": true
}
],
"revision_translation_affected": [
{
"value": true
}
],
"path": [
{
"alias": "\/daily\/2023\/12\/10\/suffixing-names",
"langcode": "en"
}
],
"body": [
{
"value": "\n <p>When writing code, it's common to suffix the class name with the type of class it is.<\/p>\n\n<p>I do this often for most types of classes, such as Controllers, EventListeners, Factories, Repositories and Builders.<\/p>\n\n<p>However, I don't always for value objects and data transfer objects (DTOs).<\/p>\n\n<p>Also, I don't always suffix interfaces with <code>Interface<\/code>.<\/p>\n\n<p>I've been re-reading the documentation for the Symfony Serializer component, which references both <code>NameConverterInterface<\/code> and <code>MyDto::class<\/code>.<\/p>\n\n<p>Whilst it does make the names more verbose, it does clarify what the class is used for.<\/p>\n\n<p>Symfony's coding standards and Drupal's PHP coding standards have conventions for this, but what do you think?<\/p>\n\n<p>Do you add suffixes to your class or interface names, or do you prefer the simplified versions?<\/p>\n\n ",
"format": "full_html",
"processed": "\n <p>When writing code, it's common to suffix the class name with the type of class it is.<\/p>\n\n<p>I do this often for most types of classes, such as Controllers, EventListeners, Factories, Repositories and Builders.<\/p>\n\n<p>However, I don't always for value objects and data transfer objects (DTOs).<\/p>\n\n<p>Also, I don't always suffix interfaces with <code>Interface<\/code>.<\/p>\n\n<p>I've been re-reading the documentation for the Symfony Serializer component, which references both <code>NameConverterInterface<\/code> and <code>MyDto::class<\/code>.<\/p>\n\n<p>Whilst it does make the names more verbose, it does clarify what the class is used for.<\/p>\n\n<p>Symfony's coding standards and Drupal's PHP coding standards have conventions for this, but what do you think?<\/p>\n\n<p>Do you add suffixes to your class or interface names, or do you prefer the simplified versions?<\/p>\n\n ",
"summary": null
}
],
"feeds_item": [
{
"imported": "1970-01-01T00:32:50+00:00",
"guid": null,
"hash": "5c2783e9ca75aee09edea870a5cf5f42",
"target_type": "feeds_feed",
"target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76"
}
]
}