Skip to content

Commit b421b33

Browse files
authored
[5.1] phan: fixes plugins (#43073)
1 parent 21ad74d commit b421b33

File tree

33 files changed

+42
-46
lines changed

33 files changed

+42
-46
lines changed

.phan/config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
//
5050
// Note that the **only** effect of choosing `'5.6'` is to infer that functions removed in php 7.0 exist.
5151
// (See `backward_compatibility_checks` for additional options)
52-
// Automatically inferred from composer.json requirement for "php" of "^7.2.5"
53-
'target_php_version' => '7.2',
52+
// Automatically inferred from composer.json requirement for "php" of "^8.1.0"
53+
'target_php_version' => '8.1',
5454

5555
// If enabled, missing properties will be created when
5656
// they are first seen. If false, we'll report an

administrator/components/com_fields/src/Plugin/FieldsListPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class FieldsListPlugin extends FieldsPlugin
3131
* @param \DOMElement $parent The field node parent.
3232
* @param Form $form The form.
3333
*
34-
* @return \DOMElement
34+
* @return ?\DOMElement
3535
*
3636
* @since 3.7.0
3737
*/

administrator/components/com_fields/src/Plugin/FieldsPlugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public function onCustomFieldsGetTypes()
201201
* @param \stdclass $item The item.
202202
* @param \stdclass $field The field.
203203
*
204-
* @return string
204+
* @return ?string
205205
*
206206
* @since 3.7.0
207207
*/
@@ -235,7 +235,7 @@ public function onCustomFieldsPrepareField($context, $item, $field)
235235
* @param \DOMElement $parent The field node parent.
236236
* @param Form $form The form.
237237
*
238-
* @return \DOMElement
238+
* @return ?\DOMElement
239239
*
240240
* @since 3.7.0
241241
*/

libraries/src/Changelog/Changelog.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Changelog
122122
/**
123123
* Resource handle for the XML Parser
124124
*
125-
* @var resource
125+
* @var \XMLParser
126126
* @since 4.0.0
127127
*/
128128
protected $xmlParser;

libraries/src/Image/Image.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function __construct($source = null)
137137
/**
138138
* Get the image resource handle
139139
*
140-
* @return resource
140+
* @return \GdImage
141141
*
142142
* @since 3.8.0
143143
* @throws \LogicException if an image has not been loaded into the instance

libraries/src/Image/ImageFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
abstract class ImageFilter
2222
{
2323
/**
24-
* @var resource The image resource handle.
24+
* @var \GdImage The image resource handle.
2525
* @since 2.5.0
2626
*/
2727
protected $handle;

libraries/src/Updater/Update.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class Update
176176
/**
177177
* Resource handle for the XML Parser
178178
*
179-
* @var resource
179+
* @var \XMLParser
180180
* @since 3.0.0
181181
*/
182182
protected $xmlParser;

libraries/src/Updater/UpdateAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ abstract class UpdateAdapter extends AdapterInstance
3232
/**
3333
* Resource handle for the XML Parser
3434
*
35-
* @var resource
35+
* @var \XMLParser
3636
* @since 3.0.0
3737
*/
3838
protected $xmlParser;

plugins/actionlog/joomla/src/Extension/Joomla.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ protected function checkLoggable($extension)
896896
*
897897
* Method is called after user request to remind their username.
898898
*
899-
* @param array $user Holds the user data.
899+
* @param object $user Holds the user data.
900900
*
901901
* @return void
902902
*
@@ -1127,7 +1127,7 @@ public function onJoomlaAfterUpdate($oldVersion = null)
11271127
*
11281128
* @param string $context The context of the action log
11291129
*
1130-
* @return \stdClass The params
1130+
* @return ?\stdClass The params
11311131
*
11321132
* @since 4.2.0
11331133
*/
@@ -1147,7 +1147,7 @@ private function getActionLogParams($context): ?\stdClass
11471147
*
11481148
* Method is called after user request to reset their password.
11491149
*
1150-
* @param array $user Holds the user data.
1150+
* @param object $user Holds the user data.
11511151
*
11521152
* @return void
11531153
*
@@ -1180,7 +1180,7 @@ public function onUserAfterResetRequest($user)
11801180
*
11811181
* Method is called after user complete the reset of their password.
11821182
*
1183-
* @param array $user Holds the user data.
1183+
* @param object $user Holds the user data.
11841184
*
11851185
* @return void
11861186
*

plugins/api-authentication/token/src/Extension/Token.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Joomla\CMS\Event\User\AuthenticationEvent;
1616
use Joomla\CMS\Plugin\CMSPlugin;
1717
use Joomla\CMS\User\UserFactoryAwareTrait;
18-
use Joomla\Component\Plugins\Administrator\Model\PluginModel;
1918
use Joomla\Database\DatabaseAwareTrait;
2019
use Joomla\Database\ParameterType;
2120
use Joomla\Event\DispatcherInterface;
@@ -327,7 +326,7 @@ private function isTokenEnabledForUser(int $userId): bool
327326
*/
328327
private function getPluginParameter(string $folder, string $plugin, string $param, $default = null)
329328
{
330-
/** @var PluginModel $model */
329+
/** @var \Joomla\Component\Plugins\Administrator\Model\PluginModel $model */
331330
$model = $this->getApplication()->bootComponent('plugins')
332331
->getMVCFactory()->createModel('Plugin', 'Administrator', ['ignore_request' => true]);
333332

0 commit comments

Comments
 (0)