mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 04:34:03 +00:00
Fix code style (php-cs-fixer)
This commit is contained in:
parent
a3b925b362
commit
759931394c
1 changed files with 7 additions and 9 deletions
|
|
@ -78,8 +78,7 @@ class TableRLSManager implements RLSPolicyManager
|
||||||
string $table,
|
string $table,
|
||||||
array &$cachedPaths,
|
array &$cachedPaths,
|
||||||
array $visitedTables = []
|
array $visitedTables = []
|
||||||
): array
|
): array {
|
||||||
{
|
|
||||||
if (isset($cachedPaths[$table])) {
|
if (isset($cachedPaths[$table])) {
|
||||||
return $cachedPaths[$table];
|
return $cachedPaths[$table];
|
||||||
}
|
}
|
||||||
|
|
@ -89,7 +88,7 @@ class TableRLSManager implements RLSPolicyManager
|
||||||
$cachedPaths[$table] = [
|
$cachedPaths[$table] = [
|
||||||
'dead_end' => false,
|
'dead_end' => false,
|
||||||
'recursion' => false,
|
'recursion' => false,
|
||||||
'steps' => []
|
'steps' => [],
|
||||||
];
|
];
|
||||||
|
|
||||||
return $cachedPaths[$table];
|
return $cachedPaths[$table];
|
||||||
|
|
@ -102,7 +101,7 @@ class TableRLSManager implements RLSPolicyManager
|
||||||
$cachedPaths[$table] = [
|
$cachedPaths[$table] = [
|
||||||
'dead_end' => true,
|
'dead_end' => true,
|
||||||
'recursion' => false,
|
'recursion' => false,
|
||||||
'steps' => []
|
'steps' => [],
|
||||||
];
|
];
|
||||||
|
|
||||||
return $cachedPaths[$table];
|
return $cachedPaths[$table];
|
||||||
|
|
@ -352,8 +351,7 @@ class TableRLSManager implements RLSPolicyManager
|
||||||
array $foreignKeys,
|
array $foreignKeys,
|
||||||
array &$cachedPaths,
|
array &$cachedPaths,
|
||||||
array $visitedTables
|
array $visitedTables
|
||||||
): array
|
): array {
|
||||||
{
|
|
||||||
$visitedTables = [...$visitedTables, $table];
|
$visitedTables = [...$visitedTables, $table];
|
||||||
// Initialize the length variables with maximum values
|
// Initialize the length variables with maximum values
|
||||||
$shortestLength = PHP_INT_MAX;
|
$shortestLength = PHP_INT_MAX;
|
||||||
|
|
@ -408,7 +406,7 @@ class TableRLSManager implements RLSPolicyManager
|
||||||
$finalPath = [
|
$finalPath = [
|
||||||
'dead_end' => false,
|
'dead_end' => false,
|
||||||
'recursion' => true,
|
'recursion' => true,
|
||||||
'steps' => []
|
'steps' => [],
|
||||||
];
|
];
|
||||||
|
|
||||||
// Don't cache recursive paths -- return right away.
|
// Don't cache recursive paths -- return right away.
|
||||||
|
|
@ -422,7 +420,7 @@ class TableRLSManager implements RLSPolicyManager
|
||||||
$finalPath = $shortestNonNullablePath ?? $shortestPath ?? [
|
$finalPath = $shortestNonNullablePath ?? $shortestPath ?? [
|
||||||
'dead_end' => true,
|
'dead_end' => true,
|
||||||
'recursion' => false,
|
'recursion' => false,
|
||||||
'steps' => []
|
'steps' => [],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -447,7 +445,7 @@ class TableRLSManager implements RLSPolicyManager
|
||||||
return [
|
return [
|
||||||
'dead_end' => false,
|
'dead_end' => false,
|
||||||
'recursion' => false,
|
'recursion' => false,
|
||||||
'steps' => array_merge([$constraint], $foreignPath['steps'])
|
'steps' => array_merge([$constraint], $foreignPath['steps']),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue