It is generally recommended to explicitly declare the visibility for methods.
Adding explicit visibility (private, protected, or public) is generally
recommend to communicate to other developers how, and from where this method
is intended to be used.
It seems like new \Symfony\Component\V...aintValidatorFactory()) of type object<Symfony\Component...tor\RecursiveValidator> is incompatible with the declared type object<Frameworkless\type> of property $validator.
Our type inference engine has found an assignment to a property that is incompatible
with the declared type of that property.
Either this assignment is in error or the assigned type should be added
to the documentation/type hint for that property..
Loading history...
27
new ExecutionContextFactory(new IdentityTranslator()),
28
new LazyLoadingMetadataFactory(new StaticMethodLoader()),
29
new ConstraintValidatorFactory()
30
);
31
}
32
33
public function preSave(\Propel\Runtime\Connection\ConnectionInterface $con = null)
The trait Idable provides a method equalsId that in turn relies on the
method getId(). If this method does not exist on a class mixing in this
trait, the method will fail.
Adding the getId() as an abstract method to the trait will make sure it
is available.
Loading history...
36
throw new ValidationException($this->getValidationFailures(),"Validation error");
The trait Idable provides a method equalsId that in turn relies on the
method getId(). If this method does not exist on a class mixing in this
trait, the method will fail.
Adding the getId() as an abstract method to the trait will make sure it
is available.
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.