8000 CS Fixes by chalasr · Pull Request #22844 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

CS Fixes #22844

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2017
Merged

CS Fixes #22844

merged 1 commit into from
May 22, 2017

Conversation

chalasr
Copy link
Member
@chalasr chalasr commented May 22, 2017
Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

@chalasr
Copy link
Member Author
chalasr commented May 22, 2017

travis random failure unrelated

@@ -197,7 +197,6 @@ public function doRun(InputInterface $input, OutputInterface $output)
$e = $this->runningCommand = null;
// the command name MUST be the first element of the input
$command = $this->find($name);
} catch (\Exception $e) {
} catch (\Throwable $e) {
}
if (null !== $e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then this if is useless (and the initialization of $e also)

@@ -813,7 +812,6 @@ protected function doRunCommand(Command $command, InputInterface $input, OutputI
} else {
$exitCode = ConsoleCommandEvent::RETURN_CODE_DISABLED;
}
} catch (\Exception $e) {
} catch (\Throwable $e) {
}
if (null !== $e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same (init + if can be removed)

@@ -88,7 +52,7 @@ private function getType(\ReflectionParameter $parameter)
if (!$type = $parameter->getType()) {
return;
}
$typeName = $type instanceof \ReflectionNamedType ? $type->getName() : $type->__toString();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReflectionType::__toString() is deprecated

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right - and there are more of it in the code base, isn't it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed, all fixed. addressed your other comments also

@chalasr chalasr force-pushed the cs-fixes branch 2 times, most recently from b0cf180 to 832d490 Compare May 22, 2017 08:56
@@ -51,7 +51,6 @@ public static function castClosure(\Closure $c, array $a, Stub $stub, $isNested,
unset($v->value['position'], $v->value['isVariadic'], $v->value['byReference'], $v);
}
}
;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about this one

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

me either, applied fabbot patch blindly. reverted

@nicolas-grekas
Copy link
Member

Thank you @chalasr.

@nicolas-grekas nicolas-grekas added this to the 4.0 milestone May 22, 2017
@nicolas-grekas nicolas-grekas merged commit 21114f8 into symfony:master May 22, 2017
nicolas-grekas added a commit that referenced this pull request May 22, 2017
This PR was merged into the 4.0-dev branch.

Discussion
----------

CS Fixes

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

21114f8 CS Fixes
@chalasr chalasr deleted the cs-fixes branch May 22, 2017 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0