Skip to content

Commit

Permalink
These are all QM_Component instances now.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Sep 24, 2022
1 parent 987847e commit c7efd29
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion collectors/caps.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public function process() {
* @phpstan-param array{
* args: array<int, mixed>,
* filtered_trace: array<int, array<string, mixed>>,
* component: stdClass,
* component: QM_Component,
* result: bool,
* parts: array<int, string>,
* name: string,
Expand Down
10 changes: 7 additions & 3 deletions collectors/php_errors.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,10 @@ protected function output_fatal( $error, array $e ) {
foreach ( $e['trace'] as $frame ) {
$callback = QM_Util::populate_callback( $frame );

if ( ! isset( $callback['name'] ) ) {
continue;
}

printf(
'<li>%s</li>',
QM_Output_Html::output_filename( $callback['name'], $frame['file'], $frame['line'] )
Expand Down Expand Up @@ -529,9 +533,9 @@ public function filter_reportable_errors( array $components, $component_type ) {
* Checks if the component is of the given type and has the given context. This is
* used to scope an error to a plugin or theme.
*
* @param object $component The component.
* @param string $component_type The component type for comparison.
* @param string $component_context The component context for comparison.
* @param QM_Component $component The component.
* @param string $component_type The component type for comparison.
* @param string $component_context The component context for comparison.
* @return bool
*/
public function is_affected_component( $component, $component_type, $component_context ) {
Expand Down
2 changes: 1 addition & 1 deletion data/caps.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class QM_Data_Caps extends QM_Data {
* @phpstan-var array<int, array{
* args: array<int, mixed>,
* filtered_trace: array<int, array<string, mixed>>,
* component: stdClass,
* component: QM_Component,
* result: bool,
* parts: array<int, string>,
* name: string,
Expand Down
2 changes: 1 addition & 1 deletion data/http.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class QM_Data_HTTP extends QM_Data {
* @var array<string, array<string, mixed>>
* @phpstan-var array<string, array{
* args: array<string, mixed>,
* component: stdClass,
* component: QM_Component,
* end: float,
* filtered_trace: array<int, array<string, mixed>>,
* info: array<string, mixed>|null,
Expand Down
2 changes: 1 addition & 1 deletion data/logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class QM_Data_Logger extends QM_Data {
* @phpstan-var array<int, array{
* message: string,
* filtered_trace: mixed[],
* component: stdClass,
* component: QM_Component,
* level: QM_Collector_Logger::*,
* }>
*/
Expand Down
2 changes: 1 addition & 1 deletion data/php_errors.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* filename: string,
* line: int|null,
* filtered_trace: array<int, array<string, mixed>>|null,
* component: stdClass,
* component: QM_Component,
* calls: int,
* }>>
*/
Expand Down
2 changes: 1 addition & 1 deletion data/transients.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class QM_Data_Transients extends QM_Data {
* @var array<int, array{
* name: string,
* filtered_trace: mixed[],
* component: stdClass,
* component: QM_Component,
* type: string,
* value: mixed,
* expiration: int,
Expand Down

0 comments on commit c7efd29

Please sign in to comment.