src/Phinx/Migration/Manager/Environment.php
public function getCurrentVersion()
    {
        // We don't cache this code as the current version is pretty volatile.
        // TODO - that means they're no point in a setter then?
        // maybe we should cache and call a reset() method every time a migration is run
        $versions = $this->getVersions();
        $version = 0;

        if (!empty($versions)) {
            $version = end($versions);
        }

        $this->setCurrentVersion($version);

        return $this->currentVersion;
    }
public function getCurrentVersion()
    {
        // We don't cache this code as the current version is pretty volatile.
        // TODO - that means they're no point in a setter then?
        // maybe we should cache and call a reset() method every time a migration is run
        $versions = $this->getVersions();
        $version = 0;

        if (!empty($versions)) {
            $version = end($versions);
        }

        $this->setCurrentVersion($version);

        return $this->currentVersion;
    }
public function getCurrentVersion ( ) { // We don't cache this code as the current version is pretty volatile. // TODO - that means they're no point in a setter then? // maybe we should cache and call a reset() method every time a migration is run $ versions = $ this -> getVersions ( ) ; $ version = 0 ; if ( ! empty ( $ versions ) ) { $ version = end ( $ versions ) ; } $ this -> setCurrentVersion ( $ version ) ; return $ this -> currentVersion ; }
Gets the current version of the environment.

@return int
Gets the current version of the environment .