src: fix phpdocs (#6599)

This commit is contained in:
William Desportes 2023-06-04 10:21:24 +02:00 committed by GitHub
parent 6b40db6c2a
commit d82396db4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 28 additions and 22 deletions

View File

@ -120,7 +120,7 @@ class AccessController extends ApiControllerBase
/**
* logon client to zone, must use post type of request
* @param int|string zone id number
* @param int|string $zoneid zone id number
* @return array
* @throws \OPNsense\Base\ModelException
*/
@ -229,7 +229,7 @@ class AccessController extends ApiControllerBase
/**
* logoff client
* @param int|string zone id number
* @param int|string $zoneid zone id number
* @return array
* @throws \OPNsense\Base\ModelException
*/
@ -266,7 +266,7 @@ class AccessController extends ApiControllerBase
/**
* retrieve session info
* @param int|string zone id number
* @param int|string $zoneid zone id number
* @return array
* @throws \OPNsense\Base\ModelException
*/

View File

@ -50,6 +50,7 @@ class NetworkinsightController extends ApiControllerBase
* @param string $to_date to timestamp
* @param string $resolution resolution in seconds
* @param string $field field name to aggregate
* @param null $emulation
* @return array timeseries
*/
public function timeserieAction(

View File

@ -116,6 +116,7 @@ class KeyPairsController extends ApiMutableModelControllerBase
/**
* Generate keypair
* @param string $type (rsa, ecdsa)
* @param string $size The key size in bytes
* @return array
*/
public function genKeyPairAction($type, $size = null)

View File

@ -306,7 +306,6 @@ class ExportController extends ApiControllerBase
* download configuration
* @param string $vpnid server handle
* @param string $certref certificate to export if applicable
* @param null $config
* @return array
* @throws \OPNsense\Base\ModelException
* @throws UserException when invalid user input

View File

@ -239,7 +239,6 @@ class ServiceController extends ApiControllerBase
}
/**
* @param int $id server/client id to restart
* @return array
*/
public function reconfigureAction()

View File

@ -61,7 +61,7 @@ class Shell
/**
* execute command or list of commands
*
* @param string/array $command command to execute
* @param string|array $command command to execute
* @param bool $mute
* @param array &$output
*/

View File

@ -211,6 +211,7 @@ class Plugin
* @param string $type anchor type (fw for filter, other options are nat,rdr,binat)
* @param string $priority sort order from low to high
* @param string $placement placement head,tail
* @param bool $quick
* @return null
*/
public function registerAnchor($name, $type = "fw", $priority = 0, $placement = "tail", $quick = false)

View File

@ -51,7 +51,7 @@ abstract class Rule
/**
* send text to debug log
* @param string debug log info
* @param string $line debug log info
*/
protected function log($line)
{
@ -142,6 +142,8 @@ abstract class Rule
* parse data, use replace map
* @param string $value field value
* @param string $map
* @param string $prefix
* @param string $suffix
* @return string
*/
protected function parseReplaceSimple($value, $map, $prefix = "", $suffix = "")
@ -163,8 +165,8 @@ abstract class Rule
/**
* rule reader, applies standard rule patterns
* @param string type of rule to be read
* @return iterator rules to generate
* @param string $type type of rule to be read
* @return \Iterator rules to generate
*/
protected function reader($type = null)
{
@ -201,8 +203,8 @@ abstract class Rule
/**
* parse rule to text using processing parameters in $procorder
* @param array conversion properties (rule keys and methods to execute)
* @param array rule to parse
* @param array $procorder conversion properties (rule keys and methods to execute)
* @param array $rule rule to parse
* @return string
*/
protected function ruleToText(&$procorder, &$rule)
@ -316,6 +318,7 @@ abstract class Rule
* parse interface (name to interface)
* @param string|array $value field value
* @param string $prefix prefix interface tag
* @param string $suffix suffix interface tag
* @return string
*/
protected function parseInterface($value, $prefix = "on ", $suffix = "")

View File

@ -54,7 +54,7 @@ class Util
/**
* is provided address an ip address.
* @param string $network address
* @param string $address network address
* @return boolean
*/
public static function isIpAddress($address)
@ -64,7 +64,7 @@ class Util
/**
* is provided address a mac address.
* @param string $network address
* @param string $address network address
* @return boolean
*/
public static function isMACAddress($address)
@ -321,7 +321,7 @@ class Util
/**
* calculate rule hash value
* @param array rule
* @param array $rule
* @return string
*/
public static function calcRuleHash($rule)
@ -351,7 +351,8 @@ class Util
/**
* Find the smallest possible subnet mask for given IP range
* @param array ips (start, end)
* @param array $ips (start, end)
* @param string $family inet6 or inet
* @return int smallest mask
*/
public static function smallestCIDR($ips, $family = 'inet')

View File

@ -100,7 +100,7 @@ class Gateways
/**
* return the device name present in the system for the specific configuration
* @param string $ifname name of the interface
* @param array $ifcfg configuration of interface
* @param array $definedIntf configuration of interface
* @param string $ipproto inet/inet6 type
* @return string $realif target device name
*/
@ -398,6 +398,7 @@ class Gateways
* determine default gateway, exclude gateways in skip list
* @param bool $disabled return disabled gateways
* @param bool $localhost inet/inet6 type
* @param bool $inactive is inactive
* @return string type name
*/
public function gatewaysIndexedByName($disabled = false, $localhost = false, $inactive = false)
@ -483,6 +484,7 @@ class Gateways
* @param string $interface interface name
* @param string $ipproto inet/inet6
* @param boolean $only_configured only return configured in interface or dynamic gateways
* @param string $property the gateway property
* @return string|null gateway address
*/
public function getInterfaceGateway($interface, $ipproto = "inet", $only_configured = false, $property = 'gateway')

View File

@ -56,7 +56,7 @@ class Validation
/**
* Adds a validator to a field
*
* @param string|array $field
* @param string|array $key
* @param BaseValidator|ValidatorInterface $validator
*
* @return Validation
@ -77,7 +77,7 @@ class Validation
/**
* Validate a set of data according to a set of rules
*
* @param array data
* @param array $data
*/
public function validate($data)
{

View File

@ -345,7 +345,7 @@ class Monit extends BaseModel
/**
* determine if services have links to this test node
* @param uuid of the test node
* @param string $testUUID uuid of the test node
* @return bool
*/
public function isTestServiceRelated($testUUID = null)
@ -361,7 +361,7 @@ class Monit extends BaseModel
/**
* get test type from condition string
* @param condition string
* @param string $condition condition string
* @return string
*/
public function getTestType($condition)

View File

@ -229,6 +229,7 @@ class OpenVPN extends BaseModel
* Find unique instance properties, either from legacy or mvc model
* Offers glue between both worlds.
* @param string $server_id vpnid (either numerical or uuid)
* @param string $role the node role
* @return array selection of relevant fields for downstream processes
*/
public function getInstanceById($server_id, $role = null)

View File

@ -106,7 +106,6 @@ class TrafficShaper extends BaseModel
/**
* Generate a new pipe number
* The first 10000 id's are automatically reserved for internal usage.
* @param null $pipenr new pipe number
* @return ArrayField
*/
public function newPipeNumber()
@ -122,7 +121,6 @@ class TrafficShaper extends BaseModel
/**
* Generate a new queue number
* The first 10000 id's are automatically reserved for internal usage.
* @param null $queuenr new queue number
* @return ArrayField
*/
public function newQueueNumber()