aboutsummaryrefslogtreecommitdiffstats
path: root/includes/libs/DebugInfo
diff options
context:
space:
mode:
authorthiemowmde <thiemo.kreuz@wikimedia.de>2023-11-16 13:54:38 +0100
committerthiemowmde <thiemo.kreuz@wikimedia.de>2023-11-16 13:54:38 +0100
commit7115e680e736ac985dd2b159148a8864a4586292 (patch)
tree1ae2123ec6149ed9b8768da7ee2f356b2bcdc5da /includes/libs/DebugInfo
parent53a4712e7cb399b16e3aba023b8082bd22b3822c (diff)
downloadmediawikicore-7115e680e736ac985dd2b159148a8864a4586292.tar.gz
mediawikicore-7115e680e736ac985dd2b159148a8864a4586292.zip
Avoid string comparisons with gettype() in 2 more places
The same thing is done in many places in our codebases. Just these two use string comparisons. Change-Id: Ia543cc5c1ef141cdcd0173855f6e8363dd5e98f3
Diffstat (limited to 'includes/libs/DebugInfo')
-rw-r--r--includes/libs/DebugInfo/Placeholder.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/includes/libs/DebugInfo/Placeholder.php b/includes/libs/DebugInfo/Placeholder.php
index 6696431bfb10..ad388f474997 100644
--- a/includes/libs/DebugInfo/Placeholder.php
+++ b/includes/libs/DebugInfo/Placeholder.php
@@ -15,11 +15,10 @@ class Placeholder {
* @param mixed $value
*/
public function __construct( $value ) {
- $type = gettype( $value );
- if ( $type === 'object' ) {
+ if ( is_object( $value ) ) {
$this->desc = get_class( $value ) . '#' . spl_object_id( $value );
} else {
- $this->desc = $type;
+ $this->desc = gettype( $value );
}
}
}