Fixed visibility for constants and methods

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-02-06 12:44:02 -08:00
parent 1ef3112628
commit c1ae406049
6 changed files with 9 additions and 9 deletions

View file

@ -17,7 +17,7 @@ class ModalController extends Controller
* @author [A. Gianotto] [<snipe@snipe.net]
* @return View
*/
function show ($type, $itemId = null) {
public function show ($type, $itemId = null) {
// These values should correspond to a file in resources/views/modals/
$allowed_types = [

View file

@ -11,7 +11,7 @@ class CheckForTwoFactor
/**
* Routes to ignore for Two Factor Auth
*/
const IGNORE_ROUTES = ['two-factor', 'two-factor-enroll', 'setup', 'logout'];
public const IGNORE_ROUTES = ['two-factor', 'two-factor-enroll', 'setup', 'logout'];
/**
* Handle an incoming request.

View file

@ -34,9 +34,9 @@ class Asset extends Depreciable
use CompanyableTrait;
use HasFactory, Loggable, Requestable, Presentable, SoftDeletes, ValidatingTrait, UniqueUndeletedTrait, UniqueSerialTrait;
const LOCATION = 'location';
const ASSET = 'asset';
const USER = 'user';
public const LOCATION = 'location';
public const ASSET = 'asset';
public const USER = 'user';
use Acceptable;

View file

@ -21,7 +21,7 @@ class CustomField extends Model
*
* @var array
*/
const PREDEFINED_FORMATS = [
public const PREDEFINED_FORMATS = [
'ANY' => '',
'CUSTOM REGEX' => '',
'ALPHA' => 'alpha',

View file

@ -31,7 +31,7 @@ class Setting extends Model
*
* @var string
*/
const SETUP_CHECK_KEY = 'snipeit_setup_check';
public const SETUP_CHECK_KEY = 'snipeit_setup_check';
/**
* Whether the model should inject it's identifier to the unique

View file

@ -657,7 +657,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
{
$query = $query->where('first_name', 'LIKE', '%'.$search.'%')
->orWhere('last_name', 'LIKE', '%'.$search.'%')
->orWhereRaw('CONCAT('.DB::getTablePrefix().'users.first_name," ",'.DB::getTablePrefix().'users.last_name) LIKE ?', ["%$search%"]);
->orWhereRaw('CONCAT('.DB::getTablePrefix().'users.first_name," ",'.DB::getTablePrefix().'users.last_name) LIKE ?', ["%{$search}%"]);
return $query;
}
@ -673,7 +673,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
public function advancedTextSearch(Builder $query, array $terms) {
foreach($terms as $term) {
$query = $query->orWhereRaw('CONCAT('.DB::getTablePrefix().'users.first_name," ",'.DB::getTablePrefix().'users.last_name) LIKE ?', ["%$term%"]);
$query = $query->orWhereRaw('CONCAT('.DB::getTablePrefix().'users.first_name," ",'.DB::getTablePrefix().'users.last_name) LIKE ?', ["%{$term}%"]);
}
return $query;