We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3941ff3 commit 137375cCopy full SHA for 137375c
src/Domain/DecisionContent.php
@@ -113,7 +113,7 @@ public function getStatus(): string
113
*/
114
private function setTitle(string $title): void
115
{
116
- if (strlen($title) > self::TITLE_MAX_LENGTH) {
+ if ($this->isGreaterThanTitleMaxLenght($title)) {
117
$message = sprintf(
118
'The title must be less than or equal to %d characters',
119
self::TITLE_MAX_LENGTH
@@ -153,4 +153,16 @@ private function setStatus(string $status): void
153
154
$this->status = $status;
155
}
156
+
157
+ /**
158
+ * Determines whether the title is greater than maximun length set
159
+ *
160
+ * @param string $title
161
162
+ * @return bool
163
+ */
164
+ private function isGreaterThanTitleMaxLenght(string $title): bool
165
+ {
166
+ return mb_strlen($title) > self::TITLE_MAX_LENGTH;
167
+ }
168
0 commit comments