mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 04:54:34 -04:00
Static Analysis cleanup
This commit is contained in:
parent
d1d9f7fc27
commit
db86cb6b40
@ -56,7 +56,7 @@ class MultiDB
|
|||||||
public static function checkDomainAvailable($subdomain) : bool
|
public static function checkDomainAvailable($subdomain) : bool
|
||||||
{
|
{
|
||||||
if (! config('ninja.db.multi_db_enabled')) {
|
if (! config('ninja.db.multi_db_enabled')) {
|
||||||
return Company::whereSubdomain($subdomain)->get()->count() == 0;
|
return Company::whereSubdomain($subdomain)->count() == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$current_db = config('database.default');
|
$current_db = config('database.default');
|
||||||
@ -105,7 +105,7 @@ class MultiDB
|
|||||||
* a new user request.
|
* a new user request.
|
||||||
*
|
*
|
||||||
* @param string $email The user email
|
* @param string $email The user email
|
||||||
* @param stirng $company_key The company key
|
* @param string $company_key The company key
|
||||||
* @return bool True|False
|
* @return bool True|False
|
||||||
*/
|
*/
|
||||||
public static function checkUserAndCompanyCoExist($email, $company_key) :bool
|
public static function checkUserAndCompanyCoExist($email, $company_key) :bool
|
||||||
@ -156,8 +156,8 @@ class MultiDB
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $data
|
* @param string $email
|
||||||
* @return User|null
|
* @return ClientContact|null
|
||||||
*/
|
*/
|
||||||
public static function hasContact(string $email) : ?ClientContact
|
public static function hasContact(string $email) : ?ClientContact
|
||||||
{
|
{
|
||||||
@ -183,8 +183,8 @@ class MultiDB
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $data
|
* @param array $search
|
||||||
* @return User|null
|
* @return ClientContact|null
|
||||||
*/
|
*/
|
||||||
public static function findContact(array $search) : ?ClientContact
|
public static function findContact(array $search) : ?ClientContact
|
||||||
{
|
{
|
||||||
@ -456,8 +456,8 @@ class MultiDB
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $data
|
* @param string $phone
|
||||||
* @return User|null
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function hasPhoneNumber(string $phone) : bool
|
public static function hasPhoneNumber(string $phone) : bool
|
||||||
{
|
{
|
||||||
@ -482,7 +482,7 @@ class MultiDB
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static function randomSubdomainGenerator()
|
public static function randomSubdomainGenerator(): string
|
||||||
{
|
{
|
||||||
$current_db = config('database.default');
|
$current_db = config('database.default');
|
||||||
|
|
||||||
@ -509,6 +509,7 @@ class MultiDB
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $database
|
* @param $database
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function setDB(string $database) : void
|
public static function setDB(string $database) : void
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user