Update Factory.php

somehow I removed the getType method that was needed