public function invokeSubCommand($controllerCommandName, ConsoleOutput $output, NodeType $nodeType = null, $workspaceName = 'live', $dryRun = false, $cleanup = true, $skip = null, $only = null)
    {
        /** @noinspection PhpDeprecationInspection This is only set for backwards compatibility */
        $this->output = $output;
        $commandMethods = [
            'removeAbstractAndUndefinedNodes' => [ 'cleanup' => true ],
            'removeOrphanNodes' => [ 'cleanup' => true ],
            'removeDisallowedChildNodes' => [ 'cleanup' => true ],
            'removeUndefinedProperties' => [ 'cleanup' => true ],
            'removeBrokenEntityReferences' => [ 'cleanup' => true ],
            'removeNodesWithInvalidDimensions' => [ 'cleanup' => true ],
            'removeNodesWithInvalidWorkspace' => [ 'cleanup' => true ],
            'fixNodesWithInconsistentIdentifier' => [ 'cleanup' => false ],
            'createMissingChildNodes' => [ 'cleanup' => false ],
            'reorderChildNodes' => [ 'cleanup' => false ],
            'addMissingDefaultValues' => [ 'cleanup' => false ],
            'repairShadowNodes' => [ 'cleanup' => false ]
        ];
        $skipCommandNames = Arrays::trimExplode(',', ($skip === null ? '' : $skip));
        $onlyCommandNames = Arrays::trimExplode(',', ($only === null ? '' : $only));

        switch ($controllerCommandName) {
            case 'repair':
                foreach ($commandMethods as $commandMethodName => $commandMethodConfiguration) {
                    if (in_array($commandMethodName, $skipCommandNames)) {
                        continue;
                    }
                    if ($onlyCommandNames !== [] && !in_array($commandMethodName, $onlyCommandNames)) {
                        continue;
                    }
                    if (!$cleanup && $commandMethodConfiguration['cleanup']) {
                        continue;
                    }
                    $this->$commandMethodName($workspaceName, $dryRun, $nodeType);
                }
        }
    }