Skip to content

Commit

Permalink
Bump phpstan/phpstan from 1.10.50 to 1.10.67 (#3009)
Browse files Browse the repository at this point in the history
  • Loading branch information
PromoFaux authored Apr 21, 2024
2 parents 5f7be30 + ec32e48 commit dd012ad
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 43 deletions.
14 changes: 5 additions & 9 deletions composer.lock

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

16 changes: 8 additions & 8 deletions scripts/pi-hole/php/func.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ function getCustomDNSEntries()
continue;
}

$data = new \stdClass();
$data = new stdClass();
$data->ip = $explodedLine[0];
$data->domain = $explodedLine[1];
$data->domains = array_slice($explodedLine, 0, -1);
Expand Down Expand Up @@ -286,7 +286,7 @@ function addCustomDNSEntry($ip = '', $domain = '', $reload = '', $json = true, $
}

return returnSuccess('', $json);
} catch (\Exception $ex) {
} catch (Exception $ex) {
return returnError($ex->getMessage(), $json);
}
}
Expand Down Expand Up @@ -325,7 +325,7 @@ function deleteCustomDNSEntry()
pihole_execute('-a removecustomdns '.$ip.' '.$domain);

return returnSuccess();
} catch (\Exception $ex) {
} catch (Exception $ex) {
return returnError($ex->getMessage());
}
}
Expand All @@ -342,7 +342,7 @@ function deleteAllCustomDNSEntries($reload = '')
foreach ($existingEntries as $entry) {
pihole_execute('-a removecustomdns '.$entry->ip.' '.$entry->domain.' '.$reload);
}
} catch (\Exception $ex) {
} catch (Exception $ex) {
return returnError($ex->getMessage());
}

Expand Down Expand Up @@ -386,7 +386,7 @@ function getCustomCNAMEEntries()
continue;
}

$data = new \stdClass();
$data = new stdClass();
$data->domains = array_slice($explodedLine, 0, -1);
$data->domain = implode(',', $data->domains);
$data->target = $explodedLine[count($explodedLine) - 1];
Expand Down Expand Up @@ -468,7 +468,7 @@ function addCustomCNAMEEntry($domain = '', $target = '', $reload = '', $json = t
}

return returnSuccess('', $json);
} catch (\Exception $ex) {
} catch (Exception $ex) {
return returnError($ex->getMessage(), $json);
}
}
Expand Down Expand Up @@ -507,7 +507,7 @@ function deleteCustomCNAMEEntry()
pihole_execute('-a removecustomcname '.$domain.' '.$target);

return returnSuccess();
} catch (\Exception $ex) {
} catch (Exception $ex) {
return returnError($ex->getMessage());
}
}
Expand All @@ -524,7 +524,7 @@ function deleteAllCustomCNAMEEntries($reload = '')
foreach ($existingEntries as $entry) {
pihole_execute('-a removecustomcname '.$entry->domain.' '.$entry->target.' '.$reload);
}
} catch (\Exception $ex) {
} catch (Exception $ex) {
return returnError($ex->getMessage());
}

Expand Down
38 changes: 19 additions & 19 deletions scripts/pi-hole/php/groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function verify_ID_array($arr)

header('Content-type: application/json');
echo json_encode(array('data' => $data));
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} elseif ($_POST['action'] == 'add_group') {
Expand Down Expand Up @@ -93,7 +93,7 @@ function verify_ID_array($arr)

$reload = true;
JSON_success();
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} elseif ($_POST['action'] == 'edit_group') {
Expand Down Expand Up @@ -134,7 +134,7 @@ function verify_ID_array($arr)

$reload = true;
JSON_success();
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} elseif ($_POST['action'] == 'delete_group') {
Expand Down Expand Up @@ -167,7 +167,7 @@ function verify_ID_array($arr)
}
$reload = true;
JSON_success();
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} elseif ($_POST['action'] == 'get_clients') {
Expand Down Expand Up @@ -247,7 +247,7 @@ function verify_ID_array($arr)

header('Content-type: application/json');
echo json_encode(array('data' => $data));
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} elseif ($_POST['action'] == 'get_unconfigured_clients') {
Expand Down Expand Up @@ -329,7 +329,7 @@ function verify_ID_array($arr)

header('Content-type: application/json');
echo json_encode($ips);
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} elseif ($_POST['action'] == 'add_client') {
Expand Down Expand Up @@ -372,7 +372,7 @@ function verify_ID_array($arr)

$reload = true;
JSON_success();
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} elseif ($_POST['action'] == 'edit_client') {
Expand Down Expand Up @@ -443,7 +443,7 @@ function verify_ID_array($arr)

$reload = true;
JSON_success();
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} elseif ($_POST['action'] == 'delete_client') {
Expand Down Expand Up @@ -481,7 +481,7 @@ function verify_ID_array($arr)

$reload = true;
JSON_success();
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} elseif ($_POST['action'] == 'get_domains') {
Expand Down Expand Up @@ -525,7 +525,7 @@ function verify_ID_array($arr)

header('Content-type: application/json');
echo json_encode(array('data' => $data));
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} elseif ($_POST['action'] == 'add_domain' || $_POST['action'] == 'replace_domain') {
Expand Down Expand Up @@ -693,7 +693,7 @@ function verify_ID_array($arr)
}
$reload = true;
JSON_success($msg);
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} elseif ($_POST['action'] == 'edit_domain') {
Expand Down Expand Up @@ -778,7 +778,7 @@ function verify_ID_array($arr)

$reload = true;
JSON_success();
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} elseif ($_POST['action'] == 'delete_domain') {
Expand Down Expand Up @@ -817,7 +817,7 @@ function verify_ID_array($arr)

$reload = true;
JSON_success();
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} elseif ($_POST['action'] == 'delete_domain_string') {
Expand Down Expand Up @@ -869,7 +869,7 @@ function verify_ID_array($arr)

$reload = true;
JSON_success();
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} elseif ($_POST['action'] == 'get_adlists') {
Expand Down Expand Up @@ -897,7 +897,7 @@ function verify_ID_array($arr)

header('Content-type: application/json');
echo json_encode(array('data' => $data));
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} elseif ($_POST['action'] == 'add_adlist') {
Expand Down Expand Up @@ -978,7 +978,7 @@ function verify_ID_array($arr)
$msg = $added_list.'<br><b>Total: '.$total.' adlist(s) processed.</b>';
JSON_success($msg);
}
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} elseif ($_POST['action'] == 'edit_adlist') {
Expand Down Expand Up @@ -1059,7 +1059,7 @@ function verify_ID_array($arr)

$reload = true;
JSON_success();
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} elseif ($_POST['action'] == 'delete_adlist') {
Expand Down Expand Up @@ -1100,7 +1100,7 @@ function verify_ID_array($arr)

$reload = true;
JSON_success();
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} elseif ($_POST['action'] == 'add_audit') {
Expand Down Expand Up @@ -1157,7 +1157,7 @@ function verify_ID_array($arr)
// Reloading isn't necessary for audit domains (no effect on blocking)
$reload = false;
JSON_success($msg);
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/php/message.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

$reload = true;
JSON_success();
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/php/network.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

$reload = true;
JSON_success();
} catch (\Exception $ex) {
} catch (Exception $ex) {
JSON_error($ex->getMessage());
}
} else {
Expand Down
10 changes: 5 additions & 5 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -457,11 +457,11 @@
$DHCPIPv6 = false;
$DHCP_rapid_commit = false;
}
if (isset($setupVars['PIHOLE_DOMAIN'])) {
$piHoleDomain = $setupVars['PIHOLE_DOMAIN'];
} else {
$piHoleDomain = 'lan';
}
if (isset($setupVars['PIHOLE_DOMAIN'])) {
$piHoleDomain = $setupVars['PIHOLE_DOMAIN'];
} else {
$piHoleDomain = 'lan';
}
?>
<form role="form" method="post">
<div class="row">
Expand Down

0 comments on commit dd012ad

Please sign in to comment.