Skip to content
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

PHPStan fixes #4405

Draft
wants to merge 31 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
72f9395
fatal
sreichel Dec 7, 2024
4c008f6
fatal
sreichel Dec 7, 2024
124376c
fatal
sreichel Dec 7, 2024
8bd542c
unused
sreichel Dec 7, 2024
832a98c
unused
sreichel Dec 7, 2024
5c9e4c3
baseline
sreichel Dec 7, 2024
908d003
phpstan2
sreichel Dec 7, 2024
cddc160
phpmd doc fix
sreichel Dec 7, 2024
617f6d5
baseline
sreichel Dec 7, 2024
abb6706
composer.lock
sreichel Dec 7, 2024
cbaf906
Merge branch 'main' into phpstan-clean
sreichel Dec 7, 2024
5de452c
rector
sreichel Dec 7, 2024
10f56aa
Merge branch 'main' into phpstan-clean
sreichel Dec 25, 2024
1790229
Merge branch 'main' into phpstan-clean
sreichel Jan 6, 2025
0674432
Merge branch 'main' into phpstan-clean
sreichel Jan 9, 2025
044011a
Merge branch 'main' into phpstan-clean
sreichel Jan 11, 2025
d69ff57
Merge branch 'main' into phpstan-clean
sreichel Jan 15, 2025
4e3c2e0
Merge branch 'main' into phpstan-clean
sreichel Jan 15, 2025
0b937af
remove - instead of adding required methods
sreichel Jan 15, 2025
17fb177
phpstan
sreichel Jan 15, 2025
680498f
phpstan baseline
sreichel Jan 15, 2025
2919281
phpstan ignore
sreichel Jan 15, 2025
0b4935e
revert
sreichel Jan 16, 2025
ae2dc39
baseline
sreichel Jan 16, 2025
68722a8
update
sreichel Jan 17, 2025
6ff253b
update + baseline
sreichel Jan 18, 2025
8cfada5
update + baseline
sreichel Jan 18, 2025
b6de49e
update + fix
sreichel Jan 18, 2025
ec7520c
updated config
sreichel Jan 18, 2025
b397128
update + baseline
sreichel Jan 18, 2025
d238a89
Merge branch 'main' into phpstan-clean
sreichel Jan 18, 2025
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
Prev Previous commit
Next Next commit
update + baseline
sreichel committed Jan 18, 2025
commit 6ff253bb53d24e0cd88898f78506f20ca3386caa
12 changes: 12 additions & 0 deletions .phpstan.dist.baseline.neon
Original file line number Diff line number Diff line change
@@ -2652,6 +2652,18 @@ parameters:
count: 1
path: app/code/core/Mage/Centinel/Helper/Data.php

-
message: '#^Method Mage_Centinel_Model_Api\:\:callLookup\(\) should return \$this\(Mage_Centinel_Model_Api\) but returns Varien_Object\.$#'
identifier: return.type
count: 1
path: app/code/core/Mage/Centinel/Model/Api.php

-
message: '#^Property Mage_Centinel_Model_Api\:\:\$_clientInstance \(Mage_Centinel_Model_Api_Client\) in empty\(\) is not falsy\.$#'
identifier: empty.property
count: 1
path: app/code/core/Mage/Centinel/Model/Api.php

-
message: '#^Cannot call method setItem\(\) on array\.$#'
identifier: method.nonObject
7 changes: 3 additions & 4 deletions .phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -35,10 +35,6 @@ parameters:
# Cannot declare class Varien_Date, because the name is already in use
- app/code/core/Mage/Catalog/Model/Product/Option/Type/Date.php

# Cannot declare class XMLParser, because the name is already in use
- app/code/core/Mage/Centinel/Model/Api.php
- app/code/core/Mage/Centinel/Model/Api/Client.php

# Class phpseclib\Net\SSH2 not found.
- app/code/core/Mage/Paypal/Model/Report/Settlement.php
- lib/Varien/Io/Sftp.php
@@ -49,6 +45,9 @@ parameters:

# Instantiated class not found
- lib/Varien/Image/Adapter.php

# Class Mage_Centinel_Model_Api_Client extends unknown class CentinelClient.
- app/code/core/Mage/Centinel/Model/Api/Client.php
ignoreErrors:
-
# @todo remove unused classes/template
6 changes: 3 additions & 3 deletions app/code/core/Mage/Centinel/Model/Api/Client.php
Original file line number Diff line number Diff line change
@@ -38,11 +38,11 @@ public function sendHttp($url, $connectTimeout, $timeout)
$ch = curl_init($url);

// set URL and other appropriate options
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);

// Execute the request.