protected function applyPluginUpdate($code, $version, $details)
    {
        if (is_array($details)) {
            $comment = array_shift($details);
            $scripts = $details;
        }
        else {
            $comment = $details;
            $scripts = [];
        }

        /*
         * Apply scripts, if any
         */
        foreach ($scripts as $script) {
            if ($this->hasDatabaseHistory($code, $version, $script)) {
                continue;
            }

            $this->applyDatabaseScript($code, $version, $script);
        }

        /*
         * Register the comment and update the version
         */
        if (!$this->hasDatabaseHistory($code, $version)) {
            $this->applyDatabaseComment($code, $version, $comment);
        }

        $this->setDatabaseVersion($code, $version);

        $this->note(sprintf('- <info>v%s: </info> %s', $version, $comment));
    }
protected function applyPluginUpdate($code, $version, $details)
    {
        if (is_array($details)) {
            $comment = array_shift($details);
            $scripts = $details;
        }
        else {
            $comment = $details;
            $scripts = [];
        }

        /*
         * Apply scripts, if any
         */
        foreach ($scripts as $script) {
            if ($this->hasDatabaseHistory($code, $version, $script)) {
                continue;
            }

            $this->applyDatabaseScript($code, $version, $script);
        }

        /*
         * Register the comment and update the version
         */
        if (!$this->hasDatabaseHistory($code, $version)) {
            $this->applyDatabaseComment($code, $version, $comment);
        }

        $this->setDatabaseVersion($code, $version);

        $this->note(sprintf('- <info>v%s: </info> %s', $version, $comment));
    }
protected function applyPluginUpdate ( $ code , $ version , $ details ) { if ( is_array ( $ details ) ) { $ comment = array_shift ( $ details ) ; $ scripts = $ details ; } else { $ comment = $ details ; $ scripts = [ ] ; } /*
         * Apply scripts, if any
         */ foreach ( $ scripts as $ script ) { if ( $ this -> hasDatabaseHistory ( $ code , $ version , $ script ) ) { continue ; } $ this -> applyDatabaseScript ( $ code , $ version , $ script ) ; } /*
         * Register the comment and update the version
         */ if ( ! $ this -> hasDatabaseHistory ( $ code , $ version ) ) { $ this -> applyDatabaseComment ( $ code , $ version , $ comment ) ; } $ this -> setDatabaseVersion ( $ code , $ version ) ; $ this -> note ( sprintf ( '- <info>v%s: </info> %s' , $ version , $ comment ) ) ; }
Applies a single version update to a plugin.
Applies a single version update to a plugin .