Skip to content

Commit

Permalink
Fix implicitly-required parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jan 23, 2024
1 parent 6fec735 commit fb9fa26
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class AutowiredServices
private $dispatcher;
private $cachePool;

public function __construct(?Reader $annotationReader = null, EventDispatcherInterface $dispatcher, CacheItemPoolInterface $cachePool)
public function __construct(?Reader $annotationReader, EventDispatcherInterface $dispatcher, CacheItemPoolInterface $cachePool)
{
$this->annotationReader = $annotationReader;
$this->dispatcher = $dispatcher;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ProfilerController
private $cspHandler;
private $baseDir;

public function __construct(UrlGeneratorInterface $generator, ?Profiler $profiler = null, Environment $twig, array $templates, ?ContentSecurityPolicyHandler $cspHandler = null, ?string $baseDir = null)
public function __construct(UrlGeneratorInterface $generator, ?Profiler $profiler, Environment $twig, array $templates, ?ContentSecurityPolicyHandler $cspHandler = null, ?string $baseDir = null)
{
$this->generator = $generator;
$this->profiler = $profiler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function testIsGithubActionEnvironment()
/**
* @dataProvider annotationsFormatProvider
*/
public function testAnnotationsFormat(string $type, string $message, ?string $file = null, ?int $line = null, ?int $col = null, string $expected)
public function testAnnotationsFormat(string $type, string $message, ?string $file, ?int $line, ?int $col, string $expected)
{
$reporter = new GithubActionReporter($buffer = new BufferedOutput());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ private function &recursiveBuildPreliminaryFormTree(FormInterface $form, array &
return $output;
}

private function &recursiveBuildFinalFormTree(?FormInterface $form = null, FormView $view, array &$outputByHash)
private function &recursiveBuildFinalFormTree(?FormInterface $form, FormView $view, array &$outputByHash)
{
$viewHash = spl_object_hash($view);
$formHash = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ abstract class AbstractSurrogateFragmentRenderer extends RoutableFragmentRendere
*
* @param FragmentRendererInterface $inlineStrategy The inline strategy to use when the surrogate is not supported
*/
public function __construct(?SurrogateInterface $surrogate = null, FragmentRendererInterface $inlineStrategy, ?UriSigner $signer = null)
public function __construct(?SurrogateInterface $surrogate, FragmentRendererInterface $inlineStrategy, ?UriSigner $signer = null)
{
$this->surrogate = $surrogate;
$this->inlineStrategy = $inlineStrategy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ public function fooAction(?NonExistentClass $nonExistent = null)
{
}

public function barAction(?NonExistentClass $nonExistent = null, $bar)
public function barAction(?NonExistentClass $nonExistent, $bar)
{
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public static function typesProvider()
/**
* @dataProvider provideCollectionTypes
*/
public function testExtractCollection($property, ?array $type = null, $shortDescription, $longDescription)
public function testExtractCollection($property, ?array $type, $shortDescription, $longDescription)
{
if (!class_exists(Collection::class)) {
$this->markTestSkipped('Collections are not implemented in current phpdocumentor/type-resolver version');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function __construct(ValidatorInterface $validator, $root, TranslatorInte
/**
* {@inheritdoc}
*/
public function setNode($value, ?object $object, ?MetadataInterface $metadata = null, string $propertyPath)
public function setNode($value, ?object $object, ?MetadataInterface $metadata, string $propertyPath)
{
$this->value = $value;
$this->object = $object;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function getObject();
* @param object|null $object The currently validated object
* @param string $propertyPath The property path to the current value
*/
public function setNode($value, ?object $object, ?MetadataInterface $metadata = null, string $propertyPath);
public function setNode($value, ?object $object, ?MetadataInterface $metadata, string $propertyPath);

/**
* Warning: Should not be called by user code, to be used by the validator engine only.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,6 @@ public static function stub(): void
}
}

function reflectionParameterFixture(?NotLoadableClass $arg1 = null, $arg2)
function reflectionParameterFixture(?NotLoadableClass $arg1, $arg2)
{
}

0 comments on commit fb9fa26

Please sign in to comment.