Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fix CS/WS issues

  • Loading branch information
sebastianbergmann committed Jun 21, 2015
1 parent d31f71b commit 5517682b0506cd456a31062a2f8049667cfa414e
Showing with 4 additions and 16 deletions.
  1. +0 −4 src/Exception/Exception.php
  2. +0 −4 src/Exception/RuntimeException.php
  3. +4 −8 src/Git.php
@@ -11,10 +11,6 @@
namespace SebastianBergmann\Git;

/**
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright Sebastian Bergmann <sebastian@phpunit.de>
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
* @link http://www.github.com/sebastianbergmann/git
*/
interface Exception
{
@@ -11,10 +11,6 @@
namespace SebastianBergmann\Git;

/**
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright Sebastian Bergmann <sebastian@phpunit.de>
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
* @link http://www.github.com/sebastianbergmann/git
*/
class RuntimeException extends \RuntimeException implements Exception
{
@@ -13,10 +13,6 @@
use DateTime;

/**
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright Sebastian Bergmann <sebastian@phpunit.de>
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
* @link http://www.github.com/sebastianbergmann/git
*/
class Git
{
@@ -67,7 +63,7 @@ public function getDiff($from, $to)
'git diff --no-ext-diff ' . $from . ' ' . $to
);

return join("\n", $output);
return implode("\n", $output);
}

/**
@@ -88,13 +84,13 @@ public function getRevisions()
if (count($tmp) == 2 && $tmp[0] == 'commit') {
$sha1 = $tmp[1];
} elseif (count($tmp) == 4 && $tmp[0] == 'Author:') {
$author = join(' ', array_slice($tmp, 1));
$author = implode(' ', array_slice($tmp, 1));
} elseif (count($tmp) == 9 && $tmp[0] == 'Date:') {
$revisions[] = array(
'author' => $author,
'date' => DateTime::createFromFormat(
'D M j H:i:s Y O',
join(' ', array_slice($tmp, 3))
implode(' ', array_slice($tmp, 3))
),
'sha1' => $sha1,
'message' => isset($output[$i+2]) ? trim($output[$i+2]) : ''
@@ -106,7 +102,7 @@ public function getRevisions()
}

/**
* @param string $command
* @param string $command
* @throws RuntimeException
*/
protected function execute($command)

0 comments on commit 5517682

Please sign in to comment.
You can’t perform that action at this time.