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 7363d4e223
commit d52d32fed9
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] * @author [A. Gianotto] [<snipe@snipe.net]
* @return View * @return View
*/ */
function show ($type, $itemId = null) { public function show ($type, $itemId = null) {
// These values should correspond to a file in resources/views/modals/ // These values should correspond to a file in resources/views/modals/
$allowed_types = [ $allowed_types = [

View file

@ -11,7 +11,7 @@ class CheckForTwoFactor
/** /**
* Routes to ignore for Two Factor Auth * 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. * Handle an incoming request.

View file

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

View file

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

View file

@ -31,7 +31,7 @@ class Setting extends Model
* *
* @var string * @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 * 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.'%') $query = $query->where('first_name', 'LIKE', '%'.$search.'%')
->orWhere('last_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; return $query;
} }
@ -673,7 +673,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
public function advancedTextSearch(Builder $query, array $terms) { public function advancedTextSearch(Builder $query, array $terms) {
foreach($terms as $term) { 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; return $query;