lib/Railcams/Authorisation.php
The parameter $Camera is not named in camelCase. Open
Open
public static function getAuthIPs(Camera $Camera) {
if (!isset($Camera->meta['auth_ips'])) {
return "";
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $Camera is not named in camelCase. Open
Open
public static function validateAuthToken(Camera $Camera, $token = null) {
$token = trim(preg_replace("/(Basic|Token)/i", "", $token));
if ($token == self::getAuthToken($Camera)) {
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $Camera is not named in camelCase. Open
Open
public static function getAuthToken(Camera $Camera) {
if (!isset($Camera->meta['auth_token'])) {
$Camera->meta['auth_token'] = bin2hex(openssl_random_pseudo_bytes(16));
$Camera->commit();
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Function closing brace must go on the next line following the body; found 1 blank lines before brace Open
Open
}
- Exclude checks
Function closing brace must go on the next line following the body; found 1 blank lines before brace Open
Open
}
- Exclude checks
Function closing brace must go on the next line following the body; found 1 blank lines before brace Open
Open
}
- Exclude checks