Skip to content

Commit

Permalink
[TASK] Followup- to improve "Services" chapter (#5219)
Browse files Browse the repository at this point in the history
Remove possible misread that service classes "should not" return
data. This is explained later on in detail how data is processed.

Related: #5211
  • Loading branch information
garvinhicking authored Jan 16, 2025
1 parent 2e21d02 commit bf543f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Documentation/CodingGuidelines/PhpArchitecture/Services.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ data objects (DO).
This distinction has gained significance with the introduction of
:ref:`dependency injection <Dependency-Injection>` in the TYPO3 core.

A well-designed service class comprise of one or more methods that process data.
These methods may not return any value, acting as a data sink. For example, a
A well-designed service class comprise of one or more methods that process
data, or just provide a data sink. For example, a
mailer service might take a mail data object to send it. Conversely, service
methods often return new or modified data based on input. A typical example is a
repository service that accepts an identifier (e.g. the uid of a product) and returns
Expand Down

0 comments on commit bf543f5

Please sign in to comment.