Fakerino\Core\Filler\EntityFiller::fillProperties PHP Method

fillProperties() public method

Fills properties.
public fillProperties ( )
    public function fillProperties()
    {
        $entity = $this->entity;
        $entityInfo = new EntityInfo($entity);
        $entityProperties = $entityInfo->getProperties();
        foreach ($entityProperties as $property) {
            $propertyName = $property->getName();
            $fakeData = $this->faker->fake($propertyName)->toArray();
            if ($property->isStatic()) {
                $entity::${$propertyName} = $fakeData[0];
            } else {
                $entity->{$propertyName} = $fakeData[0];
            }
        }
    }