summaryrefslogtreecommitdiffstats
path: root/source/Command/VerifyInstallation/Version.php
blob: a2f592b73805353da27d55850101e501f7e06f17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
 * @author stev leibelt <artodeto@bazzline.net>
 * @since 2014-08-21 
 */

/**
 * Class Command_VerifyInstallation_Version
 */
class Command_VerifyInstallation_Version extends Command_VerifyInstallation_AbstractCommand
{
    /**
     * @throws Exception
     */
    public function execute()
    {
        $exampleVersion = $this->application->getExampleVersion();
        $currentVersion = $this->application->getCurrentVersion();

        if ($exampleVersion !== $currentVersion) {
            throw new Exception(
                'current version "' . $currentVersion . '" and code version "' . $exampleVersion . '" differs, update needed'
            );
        }
    }

    /**
     * @return array
     */
    public function getUsage()
    {
    }

    /**
     * @throws Exception
     */
    public function verify()
    {
    }
}