mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Fixes for psalm
This commit is contained in:
parent
5cdb48e7f6
commit
6e4132f08a
@ -70,7 +70,7 @@ class SystemHealth
|
||||
],
|
||||
'env_writable' => self::checkEnvWritable(),
|
||||
//'mail' => self::testMailServer(),
|
||||
'simple_db_check' => (bool) self::simpleDbCheck(),
|
||||
'simple_db_check' => self::simpleDbCheck(),
|
||||
'cache_enabled' => self::checkConfigCache(),
|
||||
'phantom_enabled' => (bool) config('ninja.phantomjs_pdf_generation'),
|
||||
'exec' => (bool) self::checkExecWorks(),
|
||||
@ -226,10 +226,10 @@ class SystemHealth
|
||||
if (! config('ninja.db.multi_db_enabled')) {
|
||||
try {
|
||||
$pdo = DB::connection()->getPdo();
|
||||
$result[] = [DB::connection()->getDatabaseName() => true];
|
||||
$x = DB::connection()->getDatabaseName();
|
||||
$result['success'] = true;
|
||||
} catch (Exception $e) {
|
||||
$result[] = [config('database.connections.'.config('database.default').'.database') => false];
|
||||
// $x = [config('database.connections.'.config('database.default').'.database') => false];
|
||||
$result['success'] = false;
|
||||
$result['message'] = $e->getMessage();
|
||||
}
|
||||
@ -239,10 +239,10 @@ class SystemHealth
|
||||
|
||||
try {
|
||||
$pdo = DB::connection()->getPdo();
|
||||
$result[] = [DB::connection()->getDatabaseName() => true];
|
||||
$x = DB::connection()->getDatabaseName();
|
||||
$result['success'] = true;
|
||||
} catch (Exception $e) {
|
||||
$result[] = [config('database.connections.'.config('database.default').'.database') => false];
|
||||
// $x = [config('database.connections.'.config('database.default').'.database') => false];
|
||||
$result['success'] = false;
|
||||
$result['message'] = $e->getMessage();
|
||||
}
|
||||
|
@ -38,7 +38,6 @@ trait BulkOptions
|
||||
* Available bulk options - used in requests (eg. BulkClientRequests).
|
||||
*
|
||||
* @return array
|
||||
* @var array
|
||||
*/
|
||||
public function getBulkOptions()
|
||||
{
|
||||
@ -51,7 +50,6 @@ trait BulkOptions
|
||||
* Shared rules for bulk requests.
|
||||
*
|
||||
* @return array
|
||||
* @var array
|
||||
*/
|
||||
public function getGlobalRules()
|
||||
{
|
||||
|
@ -51,7 +51,7 @@ trait GeneratesConvertedQuoteCounter
|
||||
return $this->getNextEntityNumber($invoice, $client, intval($counter));
|
||||
}
|
||||
|
||||
private function getNextEntityNumber($invoice, Client $client, $counter)
|
||||
private function getNextEntityNumber($invoice, Client $client, $counter='')
|
||||
{
|
||||
$settings = $client->getMergedSettings();
|
||||
|
||||
@ -365,9 +365,9 @@ trait GeneratesConvertedQuoteCounter
|
||||
return (bool) $client->getSetting('shared_invoice_quote_counter');
|
||||
}
|
||||
|
||||
if ($type == 'credit') {
|
||||
//if ($type == 'credit') {
|
||||
return (bool) $client->getSetting('shared_invoice_credit_counter');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user