mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 09:04:39 +00:00
src: style sweep
This commit is contained in:
parent
5a125dcb83
commit
55204f9d77
@ -3925,7 +3925,6 @@ function interfaces_neighbors_configure($device = null, $ifconfig_details = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function get_interfaces_info($include_unlinked = false)
|
||||
|
||||
@ -28,7 +28,6 @@
|
||||
|
||||
namespace OPNsense\Core;
|
||||
|
||||
|
||||
class FileObject
|
||||
{
|
||||
private $fhandle = null;
|
||||
@ -42,7 +41,7 @@ class FileObject
|
||||
*/
|
||||
public function __construct($filename, $mode, $permissions = null, $operation = null)
|
||||
{
|
||||
$this->fhandle = fopen($filename, $mode . 'e'); /* always add close-on-exec flag to prevent fork inherit */
|
||||
$this->fhandle = fopen($filename, $mode . 'e'); /* always add close-on-exec flag to prevent fork inherit */
|
||||
|
||||
if ($permissions != null) {
|
||||
@chmod($filename, $permissions);
|
||||
@ -144,4 +143,4 @@ class FileObject
|
||||
{
|
||||
return $this->write(json_encode($data));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,7 +35,6 @@ use ReflectionException;
|
||||
use OPNsense\Base\FieldTypes\ArrayField;
|
||||
use OPNsense\Base\FieldTypes\TextField;
|
||||
|
||||
|
||||
class NeighborField extends ArrayField
|
||||
{
|
||||
protected static $internalStaticChildren = [];
|
||||
@ -71,7 +70,10 @@ class NeighborField extends ArrayField
|
||||
}
|
||||
} catch (\Error | \Exception | ReflectionException $e) {
|
||||
syslog(LOG_ERR, sprintf(
|
||||
"Invalid neightbor object %s in %s (%s)", $classname, realpath($filename), $e->getMessage()
|
||||
"Invalid neightbor object %s in %s (%s)",
|
||||
$classname,
|
||||
realpath($filename),
|
||||
$e->getMessage()
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,7 +32,6 @@ namespace OPNsense\Interfaces\Neighbor;
|
||||
|
||||
use OPNsense\Core\Config;
|
||||
|
||||
|
||||
class dhcpd
|
||||
{
|
||||
public function collect()
|
||||
@ -44,7 +43,7 @@ class dhcpd
|
||||
foreach ($config->dhcpd->children() as $intf => $node) {
|
||||
foreach ($node->children() as $key => $data) {
|
||||
if ($key == 'staticmap') {
|
||||
if (!empty($data->arp_table_static_entry) || !empty($node->staticarp) ) {
|
||||
if (!empty($data->arp_table_static_entry) || !empty($node->staticarp)) {
|
||||
$result[] = [
|
||||
'etheraddr' => (string)$data->mac,
|
||||
'ipaddress' => (string)$data->ipaddr,
|
||||
@ -58,4 +57,4 @@ class dhcpd
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user