Code Duplication    Length = 7-8 lines in 2 locations

lib/ComponentManager/Command/ProjectAwareCommand.php 2 locations

@@ 127-133 (lines=7) @@
124
     */
125
    protected function getProject($projectFilename=null, $projectLockFilename=null) {
126
        if ($this->project === null) {
127
            if ($projectFilename === null) {
128
                $projectFilename = PlatformUtil::workingDirectory()
129
                                 . PlatformUtil::directorySeparator()
130
                                 . 'componentmgr.json';
131
            } else {
132
                $projectFilename = PlatformUtil::expandPath($projectFilename);
133
            }
134
135
            if ($projectLockFilename === null) {
136
                $projectLockFilename = PlatformUtil::workingDirectory()
@@ 135-142 (lines=8) @@
132
                $projectFilename = PlatformUtil::expandPath($projectFilename);
133
            }
134
135
            if ($projectLockFilename === null) {
136
                $projectLockFilename = PlatformUtil::workingDirectory()
137
                                     . PlatformUtil::directorySeparator()
138
                                     . 'componentmgr.lock.json';
139
            } else {
140
                $projectLockFilename = PlatformUtil::expandPath(
141
                        $projectLockFilename);
142
            }
143
144
            $this->logger->info('Parsing project file', [
145
                'filename' => $projectFilename,