From 41de69bdbe16cecc1f1edce65f33a82af72e6cea Mon Sep 17 00:00:00 2001 From: Thijs Vergauwe Date: Thu, 24 Jan 2019 09:37:42 +0100 Subject: [PATCH] fix: replace string assertion with array assertion for $filter fix: function imports fix: import sort order --- .../Tools/Console/Command/GenerateHydratorsCommand.php | 4 ++-- .../Console/Command/GeneratePersistentCollectionsCommand.php | 4 ++-- .../MongoDB/Tools/Console/Command/GenerateProxiesCommand.php | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateHydratorsCommand.php b/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateHydratorsCommand.php index 100591cd15..b906f5362e 100644 --- a/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateHydratorsCommand.php +++ b/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateHydratorsCommand.php @@ -13,8 +13,8 @@ use function assert; use function count; use function file_exists; +use function is_array; use function is_dir; -use function is_string; use function is_writable; use function mkdir; use function realpath; @@ -58,7 +58,7 @@ protected function configure() protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output) { $filter = $input->getOption('filter'); - assert(is_string($filter)); + assert(is_array($filter)); $dm = $this->getHelper('documentManager')->getDocumentManager(); diff --git a/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GeneratePersistentCollectionsCommand.php b/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GeneratePersistentCollectionsCommand.php index fee9dfc857..3d73c4f61d 100644 --- a/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GeneratePersistentCollectionsCommand.php +++ b/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GeneratePersistentCollectionsCommand.php @@ -13,8 +13,8 @@ use function assert; use function count; use function file_exists; +use function is_array; use function is_dir; -use function is_string; use function is_writable; use function mkdir; use function realpath; @@ -58,7 +58,7 @@ protected function configure() protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output) { $filter = $input->getOption('filter'); - assert(is_string($filter)); + assert(is_array($filter)); $dm = $this->getHelper('documentManager')->getDocumentManager(); diff --git a/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateProxiesCommand.php b/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateProxiesCommand.php index 768b5fbf90..9739e80ea4 100644 --- a/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateProxiesCommand.php +++ b/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateProxiesCommand.php @@ -16,6 +16,7 @@ use function assert; use function count; use function file_exists; +use function is_array; use function is_dir; use function is_string; use function is_writable; @@ -56,7 +57,7 @@ protected function configure() protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output) { $filter = $input->getOption('filter'); - assert(is_string($filter)); + assert(is_array($filter)); /** @var DocumentManager $dm */ $dm = $this->getHelper('documentManager')->getDocumentManager();