mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 17:24:03 +00:00
[4.x] General code cleanup (#1278)
* Declare sensitive parameters as sensitive ... just so that they don't show up in logs * Remove unnecessary null-coalescing * Simplify return * Merge isset() calls * Inline return * Use nullsafe operator * Simplify if-else branches * Use direct empty string comparison instead of strlen() * Add missing type * Change interface as events expect a TenantWithDatabase not just a Tenant * Narrow typehint * Remove redundant type casts * Fix style with php-cs-fixer * Fix typos * Revert unwanted if-else simplification * fix phpstan errors * narrow type --------- Co-authored-by: Samuel Štancl <samuel@archte.ch>
This commit is contained in:
parent
05b602e37f
commit
79f740d057
24 changed files with 45 additions and 53 deletions
|
|
@ -50,7 +50,7 @@ class BroadcastChannelPrefixBootstrapper implements TenancyBootstrapper
|
|||
|
||||
$broadcasterOverride($this->broadcastManager);
|
||||
|
||||
// Get the overriden broadcaster
|
||||
// Get the overridden broadcaster
|
||||
$newBroadcaster = $this->broadcastManager->driver($broadcaster);
|
||||
|
||||
// Register the original broadcaster's channels in the new broadcaster
|
||||
|
|
@ -64,7 +64,7 @@ class BroadcastChannelPrefixBootstrapper implements TenancyBootstrapper
|
|||
{
|
||||
// Revert to the original broadcasters
|
||||
foreach ($this->originalBroadcasters as $name => $broadcaster) {
|
||||
// Delete the cached (overriden) broadcaster
|
||||
// Delete the cached (overridden) broadcaster
|
||||
$this->broadcastManager->purge($name);
|
||||
|
||||
// Make manager return the original broadcaster instance
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ class QueueTenancyBootstrapper implements TenancyBootstrapper
|
|||
}
|
||||
|
||||
// Revert back to the previous tenant
|
||||
if (tenant() && $previousTenant && $previousTenant->isNot(tenant())) {
|
||||
if (tenant() && $previousTenant?->isNot(tenant())) {
|
||||
tenancy()->initialize($previousTenant);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue