1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Apply style changes

This commit is contained in:
Benjamin Beganović 2024-02-28 17:59:27 +01:00
parent 173d327e7b
commit 93a52db713

View File

@ -96,14 +96,14 @@ class DependencyTest extends TestCase
private function checkDependencies(array $steps): array
{
$dependencies = Purchase::$dependencies;
$stepOrder = array_flip($steps);
$step_order = array_flip($steps);
$errors = [];
foreach ($steps as $step) {
$dependentClasses = $dependencies[$step] ?? [];
$dependent = $dependencies[$step] ?? [];
foreach ($dependentClasses as $dependency) {
if (in_array($dependency, $steps) && $stepOrder[$dependency] > $stepOrder[$step]) {
foreach ($dependent as $dependency) {
if (in_array($dependency, $steps) && $step_order[$dependency] > $step_order[$step]) {
$errors[] = "Dependency error: $step depends on $dependency";
}
}