src/Joli/JoliCi/BuildStrategy/TravisCiBuildStrategy.php
public function getJobs($directory)
    {
        $jobs       = array();
        $config     = Yaml::parse(file_get_contents($directory.DIRECTORY_SEPARATOR.".travis.yml"));
        $matrix     = $this->createMatrix($config);
        $services   = $this->getServices($config);
        $timezone   = ini_get('date.timezone');

        foreach ($matrix->compute() as $possibility) {
            $parameters   = array(
                'language' => $possibility['language'],
                'version' => $possibility['version'],
                'environment' => $possibility['environment'],
            );

            $description = sprintf('%s = %s', $possibility['language'], $possibility['version']);

            if ($possibility['environment'] !== null) {
                $description .= sprintf(', Environment: %s', json_encode($possibility['environment']));
            }

            $jobs[] = new Job($this->naming->getProjectName($directory), $this->getName(), $this->naming->getUniqueKey($parameters), array(
                'language'       => $possibility['language'],
                'version'        => $possibility['version'],
                'before_install' => $possibility['before_install'],
                'install'        => $possibility['install'],
                'before_script'  => $possibility['before_script'],
                'script'         => $possibility['script'],
                'env'            => $possibility['environment'],
                'global_env'     => $possibility['global_env'],
                'timezone'       => $timezone,
                'origin'         => realpath($directory),
            ), $description, null, $services);
        }

        return $jobs;
    }
public function getJobs($directory)
    {
        $jobs       = array();
        $config     = Yaml::parse(file_get_contents($directory.DIRECTORY_SEPARATOR.".travis.yml"));
        $matrix     = $this->createMatrix($config);
        $services   = $this->getServices($config);
        $timezone   = ini_get('date.timezone');

        foreach ($matrix->compute() as $possibility) {
            $parameters   = array(
                'language' => $possibility['language'],
                'version' => $possibility['version'],
                'environment' => $possibility['environment'],
            );

            $description = sprintf('%s = %s', $possibility['language'], $possibility['version']);

            if ($possibility['environment'] !== null) {
                $description .= sprintf(', Environment: %s', json_encode($possibility['environment']));
            }

            $jobs[] = new Job($this->naming->getProjectName($directory), $this->getName(), $this->naming->getUniqueKey($parameters), array(
                'language'       => $possibility['language'],
                'version'        => $possibility['version'],
                'before_install' => $possibility['before_install'],
                'install'        => $possibility['install'],
                'before_script'  => $possibility['before_script'],
                'script'         => $possibility['script'],
                'env'            => $possibility['environment'],
                'global_env'     => $possibility['global_env'],
                'timezone'       => $timezone,
                'origin'         => realpath($directory),
            ), $description, null, $services);
        }

        return $jobs;
    }
{@inheritdoc}