Skip to content

Commit

Permalink
Merge pull request #633 from W0rma/fix-ci
Browse files Browse the repository at this point in the history
Fix CI
  • Loading branch information
stof authored Oct 11, 2024
2 parents e3810e5 + ac2a13a commit c5d07b9
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 12 deletions.
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
->setRiskyAllowed(false)
->setRules([
'@PER-CS' => true,
'array_syntax' => false,
'braces_position' => [
'control_structures_opening_brace' => 'same_line',
],
Expand Down
5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ parameters:
count: 2
path: src/Prophecy/Argument/Token/ExactValueToken.php

-
message: "#^Method Prophecy\\\\Call\\\\CallCenter\\:\\:indentArguments\\(\\) should return array\\<string\\> but returns array\\<string\\>\\|null\\.$#"
count: 1
path: src/Prophecy/Call/CallCenter.php

-
message: "#^Method Prophecy\\\\Doubler\\\\CachedDoubler\\:\\:createDoubleClass\\(\\) should return class\\-string\\<Prophecy\\\\Doubler\\\\DoubleInterface&T of object\\> but returns class\\-string\\.$#"
count: 1
Expand Down
1 change: 0 additions & 1 deletion spec/Prophecy/Prediction/CallbackPredictionSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace spec\Prophecy\Prediction;

use PhpSpec\ObjectBehavior;

use Prophecy\Call\Call;
use Prophecy\Prophecy\MethodProphecy;
use Prophecy\Prophecy\ObjectProphecy;
Expand Down
4 changes: 2 additions & 2 deletions src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ public function apply(ClassNode $node)
if (in_array($methodName, self::MAGIC_METHODS_WITH_ARGUMENTS)) {
if (method_exists($tag, 'getParameters')) {
// Reflection Docblock 5.4.0+.
foreach($tag->getParameters() as $argument) {
foreach ($tag->getParameters() as $argument) {
$argumentNode = new ArgumentNode($argument->getName());
$methodNode->addArgument($argumentNode);
}
} else {
// Reflection Docblock < 5.4.0.
foreach($tag->getArguments() as $argument) {
foreach ($tag->getArguments() as $argument) {
$argumentNode = new ArgumentNode($argument['name']);
$methodNode->addArgument($argumentNode);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Prophecy/Doubler/Generator/ClassMirror.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ private function getTypeHints(?ReflectionType $type, ReflectionClass $class, boo
}
} elseif ($type instanceof ReflectionIntersectionType) {
throw new ClassMirrorException('Doubling intersection types is not supported', $class);
} elseif(is_object($type)) {
} elseif (is_object($type)) {
throw new ClassMirrorException('Unknown reflection type '.get_class($type), $class);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private function getInterfacesTagList(\ReflectionClass $reflectionClass)
$interfaces = $reflectionClass->getInterfaces();
$tagList = array();

foreach($interfaces as $interface) {
foreach ($interfaces as $interface) {
$tagList = array_merge($tagList, $this->classRetriever->getTagList($interface));
}

Expand Down
4 changes: 2 additions & 2 deletions src/Prophecy/Prophecy/MethodProphecy.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ static function (string $type1, string $type2) {
return class_exists($type) || interface_exists($type);
};

if($isObject($type1) && !$isObject($type2)) {
if ($isObject($type1) && !$isObject($type2)) {
return -1;
} elseif(!$isObject($type1) && $isObject($type2)) {
} elseif (!$isObject($type1) && $isObject($type2)) {
return 1;
}

Expand Down

0 comments on commit c5d07b9

Please sign in to comment.