public function scan($classes, $namespaceTablenames=true, $morphClassAbbreviations=true)
    {
        $this->namespaceTablenames = $namespaceTablenames;
        $this->morphClassAbbreviations = $morphClassAbbreviations;

        $metadata = [];

        foreach ($classes as $class) {
            $entityMetadata = $this->parseClass($class);

            if ($entityMetadata) {
                $metadata[$class] = $entityMetadata;
            }
        }

        // validate pivot tables
        $this->validator->validatePivotTables($metadata);

        // generate morphable classes
        $this->generateMorphableClasses($metadata);

        return $metadata;
    }