1515
1616use ApiPlatform \SchemaGenerator \Model \Type \ArrayType ;
1717use ApiPlatform \SchemaGenerator \Model \Type \Type ;
18- use Nette \PhpGenerator \ClassType ;
1918use Nette \PhpGenerator \Method ;
2019use Nette \PhpGenerator \PhpNamespace ;
2120use Nette \PhpGenerator \Property as NetteProperty ;
@@ -214,7 +213,7 @@ private function generateGetter(PhpNamespace $namespace): Method
214213 throw new \LogicException (\sprintf ("Property '%s' is not readable. " , $ this ->name ));
215214 }
216215
217- $ getter = (new Method ('get ' .ucfirst ($ this ->name )))->setVisibility (ClassType:: VISIBILITY_PUBLIC );
216+ $ getter = (new Method ('get ' .ucfirst ($ this ->name )))->setVisibility (Visibility::Public );
218217 foreach ($ this ->getterAnnotations as $ annotation ) {
219218 $ getter ->addComment ($ annotation );
220219 }
@@ -247,7 +246,7 @@ private function generateMutators(
247246 if ($ this ->isArray () && (!$ this ->isSimpleArray () || !$ useSimpleArraySetter )) {
248247 $ singularProperty = $ singularize ($ this ->name ());
249248
250- $ adder = (new Method ('add ' .ucfirst ($ singularProperty )))->setVisibility (ClassType:: VISIBILITY_PUBLIC );
249+ $ adder = (new Method ('add ' .ucfirst ($ singularProperty )))->setVisibility (Visibility::Public );
251250 $ adder ->setReturnType ($ useFluentMutators ? 'self ' : 'void ' );
252251 foreach ($ this ->adderAnnotations () as $ annotation ) {
253252 $ adder ->addComment ($ annotation );
@@ -265,7 +264,7 @@ private function generateMutators(
265264 }
266265 $ mutators [] = $ adder ;
267266
268- $ remover = (new Method ('remove ' .ucfirst ($ singularProperty )))->setVisibility (ClassType:: VISIBILITY_PUBLIC );
267+ $ remover = (new Method ('remove ' .ucfirst ($ singularProperty )))->setVisibility (Visibility::Public );
269268 $ remover ->setReturnType ($ useFluentMutators ? 'self ' : 'void ' );
270269 foreach ($ this ->removerAnnotations as $ annotation ) {
271270 $ adder ->addComment ($ annotation );
@@ -297,7 +296,7 @@ private function generateMutators(
297296
298297 $ mutators [] = $ remover ;
299298 } else {
300- $ setter = (new Method ('set ' .ucfirst ($ this ->name ())))->setVisibility (ClassType:: VISIBILITY_PUBLIC );
299+ $ setter = (new Method ('set ' .ucfirst ($ this ->name ())))->setVisibility (Visibility::Public );
301300 $ setter ->setReturnType ($ useFluentMutators ? 'self ' : 'void ' );
302301 foreach ($ this ->setterAnnotations as $ annotation ) {
303302 $ setter ->addComment ($ annotation );
0 commit comments