<?php
namespace GitList\Controller;
use Gitlist\Application as GitlistApp;
use Gitter\Repository;
use Silex\Application;
use Silex\Api\ControllerProviderInterface;
use Symfony\Component\HttpFoundation\Request;
class GitController implements ControllerProviderInterface
{
public function connect(Application $app)
{
$route = $app['controllers_factory'];
$route->post('{repo}/git-helper/{branch}/save', function (Request $request, $repo, $branch = '') use ($app) {
$repository = ($app['git']->getRepositoryFromName($app['git.repos'], $repo));
$hadError = false;