Skip to content

Commit

Permalink
fix(php-cs-fixer): allow global_namespace_import conflicting with php…
Browse files Browse the repository at this point in the history
…stan
  • Loading branch information
mborne committed Mar 16, 2024
1 parent 621f1ee commit 07b320b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PHP_CS_RULES=@Symfony
PHP_CS_RULES=@Symfony,-global_namespace_import
PHP_MD_RULES=cleancode,codesize,controversial,design,naming,unusedcode

.PHONY: test
Expand Down Expand Up @@ -29,8 +29,8 @@ fix-style: vendor
.PHONY: check-style
check-style: vendor
@echo "-- Checking coding style using php-cs-fixer (run 'make fix-style' if it fails)"
vendor/bin/php-cs-fixer fix src --rules $(PHP_CS_RULES) -v --dry-run --diff --using-cache=no
vendor/bin/php-cs-fixer fix tests --rules $(PHP_CS_RULES) -v --dry-run --diff --using-cache=no
vendor/bin/php-cs-fixer fix src --rules $(PHP_CS_RULES) -v --dry-run --diff
vendor/bin/php-cs-fixer fix tests --rules $(PHP_CS_RULES) -v --dry-run --diff

vendor:
composer install
3 changes: 2 additions & 1 deletion src/Helper/ClientHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use MBO\RemoteGit\ClientInterface;
use MBO\RemoteGit\Exception\MissingConstException;
use MBO\RemoteGit\Exception\RequiredParameterException;
use ReflectionClass;

/**
* Helper to inspect client classes.
Expand All @@ -20,7 +21,7 @@ class ClientHelper
*/
public static function getStaticProperties(string $className): array
{
$reflectionClass = new \ReflectionClass($className);
$reflectionClass = new ReflectionClass($className);
if (!$reflectionClass->implementsInterface(ClientInterface::class)) {
throw new RequiredParameterException(sprintf('%s must implement %s', $className, ClientInterface::class));
}
Expand Down

0 comments on commit 07b320b

Please sign in to comment.