resourceConnection = $resourceConnection; } /** * @return int[] */ public function execute(): array { $connection = $this->resourceConnection->getConnection(); $stockTable = $this->resourceConnection->getTableName(StockResourceModel::TABLE_NAME_STOCK); $select = $connection->select()->from($stockTable, StockSourceLink::STOCK_ID); $stockIds = $connection->fetchCol($select); $stockIds = array_map('intval', $stockIds); return $stockIds; } }