mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Fixed visibility for constants and methods
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
1ef3112628
commit
c1ae406049
|
@ -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 = [
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ class CustomField extends Model
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
const PREDEFINED_FORMATS = [
|
||||
public const PREDEFINED_FORMATS = [
|
||||
'ANY' => '',
|
||||
'CUSTOM REGEX' => '',
|
||||
'ALPHA' => 'alpha',
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue