Skip to content

Commit 443411a

Browse files
committed
minor #502 Running php-cs-fixer (weaverryan)
This PR was merged into the 1.0-dev branch. Discussion ---------- Running php-cs-fixer Commits ------- 0f84fcd Running php-cs-fixer
2 parents f5e27d5 + 0f84fcd commit 443411a

14 files changed

+5
-82
lines changed

src/ApplicationAwareMakerInterface.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,5 @@
2020
*/
2121
interface ApplicationAwareMakerInterface
2222
{
23-
/**
24-
* @param Application $application
25-
*/
2623
public function setApplication(Application $application);
2724
}

src/Doctrine/DoctrineHelper.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ public function getEntityNamespace(): string
7070
}
7171

7272
/**
73-
* @param string $className
74-
*
7573
* @return MappingDriver|null
7674
*
7775
* @throws \Exception
@@ -118,9 +116,6 @@ public function getEntitiesForAutocomplete(): array
118116
}
119117

120118
/**
121-
* @param string|null $classOrNamespace
122-
* @param bool $disconnected
123-
*
124119
* @return array|ClassMetadata
125120
*/
126121
public function getMetadata(string $classOrNamespace = null, bool $disconnected = false)
@@ -180,8 +175,6 @@ public function getMetadata(string $classOrNamespace = null, bool $disconnected
180175
}
181176

182177
/**
183-
* @param string $entityClassName
184-
*
185178
* @return EntityDetails|null
186179
*/
187180
public function createDoctrineDetails(string $entityClassName)

src/Doctrine/ORMDependencyBuilder.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ final class ORMDependencyBuilder
2222
{
2323
/**
2424
* Central method to add dependencies needed for Doctrine ORM.
25-
*
26-
* @param DependencyBuilder $dependencies
2725
*/
2826
public static function buildDependencies(DependencyBuilder $dependencies)
2927
{

src/FileManager.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ public function fileExists($path): bool
8787
*
8888
* @param string $absolutePath
8989
*
90-
* @return string
91-
*
9290
* @throws \Exception
9391
*/
9492
public function relativizePath($absolutePath): string
@@ -148,8 +146,6 @@ public function absolutizePath($path): string
148146
}
149147

150148
/**
151-
* @param string $className
152-
*
153149
* @return string|null
154150
*
155151
* @throws \Exception
@@ -189,8 +185,6 @@ public function getPathForTemplate(string $filename): string
189185
* Resolve '../' in paths (like real_path), but for non-existent files.
190186
*
191187
* @param string $absolutePath
192-
*
193-
* @return string
194188
*/
195189
private function realPath($absolutePath): string
196190
{

src/Generator.php

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ public function generateClass(string $className, string $templateName, array $va
6464

6565
/**
6666
* Generate a normal file from a template.
67-
*
68-
* @param string $targetPath
69-
* @param string $templateName
70-
* @param array $variables
7167
*/
7268
public function generateFile(string $targetPath, string $templateName, array $variables)
7369
{
@@ -124,12 +120,9 @@ public function getFileContentsForPendingOperation(string $targetPath): string
124120
* // Cool\Stuff\BalloonController
125121
* $gen->createClassNameDetails('Cool\\Stuff\\Balloon', 'Controller', 'Controller');
126122
*
127-
* @param string $name The short "name" that will be turned into the class name
128-
* @param string $namespacePrefix Recommended namespace where this class should live, but *without* the "App\\" part
129-
* @param string $suffix Optional suffix to guarantee is on the end of the class
130-
* @param string $validationErrorMessage
131-
*
132-
* @return ClassNameDetails
123+
* @param string $name The short "name" that will be turned into the class name
124+
* @param string $namespacePrefix Recommended namespace where this class should live, but *without* the "App\\" part
125+
* @param string $suffix Optional suffix to guarantee is on the end of the class
133126
*/
134127
public function createClassNameDetails(string $name, string $namespacePrefix, string $suffix = '', string $validationErrorMessage = ''): ClassNameDetails
135128
{
@@ -160,10 +153,7 @@ public function getRootDirectory(): string
160153
private function addOperation(string $targetPath, string $templateName, array $variables)
161154
{
162155
if ($this->fileManager->fileExists($targetPath)) {
163-
throw new RuntimeCommandException(sprintf(
164-
'The file "%s" can\'t be generated because it already exists.',
165-
$this->fileManager->relativizePath($targetPath)
166-
));
156+
throw new RuntimeCommandException(sprintf('The file "%s" can\'t be generated because it already exists.', $this->fileManager->relativizePath($targetPath)));
167157
}
168158

169159
$variables['relative_path'] = $this->fileManager->relativizePath($targetPath);
@@ -228,10 +218,6 @@ public function generateController(string $controllerClassName, string $controll
228218

229219
/**
230220
* Generate a template file.
231-
*
232-
* @param string $targetPath
233-
* @param string $templateName
234-
* @param array $variables
235221
*/
236222
public function generateTemplate(string $targetPath, string $templateName, array $variables)
237223
{

src/InputConfiguration.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ final class InputConfiguration
1818
/**
1919
* Call in MakerInterface::configureCommand() to disable the automatic interactive
2020
* prompt for an argument.
21-
*
22-
* @param string $argumentName
2321
*/
2422
public function setArgumentAsNonInteractive(string $argumentName)
2523
{

src/MakerInterface.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ interface MakerInterface
2323
{
2424
/**
2525
* Return the command name for your maker (e.g. make:report).
26-
*
27-
* @return string
2826
*/
2927
public static function getCommandName(): string;
3028

@@ -33,34 +31,21 @@ public static function getCommandName(): string;
3331
*
3432
* By default, all arguments will be asked interactively. If you want
3533
* to avoid that, use the $inputConfig->setArgumentAsNonInteractive() method.
36-
*
37-
* @param Command $command
38-
* @param InputConfiguration $inputConfig
3934
*/
4035
public function configureCommand(Command $command, InputConfiguration $inputConfig);
4136

4237
/**
4338
* Configure any library dependencies that your maker requires.
44-
*
45-
* @param DependencyBuilder $dependencies
4639
*/
4740
public function configureDependencies(DependencyBuilder $dependencies);
4841

4942
/**
5043
* If necessary, you can use this method to interactively ask the user for input.
51-
*
52-
* @param InputInterface $input
53-
* @param ConsoleStyle $io
54-
* @param Command $command
5544
*/
5645
public function interact(InputInterface $input, ConsoleStyle $io, Command $command);
5746

5847
/**
5948
* Called after normal code generation: allows you to do anything.
60-
*
61-
* @param InputInterface $input
62-
* @param ConsoleStyle $io
63-
* @param Generator $generator
6449
*/
6550
public function generate(InputInterface $input, ConsoleStyle $io, Generator $generator);
6651
}

src/Security/SecurityConfigUpdater.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ final class SecurityConfigUpdater
2424

2525
/**
2626
* Updates security.yaml contents based on a new User class.
27-
*
28-
* @param string $yamlSource
29-
* @param UserClassConfiguration $userConfig
30-
* @param string $userClass
31-
*
32-
* @return string
3327
*/
3428
public function updateForUserClass(string $yamlSource, UserClassConfiguration $userConfig, string $userClass): string
3529
{

src/Test/MakerTestProcess.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,7 @@ public function run($allowToFail = false, array $envVars = []): self
4848
$this->process->run(null, $envVars);
4949

5050
if (!$allowToFail && !$this->process->isSuccessful()) {
51-
throw new \Exception(sprintf(
52-
'Error running command: "%s". Output: "%s". Error: "%s"',
53-
$this->process->getCommandLine(),
54-
$this->process->getOutput(),
55-
$this->process->getErrorOutput()
56-
));
51+
throw new \Exception(sprintf('Error running command: "%s". Output: "%s". Error: "%s"', $this->process->getCommandLine(), $this->process->getOutput(), $this->process->getErrorOutput()));
5752
}
5853

5954
return $this;

src/Util/AutoloaderUtil.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ public function __construct(ComposerAutoloaderFinder $autoloaderFinder)
3333
/**
3434
* Returns the relative path to where a new class should live.
3535
*
36-
* @param string $className
37-
*
3836
* @return string|null
3937
*
4038
* @throws \Exception

src/Util/ClassNameDetails.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ public function getShortName(): string
4444
*
4545
* For example, assuming the namespace is App\Entity:
4646
* App\Entity\Admin\User => Admin\User
47-
*
48-
* @return string
4947
*/
5048
public function getRelativeName(): string
5149
{

src/Util/ClassSourceManipulator.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -687,8 +687,6 @@ private function getConstructorNode()
687687
}
688688

689689
/**
690-
* @param string $class
691-
*
692690
* @return string The alias to use when referencing this class
693691
*/
694692
public function addUseStatementIfNecessary(string $class): string
@@ -837,8 +835,6 @@ private function getNamespaceNode(): Node\Stmt\Namespace_
837835
}
838836

839837
/**
840-
* @param callable $filterCallback
841-
*
842838
* @return Node|null
843839
*/
844840
private function findFirstNode(callable $filterCallback)
@@ -852,9 +848,6 @@ private function findFirstNode(callable $filterCallback)
852848
}
853849

854850
/**
855-
* @param callable $filterCallback
856-
* @param array $ast
857-
*
858851
* @return Node|null
859852
*/
860853
private function findLastNode(callable $filterCallback, array $ast)
@@ -1045,8 +1038,6 @@ private function getThisFullClassName(): string
10451038
* Adds this new node where a new property should go.
10461039
*
10471040
* Useful for adding properties, or adding a constructor.
1048-
*
1049-
* @param Node $newNode
10501041
*/
10511042
private function addNodeAfterProperties(Node $newNode)
10521043
{

src/Util/PrettyPrinter.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ final class PrettyPrinter extends Standard
3333
* changes) adds 4 spaces onto that. This is why we don't
3434
* also need to handle indent levels of 5, 9, etc: these
3535
* do not occur (at least in the code we generate);
36-
*
37-
* @param int $level
3836
*/
3937
protected function setIndentLevel(int $level)
4038
{

src/Util/YamlSourceManipulator.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -904,8 +904,6 @@ private function guessNextArrayTypeAndAdvance(): string
904904

905905
/**
906906
* Advance until you find *one* of the characters in $chars.
907-
*
908-
* @param array $chars
909907
*/
910908
private function findPositionOfNextCharacter(array $chars)
911909
{

0 commit comments

Comments
 (0)