Refreshed Psalm annotations.
This commit is contained in:
1 parent
03d1720e84
commit
add15ab277
8 files changed
+10
-7
No files matched your search
@@ -11,8 +11,6 @@ class Mustache_Cache_FrozenCache extends \Mustache_Cache_FilesystemCache {
|
|||||||
/**
|
/**
|
||||||
* Cache and load a compiled Mustache_Template class.
|
* Cache and load a compiled Mustache_Template class.
|
||||||
*
|
*
|
||||||
* @psalm-suppress InvalidScalarArgument
|
|
||||||
*
|
|
||||||
* @param string $key Key.
|
* @param string $key Key.
|
||||||
* @param string $value Value.
|
* @param string $value Value.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ class Core_Load_Collector implements Record_Collector_Interface {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Record_Interface[]
|
* @return Record_Interface[]
|
||||||
|
*
|
||||||
|
* @psalm-suppress PossiblyUndefinedArrayOffset
|
||||||
*/
|
*/
|
||||||
public function get_records(): array {
|
public function get_records(): array {
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,6 @@ class Hook_Collector extends Stopwatch_Collector {
|
|||||||
* @param int $start_priority Start hook priority (defaults to -1).
|
* @param int $start_priority Start hook priority (defaults to -1).
|
||||||
* @param int $stop_priority Stop hook priority (defaults to max int).
|
* @param int $stop_priority Stop hook priority (defaults to max int).
|
||||||
*
|
*
|
||||||
* @psalm-suppress MissingClosureReturnType
|
|
||||||
* @psalm-suppress MissingClosureParamType
|
* @psalm-suppress MissingClosureParamType
|
||||||
*/
|
*/
|
||||||
private function add_event(
|
private function add_event(
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class Http_Collector extends Stopwatch_Collector {
|
|||||||
*
|
*
|
||||||
* @return false|array|\WP_Error
|
* @return false|array|\WP_Error
|
||||||
*
|
*
|
||||||
* @psalm-suppress RedundantConditionGivenDocblockType
|
* @psalm-suppress RedundantCondition
|
||||||
* @noinspection PhpUnusedParameterInspection
|
* @noinspection PhpUnusedParameterInspection
|
||||||
*/
|
*/
|
||||||
public function pre_http_request( $false, $args, $url ) {
|
public function pre_http_request( $false, $args, $url ) {
|
||||||
@@ -68,7 +68,7 @@ class Http_Collector extends Stopwatch_Collector {
|
|||||||
*
|
*
|
||||||
* @return array|\WP_Error
|
* @return array|\WP_Error
|
||||||
*
|
*
|
||||||
* @psalm-suppress RedundantConditionGivenDocblockType
|
* @psalm-suppress RedundantCondition
|
||||||
* @noinspection PhpUnusedParameterInspection
|
* @noinspection PhpUnusedParameterInspection
|
||||||
*/
|
*/
|
||||||
public function http_api_debug( $response, $type, $class, $args, $url ) {
|
public function http_api_debug( $response, $type, $class, $args, $url ) {
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ class Sql_Collector implements Record_Collector_Interface {
|
|||||||
|
|
||||||
/** @var array $wpdb->queries */
|
/** @var array $wpdb->queries */
|
||||||
/** @psalm-var array<int, QueryData> $wpdb->queries */
|
/** @psalm-var array<int, QueryData> $wpdb->queries */
|
||||||
|
/** @psalm-suppress PossiblyInvalidArgument */
|
||||||
$records = array_filter( array_map( [ $this, 'transform' ], array_keys( $wpdb->queries ), $wpdb->queries ) );
|
$records = array_filter( array_map( [ $this, 'transform' ], array_keys( $wpdb->queries ), $wpdb->queries ) );
|
||||||
|
|
||||||
return $records;
|
return $records;
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ class Stopwatch_Collector implements Record_Collector_Interface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @psalm-suppress PossiblyInvalidArgument */
|
||||||
return array_map( [ $this, 'transform' ], array_keys( $events ), $events );
|
return array_map( [ $this, 'transform' ], array_keys( $events ), $events );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ use Rarst\Laps\Record\Record_Interface;
|
|||||||
*
|
*
|
||||||
* @template-extends \ArrayIterator<array-key,Record_Interface>
|
* @template-extends \ArrayIterator<array-key,Record_Interface>
|
||||||
* @template-implements \RecursiveIterator<array-key,Record_Interface>
|
* @template-implements \RecursiveIterator<array-key,Record_Interface>
|
||||||
|
*
|
||||||
|
* @psalm-suppress TooManyTemplateParams
|
||||||
*/
|
*/
|
||||||
class Recursive_Record_Iterator extends \ArrayIterator implements \RecursiveIterator {
|
class Recursive_Record_Iterator extends \ArrayIterator implements \RecursiveIterator {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ use Rarst\Laps\Record\Record_Interface;
|
|||||||
*
|
*
|
||||||
* @template-implements \Iterator<array>
|
* @template-implements \Iterator<array>
|
||||||
*
|
*
|
||||||
* @psalm-suppress PropertyNotSetInConstructor
|
* @psalm-suppress PropertyNotSetInConstructor, TooManyTemplateParams
|
||||||
*/
|
*/
|
||||||
class Timeline_Iterator implements \Iterator {
|
class Timeline_Iterator implements \Iterator {
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ class Timeline_Iterator implements \Iterator {
|
|||||||
/**
|
/**
|
||||||
* @param Recursive_Record_Iterator $iterator Record iterator.
|
* @param Recursive_Record_Iterator $iterator Record iterator.
|
||||||
*
|
*
|
||||||
* @psalm-suppress PossiblyFalsePropertyAssignmentValue
|
* @psalm-suppress PossiblyFalsePropertyAssignmentValue, PossiblyUndefinedArrayOffset
|
||||||
*/
|
*/
|
||||||
public function __construct( Recursive_Record_Iterator $iterator ) {
|
public function __construct( Recursive_Record_Iterator $iterator ) {
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user