Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
EsdrasCaleb committed Jul 12, 2024
1 parent 76cf68a commit 928c28f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions classes/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,22 @@ class helper {
* @param \core\event\base $event The event.
* @return void
*/
public static function init(\core\event\base $event=null) {
public static function init(?\core\event\base $event) {
$config = get_config('tool_sentry');
if ($config->activate) {
unset($config->activate);
unset($config->dns);
unset($config->version);
if ($config->ignore_exceptions=="") {
if ($config->ignore_exceptions == "") {
unset($config->ignore_exceptions);
}
if ($config->ignore_transactions=="") {
if ($config->ignore_transactions == "") {
unset($config->ignore_transactions);
}
if ($config->in_app_exclude=="") {
if ($config->in_app_exclude == "") {
unset($config->in_app_exclude);
}
if ($config->in_app_include=="") {
if ($config->in_app_include == "") {
unset($config->in_app_include);
}
$config->enable_tracing = boolval($config->enable_tracing);
Expand All @@ -67,11 +67,11 @@ public static function init(\core\event\base $event=null) {
$config = (array) $config;

foreach ($config as $name => $value) {
if(is_numeric($value)){
if(strpos($value,'.')) {
if (is_numeric($value)) {
if (strpos($value, '.')) {
$config[$name] = floatval($value);
}
else{
else {
$config[$name] = intval($value);
}
}
Expand All @@ -87,7 +87,7 @@ public static function init(\core\event\base $event=null) {
* @param \core\event\base $event The event.
* @return void
*/
public static function geterros(\core\event\base $event=null) {
public static function geterros(?\core\event\base $event) {
$config = get_config('tool_sentry');
if ($config->activate) {
\Sentry\captureLastError();
Expand Down

0 comments on commit 928c28f

Please sign in to comment.