Model/Sync/Catalog.php
public function syncCatalog()
    {
        try {
            //remove product with product id set and no product
            $this->catalogResourceFactory->create()
                ->removeOrphanProducts();

            return $this->catalogSyncFactory->create()->sync();

        } catch (\Exception $e) {
            $this->helper->debug((string)$e, []);
        }
    }
public function syncCatalog()
    {
        try {
            //remove product with product id set and no product
            $this->catalogResourceFactory->create()
                ->removeOrphanProducts();

            return $this->catalogSyncFactory->create()->sync();

        } catch (\Exception $e) {
            $this->helper->debug((string)$e, []);
        }
    }
public function syncCatalog ( ) { try { //remove product with product id set and no product $ this -> catalogResourceFactory -> create ( ) -> removeOrphanProducts ( ) ; return $ this -> catalogSyncFactory -> create ( ) -> sync ( ) ; } catch ( \ Exception $ e ) { $ this -> helper -> debug ( ( string ) $ e , [ ] ) ; } }
Sync product catalogs

@return int
Sync product catalogs