Skip to content

Commit

Permalink
release PHP 7.2 downgraded 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jul 31, 2023
1 parent ed468ab commit ff92735
Show file tree
Hide file tree
Showing 166 changed files with 439 additions and 2,695 deletions.
3 changes: 0 additions & 3 deletions .github/FUNDING.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .github/workflows/code_analysis.yaml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/downgraded_release.yaml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/rector.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/various_php_install.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions build/composer-php-72.json

This file was deleted.

10 changes: 0 additions & 10 deletions build/rector-downgrade-php-72.php

This file was deleted.

36 changes: 2 additions & 34 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,15 @@
"license": "MIT",
"keywords": ["static analysis", "phpstan-extension"],
"require": {
"php": "^8.1",
"phpstan/phpstan": "^1.10.26",
"nette/utils": "^3.2",
"php": "^7.2 || ^8.0",
"phpstan/phpstan": "^1.10.19",
"webmozart/assert": "^1.11"
},
"require-dev": {
"phpstan/extension-installer": "^1.3",
"phpunit/phpunit": "^10.2",
"symplify/easy-coding-standard": "^11.5",
"rector/rector": "^0.17",
"tracy/tracy": "^2.10",
"php-parallel-lint/php-parallel-lint": "^1.3",
"tomasvotruba/type-coverage": "^0.1",
"symplify/easy-ci": "^11.2",
"tomasvotruba/class-leak": "0.0.22.72"
},
"autoload": {
"psr-4": {
"TomasVotruba\\UnusedPublic\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"TomasVotruba\\UnusedPublic\\Tests\\": "tests"
},
"classmap": [
"stubs"
]
},
"scripts": {
"check-cs": "vendor/bin/ecs check --ansi",
"fix-cs": "vendor/bin/ecs check --fix --ansi",
"phpstan": "vendor/bin/phpstan --ansi",
"rector": "vendor/bin/rector --dry-run --ansi",
"release": "vendor/bin/monorepo-builder release patch --ansi"
},
"config": {
"allow-plugins": {
"phpstan/extension-installer": true
}
},
"extra": {
"phpstan": {
"includes": [
Expand Down
22 changes: 0 additions & 22 deletions ecs.php

This file was deleted.

32 changes: 0 additions & 32 deletions phpstan.neon

This file was deleted.

12 changes: 0 additions & 12 deletions phpunit.xml

This file was deleted.

4 changes: 2 additions & 2 deletions src/ApiDocStmtAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function isApiDoc(Stmt $stmt, ClassReflection $classReflection): bool
{
if ($classReflection->getResolvedPhpDoc() instanceof ResolvedPhpDocBlock) {
$resolvedPhpDoc = $classReflection->getResolvedPhpDoc();
if (str_contains($resolvedPhpDoc->getPhpDocString(), '@api')) {
if (strpos($resolvedPhpDoc->getPhpDocString(), '@api') !== false) {
return true;
}
}
Expand All @@ -30,6 +30,6 @@ public function isApiDoc(Stmt $stmt, ClassReflection $classReflection): bool

public function isApiDocComment(string $docComment): bool
{
return str_contains($docComment, '@api');
return strpos($docComment, '@api') !== false;
}
}
12 changes: 9 additions & 3 deletions src/CallReferece/ParentCallReferenceResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@

final class ParentCallReferenceResolver
{
public function __construct(
private readonly ReflectionProvider $reflectionProvider,
) {
/**
* @readonly
* @var \PHPStan\Reflection\ReflectionProvider
*/
private $reflectionProvider;

public function __construct(ReflectionProvider $reflectionProvider)
{
$this->reflectionProvider = $reflectionProvider;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/CollectorMapper/MethodCallCollectorMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function mapToMethodCallReferences(array $nestedReferencesByFiles): array

// remove ReferenceMaker::LOCAL prefix
return array_map(static function (string $methodCallReference): string {
if (str_starts_with($methodCallReference, ReferenceMarker::LOCAL)) {
if (strncmp($methodCallReference, ReferenceMarker::LOCAL, strlen(ReferenceMarker::LOCAL)) === 0) {
return substr($methodCallReference, strlen(ReferenceMarker::LOCAL));
}

Expand All @@ -39,7 +39,7 @@ public function mapToLocalAndExternal(array $nestedReferencesByFiles): LocalAndE
$externalMethodCallReferences = [];

foreach ($methodCallReferences as $methodCallReference) {
if (str_starts_with($methodCallReference, ReferenceMarker::LOCAL)) {
if (strncmp($methodCallReference, ReferenceMarker::LOCAL, strlen(ReferenceMarker::LOCAL)) === 0) {
$localMethodCallReferences[] = substr($methodCallReference, strlen(ReferenceMarker::LOCAL));
} else {
$externalMethodCallReferences[] = $methodCallReference;
Expand Down

0 comments on commit ff92735

Please sign in to comment.