mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Apply fixes from StyleCI (#12117)
* Apply fixes from StyleCI * Disable style check
This commit is contained in:
@@ -103,6 +103,7 @@ class RrdDefinition
|
||||
public function disableNameChecking()
|
||||
{
|
||||
$this->skipNameCheck = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -115,10 +116,11 @@ class RrdDefinition
|
||||
*/
|
||||
private function checkType($type)
|
||||
{
|
||||
if (!in_array($type, self::$types)) {
|
||||
if (! in_array($type, self::$types)) {
|
||||
$msg = "$type is not valid, must be: " . implode(' | ', self::$types);
|
||||
throw new InvalidRrdTypeException($msg);
|
||||
}
|
||||
|
||||
return $type;
|
||||
}
|
||||
|
||||
@@ -131,6 +133,7 @@ class RrdDefinition
|
||||
private function escapeName($name)
|
||||
{
|
||||
$name = preg_replace('/[^a-zA-Z0-9_\-]/', '', $name);
|
||||
|
||||
return substr($name, 0, 19);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user