Skip to content

Commit 33b4237

Browse files
blanksedvesh3
andauthored
Codeception/Symfony: Fix deprecations (#339)
* Codeception: Fix deprecations * Inline PhpDoc without variable name makes no effect * More specific array docs * Fix deprecations from Symfony Toolbar * Fix PhpStan * Apply suggestions from code review Co-authored-by: Divesh Pahuja <[email protected]> Co-authored-by: Divesh Pahuja <[email protected]>
1 parent 33eed81 commit 33b4237

21 files changed

+122
-59
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,6 @@ parameters:
190190
count: 1
191191
path: src/Security/SsoIdentity/DefaultSsoIdentityService.php
192192

193-
-
194-
message: "#^Method CustomerManagementFrameworkBundle\\\\Security\\\\UserProvider\\\\CustomerObjectUserProvider\\:\\:refreshUser\\(\\) should return Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface but returns CustomerManagementFrameworkBundle\\\\Model\\\\CustomerInterface\\|null\\.$#"
195-
count: 1
196-
path: src/Security/UserProvider/CustomerObjectUserProvider.php
197-
198193
-
199194
message: "#^Binary operation \"\\|\" between string and 0 results in an error\\.$#"
200195
count: 1

src/Command/ActionTriggerQueueCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ protected function configure()
4949
/**
5050
* @param InputInterface $input
5151
* @param OutputInterface $output
52+
*
53+
* @return int
5254
*/
53-
protected function execute(InputInterface $input, OutputInterface $output)
55+
protected function execute(InputInterface $input, OutputInterface $output)//: int
5456
{
5557
$this->lock(self::LOCK_KEY);
5658

src/Command/BuildSegmentsCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ protected function configure()
8181
/**
8282
* @param InputInterface $input
8383
* @param OutputInterface $output
84+
*
85+
* @return int
8486
*/
85-
protected function execute(InputInterface $input, OutputInterface $output)
87+
protected function execute(InputInterface $input, OutputInterface $output)//: int
8688
{
8789
$customQueue = null;
8890
if ($input->getOption('customer')) {

src/Command/CronTriggerCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ protected function configure()
4545
/**
4646
* @param InputInterface $input
4747
* @param OutputInterface $output
48+
*
49+
* @return int
4850
*/
49-
protected function execute(InputInterface $input, OutputInterface $output)
51+
protected function execute(InputInterface $input, OutputInterface $output)//: int
5052
{
5153
$logger = $this->getLogger();
5254

src/Command/DuplicatesIndexCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ protected function configure()
4747
/**
4848
* @param InputInterface $input
4949
* @param OutputInterface $output
50+
*
51+
* @return int
5052
*/
51-
protected function execute(InputInterface $input, OutputInterface $output)
53+
protected function execute(InputInterface $input, OutputInterface $output)//: int
5254
{
5355
$logger = $this->getLogger();
5456

src/Command/MaintenanceCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected function configure()
5151
*
5252
* @return int
5353
*/
54-
protected function execute(InputInterface $input, OutputInterface $output)
54+
protected function execute(InputInterface $input, OutputInterface $output)//: int
5555
{
5656
$this->maintenanceWorker->execute();
5757

src/Command/SegmentAssignmentIndexCommand.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,13 @@ protected function configure()
4141
->setDescription('Processes entries from segment assignment queue, use this for manually updating the index, which is usually done during cmf:maintenance');
4242
}
4343

44-
protected function execute(InputInterface $input, OutputInterface $output)
44+
/**
45+
* @param InputInterface $input
46+
* @param OutputInterface $output
47+
*
48+
* @return int
49+
*/
50+
protected function execute(InputInterface $input, OutputInterface $output)//: int
4551
{
4652
$this->indexer->processQueue();
4753

src/Controller/Rest/AbstractRestController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ abstract class AbstractRestController extends AdminController
3434

3535
/**
3636
* @inheritDoc
37+
*
38+
* @return bool
3739
*/
38-
public function needsSessionDoubleAuthenticationCheck()
40+
public function needsSessionDoubleAuthenticationCheck()//: bool
3941
{
4042
// do not double-check session as api key auth is possible
4143
return false;

src/DependencyInjection/Configuration.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323

2424
class Configuration implements ConfigurationInterface
2525
{
26-
public function getConfigTreeBuilder()
26+
/**
27+
* @return TreeBuilder
28+
*/
29+
public function getConfigTreeBuilder()//: TreeBuilder
2730
{
2831
$treeBuilder = new TreeBuilder('pimcore_customer_management_framework');
2932
$rootNode = $treeBuilder->getRootNode();

src/Event/Frontend/UrlActivityTracker.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ class UrlActivityTracker implements EventSubscriberInterface
2828

2929
/**
3030
* @inheritDoc
31+
*
32+
* @return array<string, string>
3133
*/
32-
public static function getSubscribedEvents()
34+
public static function getSubscribedEvents()//: array
3335
{
3436
return [
3537
KernelEvents::REQUEST => 'onKernelRequest',

0 commit comments

Comments
 (0)