8000 fix class use and in phpdoc by ewgRa · Pull Request #15733 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

fix class use and in phpdoc #15733

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

Closed
wants to merge 3 commits into from
Closed
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 @@ -49,7 +49,7 @@ protected function setUp()
}

/**
* @expectedException LogicException
* @expectedException \LogicException
Copy link
Member

Choose a reason for hiding this comment

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

expectedException always take a fqcn, which means there is no need for a starting \ for these annotations

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, but phpstorm can't understand this and show that this class is undefined. This is only phpstorm problem? In other IDE it works well with "Find usage" functionality for example, or when you click on this class to check its source?

*/
public function testFixManagersAutoMappingsWithTwoAutomappings()
{
Expand Down Expand Up @@ -239,7 +239,7 @@ public function testServiceCacheDriver()
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage "unrecognized_type" is an unrecognized Doctrine cache driver.
*/
public function testUnrecognizedCacheDriverException()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function testClassOptionIsRequired()
}

/**
* @expectedException Symfony\Component\Form\Exception\RuntimeException
* @expectedException \Symfony\Component\Form\Exception\RuntimeException
*/
public function testInvalidClassOption()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Command;

use Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputArgument;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,8 @@ private function getEventDispatcherListenersDocument(EventDispatcherInterface $e
}

/**
* @param DOMElement $element
* @param array $eventListeners
* @param \DOMElement $element
* @param array $eventListeners
*/
private function appendEventListenerDocument(\DOMElement $element, array $eventListeners)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function testProcess()
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage The service "my-command" tagged "console.command" must be public.
*/
public function testProcessThrowAnExceptionIfTheServiceIsNotPublic()
Expand All @@ -57,7 +57,7 @@ public function testProcessThrowAnExceptionIfTheServiceIsNotPublic()
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage The service "my-command" tagged "console.command" must not be abstract.
*/
public function testProcessThrowAnExceptionIfTheServiceIsAbstract()
Expand All @@ -74,7 +74,7 @@ public function testProcessThrowAnExceptionIfTheServiceIsAbstract()
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage The service "my-command" tagged "console.command" must be a subclass of "Symfony\Component\Console\Command\Command".
*/
public function testProcessThrowAnExceptionIfTheServiceIsNotASubclassOfCommand()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function testCsrfAliases()
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
*/
public function testCsrfOriginalAndAliasValueCausesException()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Console/Helper/ProgressBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ public function clear()
/**
* Sets the progress bar maximal steps.
*
* @param int The progress bar max steps
* @param int $max The progress bar max steps
*/
private function setMaxSteps($max)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Console/Helper/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ private function buildTableRows($rows)
* fill rows that contains rowspan > 1.
*
* @param array $rows
* @param array $line
* @param int $line
*
* @return array
*/
Expand Down Expand Up @@ -431,7 +431,7 @@ private function fillNextRows($rows, $line)
* fill cells for a row that contains colspan > 1.
*
* @param array $row
* @param array $column
* @param int $column
*
* @return array
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ public function testHasScope()
}

/**
* @expectedException Exception
* @expectedException \Exception
* @expectedExceptionMessage Something went terribly wrong!
*/
public function testGetThrowsException()
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/DomCrawler/Tests/FormTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ public function testFormRegistrySetValueOnCompoundField()
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage Unreachable field "0"
*/
public function testFormRegistrySetArrayOnNotCompoundField()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace Symfony\Component\EventDispatcher\Tests;

use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

abstract class AbstractEventDispatcherTest extends \PHPUnit_Framework_TestCase
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/ExpressionLanguage/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function __construct(array $functions)
* @param TokenStream $stream A token stream instance
* @param array $names An array of valid names
*
* @return Node A node tree
* @return Node\Node A node tree
*
* @throws SyntaxError
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Filesystem/Tests/LockHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class LockHandlerTest extends \PHPUnit_Framework_TestCase
{
/**
* @expectedException Symfony\Component\Filesystem\Exception\IOException
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
* @expectedExceptionMessage Failed to create "/a/b/c/d/e": mkdir(): Permission denied.
*/
public function testConstructWhenRepositoryDoesNotExist()
Expand All @@ -19,7 +19,7 @@ public function testConstructWhenRepositoryDoesNotExist()
}

/**
* @expectedException Symfony\Component\Filesystem\Exception\IOException
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
* @expectedExceptionMessage The directory "/" is not writable.
*/
public function testConstructWhenRepositoryIsNotWriteable()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function testGenerateFragmentUriWithARequest()
}

/**
* @expectedException LogicException
* @expectedException \LogicException
* @dataProvider getGenerateFragmentUriDataWithNonScalar
*/
public function testGenerateFragmentUriWithNonScalar($controller)
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/HttpKernel/Tests/KernelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace Symfony\Component\HttpKernel\Tests;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
use Symfony\Component\HttpKernel\Config\EnvParametersResource;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\HttpKernel\HttpKernelInterface;
Expand Down
1 change: 0 additions & 1 deletion src/Symfony/Component/Intl/Resources/stubs/Collator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*/

use Symfony\Component\Intl\Collator\Collator as IntlCollator;
use Symfony\Component\Intl\Collator\StubCollator;

/**
* Stub implementation for the Collator class of the intl extension.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function testGetNullNamedEncoderForEncoderAware()
}

/**
* @expectedException RuntimeException
* @expectedException \RuntimeException
*/
public function testGetInvalidNamedEncoderForEncoderAware()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Symfony\Component\Validator\Mapping;

use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\MetadataInterface as LegacyMetadataInterface;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/VarDumper/Caster/Caster.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class Caster
/**
* Casts objects to arrays and adds the dynamic property prefix.
*
* @param object $obj The object to cast.
* @param ReflectionClass $reflector The class reflector to use for inspecting the object definition.
* @param object $obj The object to cast.
* @param \ReflectionClass $reflector The class reflector to use for inspecting the object definition.
*
* @return array The array-cast of the object, with prefixed dynamic properties.
*/
Expand Down
0