Code Duplication    Length = 10-10 lines in 2 locations

source/FileHandlerLock.php 2 locations

@@ 94-103 (lines=10) @@
91
    /**
92
     * @return bool
93
     */
94
    private function lockCouldBeAcquired()
95
    {
96
        if ($this->isResource) {
97
            $couldBeAcquired = flock($this->fileHandler, LOCK_EX | LOCK_NB);
98
        } else {
99
            $couldBeAcquired = $this->fileHandler->flock(LOCK_EX | LOCK_NB);
100
        }
101
102
        return $couldBeAcquired;
103
    }
104
105
    /**
106
     * @return bool
@@ 108-117 (lines=10) @@
105
    /**
106
     * @return bool
107
     */
108
    private function lockCouldBeReleased()
109
    {
110
        if ($this->isResource) {
111
            $couldBeAcquired = flock($this->fileHandler, LOCK_UN | LOCK_NB);
112
        } else {
113
            $couldBeAcquired = $this->fileHandler->flock(LOCK_UN | LOCK_NB);
114
        }
115
116
        return $couldBeAcquired;
117
    }
118
}
119