private function modifyScripts($scripts)
    {
        $updateScripts = (array) $scripts[ScriptEvents::POST_UPDATE_CMD];

        $index = array_search(ScriptHandler::class . '::installAssets', $updateScripts) ?: 0;
        array_splice($updateScripts, $index, 1, [ScriptHandler::class . '::updateProject', ScriptHandler::class . '::installAssets']);

        $scripts[ScriptEvents::POST_UPDATE_CMD] = $updateScripts;

        return $scripts;
    }
private function modifyScripts($scripts)
    {
        $updateScripts = (array) $scripts[ScriptEvents::POST_UPDATE_CMD];

        $index = array_search(ScriptHandler::class . '::installAssets', $updateScripts) ?: 0;
        array_splice($updateScripts, $index, 1, [ScriptHandler::class . '::updateProject', ScriptHandler::class . '::installAssets']);

        $scripts[ScriptEvents::POST_UPDATE_CMD] = $updateScripts;

        return $scripts;
    }
private function modifyScripts ( $ scripts ) { $ updateScripts = ( array ) $ scripts [ ScriptEvents :: POST_UPDATE_CMD ] ; $ index = array_search ( ScriptHandler :: class . '::installAssets' , $ updateScripts ) ? : 0 ; array_splice ( $ updateScripts , $ index , 1 , [ ScriptHandler :: class . '::updateProject' , ScriptHandler :: class . '::installAssets' ] ) ; $ scripts [ ScriptEvents :: POST_UPDATE_CMD ] = $ updateScripts ; return $ scripts ; }
Add updateProject handler right before installAssets handler.

@param string[] $scripts

@return string[]
Add updateProject handler right before installAssets handler .