From 2d62939f710885d7b4e07d9ecbb64f9a5117b223 Mon Sep 17 00:00:00 2001 From: Maxim Rubis Date: Tue, 26 Jun 2018 22:13:28 -0400 Subject: [PATCH] Fix #801 --- composer.json | 2 +- composer.lock | 25 +++++++++++++++---------- src/Controller/MainController.php | 2 +- src/Git/Repository.php | 2 +- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index a5b18d7..84e9a39 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "require": { "php": ">=5.3", "doctrine/instantiator": "1.0.*", - "klaussilveira/gitter": "0.2.*", + "klaussilveira/gitter": "^0.4.0", "phpdocumentor/reflection-docblock": "2.0.*", "sebastian/comparator": "1.2.*", "sebastian/recursion-context": "1.0.*", diff --git a/composer.lock b/composer.lock index f4123ea..73f4ec3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "794e85ba2c352cffcb450590bd7d956c", + "content-hash": "597ad6c4e1c4d5c78197a53be433c015", "packages": [ { "name": "doctrine/instantiator", @@ -62,25 +62,30 @@ }, { "name": "klaussilveira/gitter", - "version": "0.2.0", + "version": "0.4", "source": { "type": "git", "url": "https://github.com/klaussilveira/gitter.git", - "reference": "910a3d324caf53d8d21b55fb80a9a6735974a80c" + "reference": "649f8423323c844bf7e516dec2e39711206b2a02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/klaussilveira/gitter/zipball/910a3d324caf53d8d21b55fb80a9a6735974a80c", - "reference": "910a3d324caf53d8d21b55fb80a9a6735974a80c", + "url": "https://api.github.com/repos/klaussilveira/gitter/zipball/649f8423323c844bf7e516dec2e39711206b2a02", + "reference": "649f8423323c844bf7e516dec2e39711206b2a02", "shasum": "" }, "require": { - "php": ">=5.3.0", - "symfony/process": ">=2.2" + "doctrine/instantiator": "1.0.*", + "php": ">=5.3", + "phpdocumentor/reflection-docblock": "2.0.*", + "sebastian/comparator": "1.2.*", + "sebastian/recursion-context": "1.0.*", + "symfony/process": "2.8.*" }, "require-dev": { - "phpunit/phpunit": ">=3.7.1", - "symfony/filesystem": ">=2.2" + "mockery/mockery": "0.9.1", + "phpunit/phpunit": "~4.8", + "symfony/filesystem": "2.8.*" }, "type": "library", "autoload": { @@ -106,7 +111,7 @@ "git", "vcs" ], - "time": "2013-06-01T13:32:37+00:00" + "time": "2018-06-01T03:23:15+00:00" }, { "name": "phpdocumentor/reflection-docblock", diff --git a/src/Controller/MainController.php b/src/Controller/MainController.php index fe94bff..86f980f 100644 --- a/src/Controller/MainController.php +++ b/src/Controller/MainController.php @@ -33,7 +33,7 @@ class MainController implements ControllerProviderInterface $branch = $repository->getHead(); } - $stats = $repository->getStatistics($branch); + $stats = $repository->getBranchStatistics($branch); $authors = $repository->getAuthorStatistics($branch); return $app['twig']->render('stats.twig', array( diff --git a/src/Git/Repository.php b/src/Git/Repository.php index 74ce4ea..f6e179d 100644 --- a/src/Git/Repository.php +++ b/src/Git/Repository.php @@ -372,7 +372,7 @@ class Repository extends BaseRepository return $data; } - public function getStatistics($branch) + public function getBranchStatistics($branch) { // Calculate amount of files, extensions and file size $logs = $this->getClient()->run($this, 'ls-tree -r -l ' . $branch);