Skip to content

[2.5] CS Fixes And Removed Unused Imports #12856

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 Dec 5, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,10 @@ protected function loadObjectManagerCacheDriver(array $objectManager, ContainerB
/**
* Loads a cache driver.
*
* @param string $cacheDriverServiceId The cache driver name.
* @param string $objectManagerName The object manager name.
* @param array $cacheDriver The cache driver mapping.
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container The ContainerBuilder instance.
* @param string $cacheDriverServiceId The cache driver name.
* @param string $objectManagerName The object manager name.
* @param array $cacheDriver The cache driver mapping.
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container The ContainerBuilder instance.
*
* @return string
*
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ protected function getDefaultFormatter()
/**
* Updates the logging level based on the verbosity setting of the console output.
*
* @return bool Whether the handler is enabled and verbosity is not set to quiet.
* @return bool Whether the handler is enabled and verbosity is not set to quiet.
*/
private function updateLevel()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

/**
* @param string $warmupDir
* @param string $realCacheDir
* @param bool $enableOptionalWarmers
* @param string $warmupDir
* @param string $realCacheDir
* @param bool $enableOptionalWarmers
*/
protected function warmup($warmupDir, $realCacheDir, $enableOptionalWarmers = true)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public function describe(OutputInterface $output, $object, array $options = arra
/**
* Writes content to output.
*
* @param string $content
* @param bool $decorated
* @param string $content
* @param bool $decorated
*/
protected function write($content, $decorated = false)
{
Expand Down
11 changes: 6 additions & 5 deletions src/Symfony/Bundle/TwigBundle/Extension/AssetsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ public function getFunctions()
*
* Absolute paths (i.e. http://...) are returned unmodified.
*
* @param string $path A public path
* @param string $packageName The name of the asset package to use
* @param bool $absolute Whether to return an absolute URL or a relative one
* @param string|bool|null $version A specific version
* @param string $path A public path
* @param string $packageName The name of the asset package to use
* @param bool $absolute Whether to return an absolute URL or a relative one
* @param string|bool|null $version A specific version
*
* @return string A public path which takes into account the base path and URL path
*/
Expand Down Expand Up @@ -93,8 +93,9 @@ public function getName()
*
* @param string $url The URL that has to be absolute
*
* @return string The absolute URL
* @throws \RuntimeException
*
* @return string The absolute URL
Copy link
Member

Choose a reason for hiding this comment

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

I think @return usually is above @throws.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I disagree.

*/
private function ensureUrlIsAbsolute($url)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/ClassLoader/Psr4ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function loadClass($class)
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend
* @param bool $prepend
*/
public function register($prepend = false)
{
Expand Down
8 changes: 4 additions & 4 deletions src/Symfony/Component/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -815,8 +815,8 @@ public function getTerminalDimensions()
*
* Can be useful to force terminal dimensions for functional tests.
*
* @param int $width The width
* @param int $height The height
* @param int $width The width
* @param int $height The height
*
* @return Application The current application
*/
Expand Down Expand Up @@ -1050,8 +1050,8 @@ public function extractNamespace($name, $limit = null)
* Finds alternative of $name among $collection,
* if nothing is found in $collection, try in $abbrevs
*
* @param string $name The string
* @param array|\Traversable $collection The collection
* @param string $name The string
* @param array|\Traversable $collection The collection
*
* @return array A sorted array of similar string
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Console/Descriptor/Descriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public function describe(OutputInterface $output, $object, array $options = arra
/**
* Writes content to output.
*
* @param string $content
* @param bool $decorated
* @param string $content
* @param bool $decorated
*/
protected function write($content, $decorated = false)
{
Expand Down
20 changes: 10 additions & 10 deletions src/Symfony/Component/Console/Helper/ProgressBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function getMessage($name = 'message')
/**
* Gets the progress bar start time.
*
* @return int The progress bar start time
* @return int The progress bar start time
*/
public function getStartTime()
{
Expand All @@ -160,7 +160,7 @@ public function getStartTime()
/**
* Gets the progress bar maximal steps.
*
* @return int The progress bar max steps
* @return int The progress bar max steps
*/
public function getMaxSteps()
{
Expand All @@ -170,7 +170,7 @@ public function getMaxSteps()
/**
* Gets the progress bar step.
*
* @return int The progress bar step
* @return int The progress bar step
*/
public function getStep()
{
Expand All @@ -180,7 +180,7 @@ public function getStep()
/**
* Gets the progress bar step width.
*
* @return int The progress bar step width
* @return int The progress bar step width
*/
public function getStepWidth()
{
Expand All @@ -190,7 +190,7 @@ public function getStepWidth()
/**
* Gets the current progress bar percent.
*
* @return int The current progress bar percent
* @return int The current progress bar percent
*/
public function getProgressPercent()
{
Expand All @@ -200,7 +200,7 @@ public function getProgressPercent()
/**
* Sets the progress bar width.
*
* @param int $size The progress bar size
* @param int $size The progress bar size
*/
public function setBarWidth($size)
{
Expand All @@ -210,7 +210,7 @@ public function setBarWidth($size)
/**
* Gets the progress bar width.
*
* @return int The progress bar size
* @return int The progress bar size
*/
public function getBarWidth()
{
Expand Down Expand Up @@ -299,7 +299,7 @@ public function setFormat($format)
/**
* Sets the redraw frequency.
*
* @param int $freq The frequency in steps
* @param int $freq The frequency in steps
*/
public function setRedrawFrequency($freq)
{
Expand Down Expand Up @@ -328,7 +328,7 @@ public function start()
/**
* Advances the progress output X steps.
*
* @param int $step Number of steps to advance
* @param int $step Number of steps to advance
*
* @throws \LogicException
*/
Expand All @@ -340,7 +340,7 @@ public function advance($step = 1)
/**
* Sets the current progress.
*
* @param int $step The current progress
* @param int $step The current progress
*
* @throws \LogicException
*/
Expand Down
16 changes: 8 additions & 8 deletions src/Symfony/Component/Console/Helper/QuestionHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public function doAsk(OutputInterface $output, Question $question)
* Autocompletes a question.
*
* @param OutputInterface $output
* @param Question $question
* @param Question $question
*
* @return string
*/
Expand Down Expand Up @@ -281,9 +281,9 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu
/**
* Gets a hidden response from user.
*
* @param OutputInterface $output An Output instance
* @param OutputInterface $output An Output instance
*
* @return string The answer
* @return string The answer
*
* @throws \RuntimeException In case the fallback is deactivated and the response cannot be hidden
*/
Expand Down Expand Up @@ -341,11 +341,11 @@ private function getHiddenResponse(OutputInterface $output, $inputStream)
/**
* Validates an attempt.
*
* @param callable $interviewer A callable that will ask for a question and return the result
* @param OutputInterface $output An Output instance
* @param Question $question A Question instance
* @param callable $interviewer A callable that will ask for a question and return the result
* @param OutputInterface $output An Output instance
* @param Question $question A Question instance
*
* @return string The validated response
* @return string The validated response
*
* @throws \Exception In case the max number of attempts has been reached and no valid response has been given
*/
Expand All @@ -370,7 +370,7 @@ private function validateAttempts($interviewer, OutputInterface $output, Questio
/**
* Returns a valid unix shell.
*
* @return string|bool The valid shell name, false in case no valid shell is found
* @return string|bool The valid shell name, false in case no valid shell is found
*/
private function getShell()
{
Expand Down
12 changes: 6 additions & 6 deletions src/Symfony/Component/Console/Helper/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,9 @@ private function renderRow(array $row, $cellFormat)
/**
* Renders table cell with padding.
*
* @param array $row
* @param int $column
* @param string $cellFormat
* @param array $row
* @param int $column
* @param string $cellFormat
*/
private function renderCell(array $row, $column, $cellFormat)
{
Expand Down Expand Up @@ -339,7 +339,7 @@ private function getNumberOfColumns()
/**
* Gets column width.
*
* @param int $column
* @param int $column
*
* @return int
*/
Expand All @@ -364,8 +364,8 @@ private function getColumnWidth($column)
/**
* Gets cell width.
*
* @param array $row
* @param int $column
* @param array $row
* @param int $column
*
* @return int
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Console/Helper/TableStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public function getBorderFormat()
/**
* Sets cell padding type.
*
* @param int $padType STR_PAD_*
* @param int $padType STR_PAD_*
*
* @return TableStyle
*/
Expand Down
6 changes: 4 additions & 2 deletions src/Symfony/Component/Console/Logger/ConsoleLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ public function log($level, $message, array $context = array())
* Interpolates context values into the message placeholders
*
* @author PHP Framework Interoperability Group
* @param string $message
* @param array $context
*
* @param string $message
* @param array $context
*
* @return string
*/
private function interpolate($message, array $context)
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Console/Question/ChoiceQuestion.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function getChoices()
*
* When multiselect is set to true, multiple choices can be answered.
*
* @param bool $multiselect
* @param bool $multiselect
*
* @return ChoiceQuestion The current instance
*/
Expand Down
6 changes: 3 additions & 3 deletions src/Symfony/Component/Console/Question/Question.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function isHidden()
/**
* Sets whether the user response must be hidden or not.
*
* @param bool $hidden
* @param bool $hidden
*
* @return Question The current instance
*
Expand Down Expand Up @@ -102,7 +102,7 @@ public function isHiddenFallback()
/**
* Sets whether to fallback on non-hidden question if the response can not be hidden.
*
* @param bool $fallback
* @param bool $fallback
*
* @return Question The current instance
*/
Expand Down Expand Up @@ -179,7 +179,7 @@ public function getValidator()
*
* Null means an unlimited number of attempts.
*
* @param null|int $attempts
* @param null|int $attempts
*
* @return Question The current instance
*
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Console/Tester/ApplicationTester.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function getOutput()
/**
* Gets the status code returned by the last execution of the application.
*
* @return int The status code
* @return int The status code
*/
public function getStatusCode()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Console/Tester/CommandTester.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function getOutput()
/**
* Gets the status code returned by the last execution of the application.
*
* @return int The status code
* @return int The status code
*/
public function getStatusCode()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Debug/DebugClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function findFile($class)
*
* @param string $class The name of the class
*
* @return bool|null True, if loaded
* @return bool|null True, if loaded
*
* @throws \RuntimeException
*/
Expand Down Expand Up @@ -213,7 +213,7 @@ public function loadClass($class)
chdir($cwd);
}

if ( 0 === substr_compare($real, $tail, -strlen($tail), strlen($tail), true)
if (0 === substr_compare($real, $tail, -strlen($tail), strlen($tail), true)
&& 0 !== substr_compare($real, $tail, -strlen($tail), strlen($tail), false)
) {
throw new \RuntimeException(sprintf('Case mismatch between class and source file names: %s vs %s', $class, $real));
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Debug/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static function register($level = null, $displayErrors = true)
/**
* Sets the level at which the conversion to Exception is done.
*
* @param int|null $level The level (null to use the error_reporting() value and 0 to disable)
* @param int|null $level The level (null to use the error_reporting() value and 0 to disable)
*/
public function setLevel($level)
{
Expand All @@ -98,7 +98,7 @@ public function setLevel($level)
/**
* Sets the display_errors flag value.
*
* @param int $displayErrors The display_errors flag value
* @param int $displayErrors The display_errors flag value
*/
public function setDisplayErrors($displayErrors)
{
Expand Down
Loading