diff --git a/.composer-require-checker.json b/.composer-require-checker.json
new file mode 100644
index 0000000..2c63c08
--- /dev/null
+++ b/.composer-require-checker.json
@@ -0,0 +1,2 @@
+{
+}
diff --git a/.github/workflows/diagnostics.yml b/.github/workflows/diagnostics.yml
index 9952d42..4d8c649 100644
--- a/.github/workflows/diagnostics.yml
+++ b/.github/workflows/diagnostics.yml
@@ -7,42 +7,108 @@ on:
jobs:
build:
runs-on: ubuntu-latest
+ name: 'PHP: ${{ matrix.php }} Symfony: ${{ matrix.symfony}} Experimental: ${{ matrix.experimental}}'
+ continue-on-error: ${{ matrix.experimental }}
strategy:
+ fail-fast: true
matrix:
- php: [5.6, 7.1, 7.2, 7.3, 7.4]
+ include:
+ - php: '7.4'
+ symfony: '^4.0'
+ phpcq_install: 'install'
+ output: '-o github-action -o default'
+ experimental: false
+ - php: '7.4'
+ symfony: '^5.0'
+ phpcq_install: 'update'
+ output: '-o github-action -o default'
+ experimental: false
+ - php: '8.0'
+ symfony: '^4.0'
+ phpcq_install: 'update'
+ output: '-o github-action -o default'
+ experimental: false
+ - php: '8.0'
+ symfony: '^5.0'
+ phpcq_install: 'update'
+ output: '-o github-action -o default'
+ experimental: false
+ - php: '8.1'
+ symfony: '^5.0'
+ phpcq_install: 'update'
+ output: '-o github-action -o default'
+ experimental: false
+ - php: '8.1'
+ symfony: '^6.0'
+ phpcq_install: 'update'
+ output: '-o github-action -o default'
+ experimental: false
+ - php: '8.2'
+ symfony: '^6.0'
+ phpcq_install: 'update'
+ output: '-o github-action -o default'
+ experimental: false
+ - php: '8.3'
+ symfony: '^6.0'
+ phpcq_install: 'update'
+ output: '-o github-action -o default'
+ experimental: true
steps:
- - name: PHP ${{ matrix.php }} Pull source
+ - name: Pull source
uses: actions/checkout@v2
- with:
- fetch-depth: 0
# see https://github.com/shivammathur/setup-php
- - name: PHP ${{ matrix.php }} Setup PHP.
+ - name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- coverage: none
- - name: PHP ${{ matrix.php }} Cache composer cache directory
+ # setup caches
+ - name: Cache composer cache directory
uses: actions/cache@v1
env:
cache-name: composer-cache-dir
with:
path: ~/.cache/composer
- key: ${{ runner.os }}-build-${{ env.cache-name }}
+ key: ${{ runner.os }}-${{ matrix.php }}-build-${{ env.cache-name }}
- - name: PHP ${{ matrix.php }} Cache vendor directory
+ - name: Cache vendor directory
uses: actions/cache@v1
env:
- cache-name: composer-vendor
+ cache-name: vendor
with:
path: vendor
- key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }}
+ key: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.symfony }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
- ${{ runner.os }}-build-${{ env.cache-name }}-
- - name: PHP ${{ matrix.php }} Install composer dependencies
- run: composer update --prefer-dist --no-interaction --no-suggest
+ ${{ runner.os }}-${{ matrix.php }}-${{ matrix.symfony }}-build-${{ env.cache-name }}-
- - name: PHP ${{ matrix.php }} Run tests
- run: ant -keep-going
+ - name: Cache phpcq directory
+ uses: actions/cache@v1
+ env:
+ cache-name: phpcq
+ with:
+ path: .phpcq
+ key: ${{ runner.os }}-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/.phpcq.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-${{ matrix.php }}-build-${{ env.cache-name }}-
+
+ # install dependencies and tools
+ - name: Install composer dependencies
+ run: |
+ composer require symfony/process ${{ matrix.symfony }} --no-update
+ composer require symfony/filesystem ${{ matrix.symfony }} --no-update
+ composer install
+ - name: Install phpcq toolchain
+ run: ./vendor/bin/phpcq ${{ matrix.phpcq_install }} -v
+
+ # run tests
+ - name: Run tests
+ run: ./vendor/bin/phpcq run -v ${{ matrix.output }}
+
+ - name: Upload build directory to artifact
+ uses: actions/upload-artifact@v2
+ if: ${{ success() }} || ${{ failure() }}
+ with:
+ name: phpcq-builds-php-${{ matrix.php }}-${{ matrix.symfony }}
+ path: .phpcq/build/
diff --git a/.gitignore b/.gitignore
index d870bd0..f315d59 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,8 @@
/vendor/
/composer.phar
/composer.lock
+
+# phpcq related
+.phpcq.lock
+.phpcq
+.phpunit.result.cache
diff --git a/.phpcq.yaml.dist b/.phpcq.yaml.dist
new file mode 100644
index 0000000..076b2d7
--- /dev/null
+++ b/.phpcq.yaml.dist
@@ -0,0 +1,113 @@
+phpcq:
+ repositories:
+ - https://phpcq.github.io/repository/repository.json
+ directories:
+ - src
+ - tests
+ artifact: .phpcq/build
+
+ plugins:
+ phpunit:
+ version: ^1.0
+ signed: false
+ psalm:
+ version: ^1.1
+ signed: false
+ composer-require-checker:
+ version: ^1.0
+ signed: false
+ requirements:
+ composer-require-checker:
+ signed: false
+ version: ^3.3
+ phpmd:
+ version: ^1.0
+ signed: false
+ requirements:
+ phpmd:
+ signed: false
+ phpcpd:
+ version: ^1.0
+ signed: false
+ requirements:
+ phpcpd:
+ version: ^6.0
+ phploc:
+ version: ^1.0
+ signed: false
+ phpcs:
+ version: ^1.0
+ signed: false
+ composer-normalize:
+ version: ^1.0
+ signed: false
+ trusted-keys:
+ # sb@sebastian-bergmann.de
+ - 4AA394086372C20A
+ # psalm
+ - 8A03EA3B385DBAA1
+ - 12CE0F1D262429A5
+ # magl@magll.net
+ - D2CCAC42F6295E7D
+ # PHP_CodeSniffer
+ - 31C7E470E2138192
+ # Composer normalize
+ - C00543248C87FB13
+ # phpmd
+ - 0F9684B8B16B7AB0
+ - A4E55EA12C7C085C
+ # composer-require-checker
+ - 033E5F8D801A2F8D
+
+tasks:
+ fix:
+ - composer-normalize-fix
+ - phpcbf
+ verify:
+ - composer-require-checker
+ - composer-normalize
+ analyze:
+ - phploc
+ - phpcpd
+ - phpmd
+ - phpcs
+ - psalm
+ - phpunit
+ default:
+ - verify
+ - analyze
+
+ phpmd:
+ plugin: phpmd
+ config:
+ excluded: [ tests ]
+ ruleset:
+ - ./.phpmd.xml
+
+ composer-normalize-fix:
+ plugin: composer-normalize
+ config:
+ dry_run: false
+
+ composer-require-checker:
+ plugin: composer-require-checker
+ config:
+ config_file: '.composer-require-checker.json'
+
+ phpcs:
+ plugin: phpcs
+ config: &phpcs-config
+ standard: PSR12
+ excluded: [ tests ]
+ custom_flags:
+ - '--extensions=php'
+
+ phpcbf:
+ plugin: phpcs
+ config:
+ <<: *phpcs-config
+
+ phpcpd:
+ plugin: phpcpd
+ config:
+ exclude: [ src/Command ]
diff --git a/.phpmd.xml b/.phpmd.xml
new file mode 100644
index 0000000..a6ccc7b
--- /dev/null
+++ b/.phpmd.xml
@@ -0,0 +1,37 @@
+
+
+
+ PHPMD rule set
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build.default.properties b/build.default.properties
deleted file mode 100644
index 18c3a21..0000000
--- a/build.default.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-#####################################################
-## This project is using the ##
-## PHP code quality project (phpcq) ##
-## ##
-## https://github.com/phpcq/phpcq ##
-#####################################################
-
-phpcs.standard=${basedir}/vendor/phpcq/coding-standard/phpcs/PhpCodeQuality/ruleset.xml
-phpmd.ruleset=${basedir}/vendor/phpcq/coding-standard/phpmd/ruleset.xml
-
-phpcpd.excluded=Command
diff --git a/build.xml b/build.xml
deleted file mode 100644
index daac69b..0000000
--- a/build.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
diff --git a/composer.json b/composer.json
index bdb4c38..489d16c 100644
--- a/composer.json
+++ b/composer.json
@@ -1,26 +1,32 @@
{
- "name": "bit3/git-php",
- "description": "Easy to use GIT wrapper for PHP.",
- "license": "MIT",
- "require": {
- "php": "^5.6 || ^7.0",
- "psr/log": "^1.0",
- "symfony/process": "^3.4 || ^4.0 || ^5.0"
- },
- "require-dev": {
- "symfony/filesystem": "^3.4 || ^4.0 || ^5.0",
- "phpcq/all-tasks": "^1.1",
- "phpunit/phpunit": "^5.0 || ^6.0 || ^7.0"
- },
- "autoload": {
- "psr-4": {
- "Bit3\\GitPhp\\": "src",
- "Bit3\\GitPhp\\Test\\": "tests"
- }
- },
- "extra": {
- "branch-alias": {
- "dev-master": "1.5.x-dev"
- }
+ "name": "bit3/git-php",
+ "description": "Easy to use GIT wrapper for PHP.",
+ "license": "MIT",
+ "require": {
+ "php": "^7.4 || ^8.0",
+ "psr/log": "^1.0 || ^2.0 || ^3.0",
+ "symfony/process": "^4.0 || ^5.0 || ^6.0"
+ },
+ "require-dev": {
+ "phpcq/runner-bootstrap": "^1.0@dev",
+ "symfony/filesystem": "^4.0 || ^5.0 || ^6.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "Bit3\\GitPhp\\": "src"
}
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Bit3\\GitPhp\\Test\\": "tests"
+ }
+ },
+ "config": {
+ "sort-packages": true
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-release/1.6.0": "1.6.0-dev"
+ }
+ }
}
diff --git a/exception-stubs.phpstub b/exception-stubs.phpstub
new file mode 100644
index 0000000..b3d9bbc
--- /dev/null
+++ b/exception-stubs.phpstub
@@ -0,0 +1 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/Command/BranchCommandBuilder.php b/src/Command/BranchCommandBuilder.php
index 8f1349a..4e5ba4e 100644
--- a/src/Command/BranchCommandBuilder.php
+++ b/src/Command/BranchCommandBuilder.php
@@ -14,7 +14,7 @@
* @author Tristan Lins
* @author Christian Schiffler
* @author Sven Baumann
- * @copyright 2014-2018 Tristan Lins
+ * @copyright 2014-2022 Tristan Lins
* @license https://github.com/bit3/git-php/blob/master/LICENSE MIT
* @link https://github.com/bit3/git-php
* @filesource
@@ -31,11 +31,11 @@ class BranchCommandBuilder implements CommandBuilderInterface
{
use CommandBuilderTrait;
- const WHEN_ALWAYS = 'always';
+ public const WHEN_ALWAYS = 'always';
- const WHEN_NEVER = 'never';
+ public const WHEN_NEVER = 'never';
- const WHEN_AUTO = 'auto';
+ public const WHEN_AUTO = 'auto';
/**
* {@inheritDoc}
diff --git a/src/Command/CommitCommandBuilder.php b/src/Command/CommitCommandBuilder.php
index 08d20c2..2208ebb 100644
--- a/src/Command/CommitCommandBuilder.php
+++ b/src/Command/CommitCommandBuilder.php
@@ -26,24 +26,25 @@
* Commit command builder.
*
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
+ * @SuppressWarnings(PHPMD.TooManyMethods)
*/
class CommitCommandBuilder implements CommandBuilderInterface
{
use CommandBuilderTrait;
- const CLEANUP_STRIP = 'strip';
+ public const CLEANUP_STRIP = 'strip';
- const CLEANUP_WHITESPACE = 'whitespace';
+ public const CLEANUP_WHITESPACE = 'whitespace';
- const CLEANUP_VERBATIM = 'verbatim';
+ public const CLEANUP_VERBATIM = 'verbatim';
- const CLEANUP_DEFAULT = 'default';
+ public const CLEANUP_DEFAULT = 'default';
- const UNTRACKED_FILES_NO = 'no';
+ public const UNTRACKED_FILES_NO = 'no';
- const UNTRACKED_FILES_NORMAL = 'normal';
+ public const UNTRACKED_FILES_NORMAL = 'normal';
- const UNTRACKED_FILES_ALL = 'all';
+ public const UNTRACKED_FILES_ALL = 'all';
/**
* Flag determining if gpg signing is desired.
diff --git a/src/Command/FetchCommandBuilder.php b/src/Command/FetchCommandBuilder.php
index c288047..2dc6812 100644
--- a/src/Command/FetchCommandBuilder.php
+++ b/src/Command/FetchCommandBuilder.php
@@ -14,7 +14,7 @@
* @author Tristan Lins
* @author Christian Schiffler
* @author Sven Baumann
- * @copyright 2014-2018 Tristan Lins
+ * @copyright 2014-2022 Tristan Lins
* @license https://github.com/bit3/git-php/blob/master/LICENSE MIT
* @link https://github.com/bit3/git-php
* @filesource
@@ -31,11 +31,11 @@ class FetchCommandBuilder implements CommandBuilderInterface
{
use CommandBuilderTrait;
- const RECURSE_SUBMODULES_YES = 'yes';
+ public const RECURSE_SUBMODULES_YES = 'yes';
- const RECURSE_SUBMODULES_ON_DEMAND = 'on-demand';
+ public const RECURSE_SUBMODULES_ON_DEMAND = 'on-demand';
- const RECURSE_SUBMODULES_NO = 'no';
+ public const RECURSE_SUBMODULES_NO = 'no';
/**
* {@inheritDoc}
diff --git a/src/Command/InitCommandBuilder.php b/src/Command/InitCommandBuilder.php
index 6864b23..55b3b50 100644
--- a/src/Command/InitCommandBuilder.php
+++ b/src/Command/InitCommandBuilder.php
@@ -14,7 +14,7 @@
* @author Tristan Lins
* @author Christian Schiffler
* @author Sven Baumann
- * @copyright 2014-2018 Tristan Lins
+ * @copyright 2014-2022 Tristan Lins
* @license https://github.com/bit3/git-php/blob/master/LICENSE MIT
* @link https://github.com/bit3/git-php
* @filesource
@@ -29,19 +29,19 @@ class InitCommandBuilder implements CommandBuilderInterface
{
use CommandBuilderTrait;
- const SHARE_FALSE = 'false';
+ public const SHARE_FALSE = 'false';
- const SHARE_TRUE = 'true';
+ public const SHARE_TRUE = 'true';
- const SHARE_UMASK = 'umask';
+ public const SHARE_UMASK = 'umask';
- const SHARE_GROUP = 'group';
+ public const SHARE_GROUP = 'group';
- const SHARE_ALL = 'all';
+ public const SHARE_ALL = 'all';
- const SHARE_WORLD = 'world';
+ public const SHARE_WORLD = 'world';
- const SHARE_EVERYBODY = 'everybody';
+ public const SHARE_EVERYBODY = 'everybody';
/**
* {@inheritDoc}
diff --git a/src/Command/LogCommandBuilder.php b/src/Command/LogCommandBuilder.php
index 55dd086..4224d4a 100644
--- a/src/Command/LogCommandBuilder.php
+++ b/src/Command/LogCommandBuilder.php
@@ -14,7 +14,7 @@
* @author Tristan Lins
* @author Christian Schiffler
* @author Sven Baumann
- * @copyright 2014-2018 Tristan Lins
+ * @copyright 2014-2022 Tristan Lins
* @license https://github.com/bit3/git-php/blob/master/LICENSE MIT
* @link https://github.com/bit3/git-php
* @filesource
@@ -29,34 +29,35 @@
* @SuppressWarnings(PHPMD.ExcessivePublicCount)
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
+ * @SuppressWarnings(PHPMD.TooManyMethods)
*/
class LogCommandBuilder implements CommandBuilderInterface
{
use CommandBuilderTrait;
- const DECORATE_SHORT = 'short';
+ public const DECORATE_SHORT = 'short';
- const DECORATE_FULL = 'full';
+ public const DECORATE_FULL = 'full';
- const DECORATE_NO = 'no';
+ public const DECORATE_NO = 'no';
- const WALK_SORTED = 'sorted';
+ public const WALK_SORTED = 'sorted';
- const WALK_UNSORTED = 'unsorted';
+ public const WALK_UNSORTED = 'unsorted';
- const DATE_RELATIVE = 'relative';
+ public const DATE_RELATIVE = 'relative';
- const DATE_LOCAL = 'local';
+ public const DATE_LOCAL = 'local';
- const DATE_DEFAULT = 'default';
+ public const DATE_DEFAULT = 'default';
- const DATE_ISO = 'iso';
+ public const DATE_ISO = 'iso';
- const DATE_RFC = 'rfc';
+ public const DATE_RFC = 'rfc';
- const DATE_SHORT = 'short';
+ public const DATE_SHORT = 'short';
- const DATE_RAW = 'raw';
+ public const DATE_RAW = 'raw';
/**
* {@inheritDoc}
diff --git a/src/Command/PushCommandBuilder.php b/src/Command/PushCommandBuilder.php
index 84e53f9..1b42340 100644
--- a/src/Command/PushCommandBuilder.php
+++ b/src/Command/PushCommandBuilder.php
@@ -14,7 +14,7 @@
* @author Tristan Lins
* @author Christian Schiffler
* @author Sven Baumann
- * @copyright 2014-2018 Tristan Lins
+ * @copyright 2014-2022 Tristan Lins
* @license https://github.com/bit3/git-php/blob/master/LICENSE MIT
* @link https://github.com/bit3/git-php
* @filesource
@@ -31,9 +31,9 @@ class PushCommandBuilder implements CommandBuilderInterface
{
use CommandBuilderTrait;
- const RECURSE_SUBMODULES_CHECK = 'check';
+ public const RECURSE_SUBMODULES_CHECK = 'check';
- const RECURSE_SUBMODULES_ON_DEMAND = 'on-demand';
+ public const RECURSE_SUBMODULES_ON_DEMAND = 'on-demand';
/**
* {@inheritDoc}
diff --git a/src/Command/RevParseCommandBuilder.php b/src/Command/RevParseCommandBuilder.php
index ac47b7a..ab13c82 100644
--- a/src/Command/RevParseCommandBuilder.php
+++ b/src/Command/RevParseCommandBuilder.php
@@ -15,7 +15,7 @@
* @author Christian Schiffler
* @author Radek Crlik
* @author Sven Baumann
- * @copyright 2014-2018 Tristan Lins
+ * @copyright 2014-2022 Tristan Lins
* @license https://github.com/bit3/git-php/blob/master/LICENSE MIT
* @link https://github.com/bit3/git-php
* @filesource
@@ -27,14 +27,15 @@
* Rev-parse command builder.
*
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
+ * @SuppressWarnings(PHPMD.TooManyMethods)
*/
class RevParseCommandBuilder implements CommandBuilderInterface
{
use CommandBuilderTrait;
- const ABBREV_REF_STRICT = 'strict';
+ public const ABBREV_REF_STRICT = 'strict';
- const ABBREV_REF_LOOSE = 'loose';
+ public const ABBREV_REF_LOOSE = 'loose';
/**
* {@inheritDoc}
diff --git a/src/Command/StashCommandBuilder.php b/src/Command/StashCommandBuilder.php
index 480a832..19240de 100644
--- a/src/Command/StashCommandBuilder.php
+++ b/src/Command/StashCommandBuilder.php
@@ -13,7 +13,7 @@
* @package bit3/git-php
* @author Ahmad Marzouq
* @author Sven Baumann
- * @copyright 2014-2018 Tristan Lins
+ * @copyright 2014-2022 Tristan Lins
* @license https://github.com/bit3/git-php/blob/master/LICENSE MIT
* @link https://github.com/bit3/git-php
* @filesource
@@ -224,7 +224,7 @@ public function store($message = null, $commit = null)
{
$this->arguments[] = 'store';
if ($message) {
- $this->arguments[] = '--message '.$message;
+ $this->arguments[] = '--message ' . $message;
}
if ($commit) {
$this->arguments[] = $commit;
diff --git a/src/Command/StatusCommandBuilder.php b/src/Command/StatusCommandBuilder.php
index 1f348c0..375e09f 100644
--- a/src/Command/StatusCommandBuilder.php
+++ b/src/Command/StatusCommandBuilder.php
@@ -14,7 +14,7 @@
* @author Tristan Lins
* @author Christian Schiffler
* @author Sven Baumann
- * @copyright 2014-2018 Tristan Lins
+ * @copyright 2014-2022 Tristan Lins
* @license https://github.com/bit3/git-php/blob/master/LICENSE MIT
* @link https://github.com/bit3/git-php
* @filesource
@@ -31,19 +31,19 @@ class StatusCommandBuilder implements CommandBuilderInterface
{
use CommandBuilderTrait;
- const UNTRACKED_FILES_NO = 'no';
+ public const UNTRACKED_FILES_NO = 'no';
- const UNTRACKED_FILES_NORMAL = 'normal';
+ public const UNTRACKED_FILES_NORMAL = 'normal';
- const UNTRACKED_FILES_ALL = 'all';
+ public const UNTRACKED_FILES_ALL = 'all';
- const IGNORE_SUBMODULES_NONE = 'none';
+ public const IGNORE_SUBMODULES_NONE = 'none';
- const IGNORE_SUBMODULES_UNTRACKED = 'untracked';
+ public const IGNORE_SUBMODULES_UNTRACKED = 'untracked';
- const IGNORE_SUBMODULES_DIRTY = 'dirty';
+ public const IGNORE_SUBMODULES_DIRTY = 'dirty';
- const IGNORE_SUBMODULES_ALL = 'all';
+ public const IGNORE_SUBMODULES_ALL = 'all';
/**
* {@inheritDoc}
diff --git a/src/Command/TagCommandBuilder.php b/src/Command/TagCommandBuilder.php
index c089b99..36d3987 100644
--- a/src/Command/TagCommandBuilder.php
+++ b/src/Command/TagCommandBuilder.php
@@ -14,7 +14,7 @@
* @author Tristan Lins
* @author Christian Schiffler
* @author Sven Baumann
- * @copyright 2014-2018 Tristan Lins
+ * @copyright 2014-2022 Tristan Lins
* @license https://github.com/bit3/git-php/blob/master/LICENSE MIT
* @link https://github.com/bit3/git-php
* @filesource
@@ -31,11 +31,11 @@ class TagCommandBuilder implements CommandBuilderInterface
{
use CommandBuilderTrait;
- const CLEANUP_VERBATIM = 'verbatim';
+ public const CLEANUP_VERBATIM = 'verbatim';
- const CLEANUP_WHITESPACE = 'whitespace';
+ public const CLEANUP_WHITESPACE = 'whitespace';
- const CLEANUP_STRIP = 'strip';
+ public const CLEANUP_STRIP = 'strip';
/**
* Flag if signing shall be done.
diff --git a/src/GitRepository.php b/src/GitRepository.php
index 20804cc..0e991f4 100644
--- a/src/GitRepository.php
+++ b/src/GitRepository.php
@@ -18,7 +18,7 @@
* @author Matthew Gamble
* @author Ahmad Marzouq
* @author Sven Baumann
- * @copyright 2014-2018 Tristan Lins
+ * @copyright 2014-2022 Tristan Lins
* @license https://github.com/bit3/git-php/blob/master/LICENSE MIT
* @link https://github.com/bit3/git-php
* @filesource
@@ -54,6 +54,7 @@
* GIT repository adapter.
*
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class GitRepository
{
diff --git a/tests/GitRepositoryTest.php b/tests/GitRepositoryTest.php
index ec1268f..b69aae9 100644
--- a/tests/GitRepositoryTest.php
+++ b/tests/GitRepositoryTest.php
@@ -30,6 +30,8 @@
/**
* GIT repository unit tests.
+ *
+ * @covers \Bit3\GitPhp\GitRepository
*/
class GitRepositoryTest extends TestCase
{
@@ -53,7 +55,7 @@ class GitRepositoryTest extends TestCase
*/
protected $uninitializedGitRepository;
- public function setUp()
+ public function setUp(): void
{
$this->initializedRepositoryPath = \tempnam(\sys_get_temp_dir(), 'git_');
\unlink($this->initializedRepositoryPath);
@@ -71,7 +73,7 @@ public function setUp()
$this->uninitializedGitRepository = new GitRepository($this->uninitializedRepositoryPath);
}
- public function tearDown()
+ public function tearDown(): void
{
$fs = new Filesystem();
$fs->remove($this->initializedRepositoryPath);