Skip to content

Commit

Permalink
Merge pull request #554 from laurieplo/add-typehints
Browse files Browse the repository at this point in the history
Add missing type hints
  • Loading branch information
Landerstraeten authored Oct 25, 2018
2 parents bd2efcc + 278d31c commit 137b126
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Collection/ProcessArgumentsCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function addOptionalBooleanArgument(string $argument, $value, string $tru
* @param string $argument
* @param int|null $value
*/
public function addOptionalIntegerArgument($argument, $value)
public function addOptionalIntegerArgument(string $argument, $value)
{
if (null === $value) {
return;
Expand Down
2 changes: 1 addition & 1 deletion src/Composer/GrumPHPPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ protected function deInitGitHook()
/**
* Run the GrumPHP console to (de)init the git hooks.
*/
protected function runGrumPhpCommand($command)
protected function runGrumPhpCommand(string $command)
{
$config = $this->composer->getConfig();
$commandLocator = new ExternalCommand($config->get('bin-dir'), new ExecutableFinder());
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/Compiler/TaskCompilerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private function getTaskTag(array $tags): array
return $resolver->resolve(current($tags));
}

private function parseTaskMetadata($configuration): array
private function parseTaskMetadata(array $configuration): array
{
$resolver = new OptionsResolver();
$resolver->setDefaults([
Expand Down
4 changes: 2 additions & 2 deletions src/Console/Command/Git/InitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function execute(InputInterface $input, OutputInterface $output)
$output->writeln('<fg=yellow>Watch out! GrumPHP is sniffing your commits!<fg=yellow>');
}

protected function parseHookBody($hook, SplFileInfo $templateFile): string
protected function parseHookBody(string $hook, SplFileInfo $templateFile): string
{
$content = $this->filesystem->readFromFileInfo($templateFile);
$replacements = [
Expand All @@ -122,7 +122,7 @@ protected function parseHookBody($hook, SplFileInfo $templateFile): string
/**
* @throws \GrumPHP\Exception\FileNotFoundException
*/
protected function generateHookCommand($command): string
protected function generateHookCommand(string $command): string
{
$configFile = $this->useExoticConfigFile();

Expand Down
4 changes: 2 additions & 2 deletions src/Console/Helper/PathsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function getAsciiPath(): string
/**
* Load an ascii image.
*/
public function getAsciiContent($resource): string
public function getAsciiContent(string $resource): string
{
$file = $this->config->getAsciiContentPath($resource);

Expand Down Expand Up @@ -180,7 +180,7 @@ public function getBinDir(): string
* Search a command in the bin folder
* Note: the command locator is not injected because it needs the relative bin path.
*/
public function getBinCommand($command, bool $forceUnix = false): string
public function getBinCommand(string $command, bool $forceUnix = false): string
{
return $this->externalCommandLocator->locate($command, $forceUnix);
}
Expand Down

0 comments on commit 137b126

Please sign in to comment.