Skip to content

Commit ec1e261

Browse files
committed
[SCA] psalm fixes and update baseline
1 parent d594cd3 commit ec1e261

File tree

7 files changed

+123
-1759
lines changed

7 files changed

+123
-1759
lines changed

Diff for: .phpstorm.meta.php/laravel.meta.php

+8-9
Original file line numberDiff line numberDiff line change
@@ -5496,17 +5496,16 @@
54965496
'docstore-c-dir@customers','docstore-c-dir@create','docstore-c-dir@edit','docstore-c-dir@store','docstore-c-dir@update',
54975497
'docstore-c-dir@delete','docstore-c-dir@delete-for-customer','docstore-c-file@upload','docstore-c-file@edit','docstore-c-file@store',
54985498
'docstore-c-file@update','docstore-c-file@delete','docstore-c-file@info','log@list','log@view',
5499-
'rs-filters@list-customers','phpinfo','utils/phpinfo','utils/ixf-compare','utils/do-ixf-compare','apiv4-router-gen-config','api-v4:ping','api-v4:test',
5500-
'ixf-member-export','ixpmanager-users/ixf-ids','l2-address@create',
5501-
'l2-address@delete','customer-notes@ping','customer-notes@get','utils@markdown','customer@byVlanAndProtocol',
5502-
'irrdb-prefix@by-customer-and-protocol','api-v4-aut-num','api-v4-prefix-whois','api-v4:test-auth','switch@switch-port-for-ppp','switch@switch-port-prewired',
5503-
'vlan@used-across-vlans','customer-notes@notify-toggle-customer','customer-notes@notify-toggle-note','customer-notes@create','customer-notes@update',
5504-
'customer-notes@delete','content/members',
5505-
'static/support','grapher::','grapher::','grapher::','grapher::',
5499+
'rs-filters@list-customers','irrdb@summary','phpinfo','utils/phpinfo','utils/ixf-compare',
5500+
'utils/do-ixf-compare','apiv4-router-gen-config','api-v4:ping',
5501+
'api-v4:test','ixf-member-export','ixpmanager-users/ixf-ids',
5502+
'l2-address@create','l2-address@delete','customer-notes@ping','customer-notes@get','utils@markdown',
5503+
'customer@byVlanAndProtocol','irrdb-prefix@by-customer-and-protocol','api-v4-aut-num','api-v4-prefix-whois','api-v4:test-auth','switch@switch-port-for-ppp','switch@switch-port-prewired','vlan@used-across-vlans','customer-notes@notify-toggle-customer','customer-notes@notify-toggle-note','customer-notes@create',
5504+
'customer-notes@update','customer-notes@delete','content/members','static/support','grapher::','grapher::','grapher::',
55065505
'grapher::','grapher::','grapher::','grapher::','grapher::',
55075506
'grapher::','grapher::','grapher::','grapher::','grapher::',
5508-
'grapher::','grapher::','api-v4-ixf-ixs','api-v4-peeringdb-ixs','api-v4-peeringdb-fac',
5509-
'diagnostics@customer','diagnostics@irrdb',);
5507+
'grapher::','grapher::','grapher::','api-v4-ixf-ixs','api-v4-peeringdb-ixs',
5508+
'api-v4-peeringdb-fac','diagnostics@customer','diagnostics@irrdb',);
55105509
registerArgumentsSet('views',
55115510
'auth.emails.forgot-password','auth.emails.forgot-username','auth.emails.password-reset','customer.emails.billing-details-changed','customer.emails.note-changed',
55125511
'customer.emails.welcome-email','errors.500','errors.503','layer2-address.emails.changed','pagination::bootstrap-4',

Diff for: _ide_helper.php

+108-21
Original file line numberDiff line numberDiff line change
@@ -5132,6 +5132,35 @@ public static function macroCall($method, $parameters)
51325132
return $instance->macroCall($method, $parameters);
51335133
}
51345134

5135+
/**
5136+
* Get a lock instance.
5137+
*
5138+
* @param string $name
5139+
* @param int $seconds
5140+
* @param string|null $owner
5141+
* @return \Illuminate\Contracts\Cache\Lock
5142+
* @static
5143+
*/
5144+
public static function lock($name, $seconds = 0, $owner = null)
5145+
{
5146+
/** @var \Illuminate\Cache\RedisStore $instance */
5147+
return $instance->lock($name, $seconds, $owner);
5148+
}
5149+
5150+
/**
5151+
* Restore a lock instance using the owner identifier.
5152+
*
5153+
* @param string $name
5154+
* @param string $owner
5155+
* @return \Illuminate\Contracts\Cache\Lock
5156+
* @static
5157+
*/
5158+
public static function restoreLock($name, $owner)
5159+
{
5160+
/** @var \Illuminate\Cache\RedisStore $instance */
5161+
return $instance->restoreLock($name, $owner);
5162+
}
5163+
51355164
/**
51365165
* Remove all items from the cache.
51375166
*
@@ -5140,49 +5169,107 @@ public static function macroCall($method, $parameters)
51405169
*/
51415170
public static function flush()
51425171
{
5143-
/** @var \Illuminate\Cache\ArrayStore $instance */
5172+
/** @var \Illuminate\Cache\RedisStore $instance */
51445173
return $instance->flush();
51455174
}
51465175

51475176
/**
5148-
* Get the cache key prefix.
5177+
* Remove all expired tag set entries.
51495178
*
5150-
* @return string
5179+
* @return void
51515180
* @static
51525181
*/
5153-
public static function getPrefix()
5182+
public static function flushStaleTags()
51545183
{
5155-
/** @var \Illuminate\Cache\ArrayStore $instance */
5156-
return $instance->getPrefix();
5184+
/** @var \Illuminate\Cache\RedisStore $instance */
5185+
$instance->flushStaleTags();
51575186
}
51585187

51595188
/**
5160-
* Get a lock instance.
5189+
* Get the Redis connection instance.
51615190
*
5162-
* @param string $name
5163-
* @param int $seconds
5164-
* @param string|null $owner
5165-
* @return \Illuminate\Contracts\Cache\Lock
5191+
* @return \Illuminate\Redis\Connections\Connection
51665192
* @static
51675193
*/
5168-
public static function lock($name, $seconds = 0, $owner = null)
5194+
public static function connection()
51695195
{
5170-
/** @var \Illuminate\Cache\ArrayStore $instance */
5171-
return $instance->lock($name, $seconds, $owner);
5196+
/** @var \Illuminate\Cache\RedisStore $instance */
5197+
return $instance->connection();
51725198
}
51735199

51745200
/**
5175-
* Restore a lock instance using the owner identifier.
5201+
* Get the Redis connection instance that should be used to manage locks.
51765202
*
5177-
* @param string $name
5178-
* @param string $owner
5179-
* @return \Illuminate\Contracts\Cache\Lock
5203+
* @return \Illuminate\Redis\Connections\Connection
51805204
* @static
51815205
*/
5182-
public static function restoreLock($name, $owner)
5206+
public static function lockConnection()
51835207
{
5184-
/** @var \Illuminate\Cache\ArrayStore $instance */
5185-
return $instance->restoreLock($name, $owner);
5208+
/** @var \Illuminate\Cache\RedisStore $instance */
5209+
return $instance->lockConnection();
5210+
}
5211+
5212+
/**
5213+
* Specify the name of the connection that should be used to store data.
5214+
*
5215+
* @param string $connection
5216+
* @return void
5217+
* @static
5218+
*/
5219+
public static function setConnection($connection)
5220+
{
5221+
/** @var \Illuminate\Cache\RedisStore $instance */
5222+
$instance->setConnection($connection);
5223+
}
5224+
5225+
/**
5226+
* Specify the name of the connection that should be used to manage locks.
5227+
*
5228+
* @param string $connection
5229+
* @return \Illuminate\Cache\RedisStore
5230+
* @static
5231+
*/
5232+
public static function setLockConnection($connection)
5233+
{
5234+
/** @var \Illuminate\Cache\RedisStore $instance */
5235+
return $instance->setLockConnection($connection);
5236+
}
5237+
5238+
/**
5239+
* Get the Redis database instance.
5240+
*
5241+
* @return \Illuminate\Contracts\Redis\Factory
5242+
* @static
5243+
*/
5244+
public static function getRedis()
5245+
{
5246+
/** @var \Illuminate\Cache\RedisStore $instance */
5247+
return $instance->getRedis();
5248+
}
5249+
5250+
/**
5251+
* Get the cache key prefix.
5252+
*
5253+
* @return string
5254+
* @static
5255+
*/
5256+
public static function getPrefix()
5257+
{
5258+
/** @var \Illuminate\Cache\RedisStore $instance */
5259+
return $instance->getPrefix();
5260+
}
5261+
5262+
/**
5263+
* Set the cache key prefix.
5264+
*
5265+
* @param string $prefix
5266+
* @return void
5267+
* @static
5268+
*/
5269+
public static function setPrefix($prefix)
5270+
{
5271+
/** @var \Illuminate\Cache\RedisStore $instance */
5272+
$instance->setPrefix($prefix);
51865273
}
51875274

51885275
}

Diff for: app/Http/Controllers/Irrdb/IrrdbConfigController.php

-10
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,6 @@ protected function editPrepareForm( int $id = null ): array
155155
/**
156156
* Function to do the actual validation and storing of the submitted object.
157157
*
158-
* @param Request $r
159-
*
160-
* @return bool|RedirectResponse
161-
*
162-
* @throws
163158
*/
164159
public function doStore( Request $r ): bool|RedirectResponse
165160
{
@@ -171,12 +166,7 @@ public function doStore( Request $r ): bool|RedirectResponse
171166
/**
172167
* Function to do the actual validation and storing of the submitted object.
173168
*
174-
* @param Request $r
175-
* @param int $id
176-
*
177-
* @return bool|RedirectResponse
178169
*
179-
* @throws
180170
*/
181171
public function doUpdate( Request $r, int $id ): bool|RedirectResponse
182172
{

Diff for: app/Models/Aggregators/CustomerAggregator.php

+1
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@
183183
* @property string|null $created
184184
* @method static Builder|CustomerAggregator whereCreated($value)
185185
* @method static Builder|CustomerAggregator whereLastupdated($value)
186+
* @property-read \IXP\Models\IrrdbUpdateLog|null $irrdbUpdateLog
186187
* @mixin \Eloquent
187188
*/
188189
class CustomerAggregator extends Customer

Diff for: app/Models/Customer.php

+1
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@
188188
* @property string|null $created
189189
* @method static Builder|Customer whereCreated($value)
190190
* @method static Builder|Customer whereLastupdated($value)
191+
* @property-read \IXP\Models\IrrdbUpdateLog|null $irrdbUpdateLog
191192
* @mixin Eloquent
192193
*/
193194
class Customer extends Model

0 commit comments

Comments
 (0)