Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Monday Factory
Database model generator
Commits
320da456
Commit
320da456
authored
6 years ago
by
Petr Besir Horáček
Browse files
Options
Download
Patches
Plain Diff
Added return type to setters
parent
b202ac31
master
beta
nette-3
php8
php82
0.0.1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Generator/DataGenerator.php
+2
-1
src/Generator/DataGenerator.php
with
2 additions
and
1 deletion
+2
-1
src/Generator/DataGenerator.php
+
2
−
1
View file @
320da456
...
...
@@ -280,7 +280,8 @@ class DataGenerator
{
$setter
=
$this
->
class
->
addMethod
(
'set'
.
ucfirst
(
$this
->
toCamelCase
(
$name
)))
->
addBody
(
"
\$
this->? = $?;
\n
"
,
[
$this
->
toCamelCase
(
$name
),
$this
->
toCamelCase
(
$name
)])
->
addBody
(
'return $this;'
);
->
addBody
(
'return $this;'
)
->
setReturnType
(
'self'
);
$setter
->
addParameter
(
$this
->
toCamelCase
(
$name
))
->
setNullable
(
$this
->
isPropertyNullable
(
$propertyDefinition
))
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets