Skip to content

Commit

Permalink
Apply cs fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
W0rma committed Oct 4, 2024
1 parent 9ac5f6c commit 302a85b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
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 302a85b

Please sign in to comment.