Skip to content

Commit d633143

Browse files
Apply fixes from StyleCI (#140)
1 parent 3e52726 commit d633143

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+83
-44
lines changed

src/Gitonomy/Git/Admin.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* This source file is subject to the MIT license that is bundled
1010
* with this source code in the file LICENSE.
1111
*/
12+
1213
namespace Gitonomy\Git;
1314

1415
use Gitonomy\Git\Exception\RuntimeException;
@@ -28,9 +29,9 @@ class Admin
2829
* @param bool $bare indicate to create a bare repository
2930
* @param array $options options for Repository creation
3031
*
31-
* @return Repository
32-
*
3332
* @throws RuntimeException Directory exists or not writable (only if debug=true)
33+
*
34+
* @return Repository
3435
*/
3536
public static function init($path, $bare = true, array $options = array())
3637
{
@@ -149,8 +150,8 @@ private static function getProcess($command, array $args = array(), array $optio
149150
$is_windows = defined('PHP_WINDOWS_VERSION_BUILD');
150151
$options = array_merge(array(
151152
'environment_variables' => $is_windows ? array('PATH' => getenv('PATH')) : array(),
152-
'command' => 'git',
153-
'process_timeout' => 3600,
153+
'command' => 'git',
154+
'process_timeout' => 3600,
154155
), $options);
155156

156157
$commandline = array_merge(array($options['command'], $command), $args);

src/Gitonomy/Git/Blame.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* This source file is subject to the MIT license that is bundled
1010
* with this source code in the file LICENSE.
1111
*/
12+
1213
namespace Gitonomy\Git;
1314

1415
use Gitonomy\Git\Blame\Line;

src/Gitonomy/Git/Blame/Line.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* This source file is subject to the MIT license that is bundled
1010
* with this source code in the file LICENSE.
1111
*/
12+
1213
namespace Gitonomy\Git\Blame;
1314

1415
use Gitonomy\Git\Commit;

src/Gitonomy/Git/Blob.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* This source file is subject to the MIT license that is bundled
1010
* with this source code in the file LICENSE.
1111
*/
12+
1213
namespace Gitonomy\Git;
1314

1415
/**

src/Gitonomy/Git/Commit.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* This source file is subject to the MIT license that is bundled
1010
* with this source code in the file LICENSE.
1111
*/
12+
1213
namespace Gitonomy\Git;
1314

1415
use Gitonomy\Git\Diff\Diff;
@@ -333,7 +334,7 @@ public function getBodyMessage()
333334
}
334335

335336
/**
336-
* @inheritdoc
337+
* {@inheritdoc}
337338
*/
338339
public function getCommit()
339340
{
@@ -379,6 +380,7 @@ private function getData($name)
379380
}
380381

381382
$parser = new Parser\CommitParser();
383+
382384
try {
383385
$result = $this->repository->run('cat-file', array('commit', $this->revision));
384386
} catch (ProcessException $e) {

src/Gitonomy/Git/CommitReference.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* This source file is subject to the MIT license that is bundled
1010
* with this source code in the file LICENSE.
1111
*/
12+
1213
namespace Gitonomy\Git;
1314

1415
class CommitReference

src/Gitonomy/Git/Diff/Diff.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* This source file is subject to the MIT license that is bundled
1010
* with this source code in the file LICENSE.
1111
*/
12+
1213
namespace Gitonomy\Git\Diff;
1314

1415
use Gitonomy\Git\Parser\DiffParser;
@@ -98,7 +99,7 @@ public function toArray()
9899
{
99100
return array(
100101
'rawDiff' => $this->rawDiff,
101-
'files' => array_map(
102+
'files' => array_map(
102103
function (File $file) {
103104
return $file->toArray();
104105
},

src/Gitonomy/Git/Diff/File.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* This source file is subject to the MIT license that is bundled
1010
* with this source code in the file LICENSE.
1111
*/
12+
1213
namespace Gitonomy\Git\Diff;
1314

1415
use Gitonomy\Git\Repository;
@@ -222,14 +223,14 @@ public function getChanges()
222223
public function toArray()
223224
{
224225
return array(
225-
'old_name' => $this->oldName,
226-
'new_name' => $this->newName,
227-
'old_mode' => $this->oldMode,
228-
'new_mode' => $this->newMode,
226+
'old_name' => $this->oldName,
227+
'new_name' => $this->newName,
228+
'old_mode' => $this->oldMode,
229+
'new_mode' => $this->newMode,
229230
'old_index' => $this->oldIndex,
230231
'new_index' => $this->newIndex,
231232
'is_binary' => $this->isBinary,
232-
'changes' => array_map(function (FileChange $change) {
233+
'changes' => array_map(function (FileChange $change) {
233234
return $change->toArray();
234235
}, $this->changes),
235236
);

src/Gitonomy/Git/Diff/FileChange.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* This source file is subject to the MIT license that is bundled
1010
* with this source code in the file LICENSE.
1111
*/
12+
1213
namespace Gitonomy\Git\Diff;
1314

1415
class FileChange
@@ -37,7 +38,7 @@ public function getCount($type)
3738
$result = 0;
3839
foreach ($this->lines as $line) {
3940
if ($line[0] === $type) {
40-
++$result;
41+
$result++;
4142
}
4243
}
4344

@@ -76,7 +77,7 @@ public function toArray()
7677
'range_old_count' => $this->rangeOldCount,
7778
'range_new_start' => $this->rangeNewStart,
7879
'range_new_count' => $this->rangeNewCount,
79-
'lines' => $this->lines,
80+
'lines' => $this->lines,
8081
);
8182
}
8283

src/Gitonomy/Git/Exception/GitExceptionInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* This source file is subject to the MIT license that is bundled
1010
* with this source code in the file LICENSE.
1111
*/
12+
1213
namespace Gitonomy\Git\Exception;
1314

1415
interface GitExceptionInterface

0 commit comments

Comments
 (0)