Code Duplication    Length = 11-11 lines in 3 locations

src/Checks/ExampleEnvironmentVariablesAreSet.php 2 locations

@@ 61-71 (lines=11) @@
58
     *
59
     * @return bool
60
     */
61
    private function checkForDotEnvV4(): bool
62
    {
63
        $examples = Dotenv::createImmutable(base_path(), '.env.example');
64
        $actual = Dotenv::createImmutable(base_path(), '.env');
65
66
        $this->envVariables = Collection::make($examples->safeLoad())
67
            ->diffKeys($actual->safeLoad())
68
            ->keys();
69
70
        return $this->envVariables->isEmpty();
71
    }
72
73
    /**
74
     * Perform the verification of this check for DotEnv v5.
@@ 78-88 (lines=11) @@
75
     *
76
     * @return bool
77
     */
78
    private function checkForDotEnvV5(): bool
79
    {
80
        $examples = Dotenv::createMutable(base_path(), '.env.example');
81
        $actual = Dotenv::createMutable(base_path(), '.env');
82
83
        $this->envVariables = Collection::make($examples->safeLoad())
84
            ->diffKeys($actual->safeLoad())
85
            ->keys();
86
87
        return $this->envVariables->isEmpty();
88
    }
89
90
    /**
91
     * The error message to display in case the check does not pass.

src/Checks/ExampleEnvironmentVariablesAreUpToDate.php 1 location

@@ 58-68 (lines=11) @@
55
     *
56
     * @return bool
57
     */
58
    private function checkForDotEnvV4(): bool
59
    {
60
        $examples = Dotenv::createImmutable(base_path(), '.env.example');
61
        $actual = Dotenv::createImmutable(base_path(), '.env');
62
63
        $this->envVariables = Collection::make($actual->safeLoad())
64
            ->diffKeys($examples->safeLoad())
65
            ->keys();
66
67
        return $this->envVariables->isEmpty();
68
    }
69
70
    /**
71
     * The error message to display in case the check does not pass.