@@ -21,7 +21,7 @@ class NewRelicWrapper
21
21
*/
22
22
public function addCustomParameter ($ param , $ value )
23
23
{
24
- if (extension_loaded ( ' newrelic ' )) {
24
+ if ($ this -> isExtensionInstalled ( )) {
25
25
newrelic_add_custom_parameter ($ param , $ value );
26
26
return true ;
27
27
}
@@ -36,7 +36,7 @@ public function addCustomParameter($param, $value)
36
36
*/
37
37
public function reportError ($ exception )
38
38
{
39
- if (extension_loaded ( ' newrelic ' )) {
39
+ if ($ this -> isExtensionInstalled ( )) {
40
40
newrelic_notice_error ($ exception ->getMessage (), $ exception );
41
41
}
42
42
}
@@ -55,28 +55,28 @@ public function setAppName(string $appName)
55
55
}
56
56
57
57
/**
58
- * Checks whether newrelic-php5 agent is installed
58
+ * Wrapper for 'newrelic_name_transaction'
59
59
*
60
- * @return bool
60
+ * @param string $transactionName
61
+ * @return void
61
62
*/
62
- public function isExtensionInstalled ()
63
+ public function setTransactionName ( string $ transactionName ): void
63
64
{
64
- if (extension_loaded ( ' newrelic ' )) {
65
- return true ;
65
+ if ($ this -> isExtensionInstalled ( )) {
66
+ newrelic_name_transaction ( $ transactionName ) ;
66
67
}
67
- return false ;
68
68
}
69
69
70
70
/**
71
- * Wrapper for 'newrelic_name_transaction'
71
+ * Checks whether newrelic-php5 agent is installed
72
72
*
73
- * @param string $transactionName
74
- * @return void
73
+ * @return bool
75
74
*/
76
- public function setTransactionName ( string $ transactionName ): void
75
+ public function isExtensionInstalled ()
77
76
{
78
- if ($ this -> isExtensionInstalled ( )) {
79
- newrelic_name_transaction ( $ transactionName ) ;
77
+ if (extension_loaded ( ' newrelic ' )) {
78
+ return true ;
80
79
}
80
+ return false ;
81
81
}
82
82
}
0 commit comments