Code Duplication    Length = 6-6 lines in 2 locations

lib/Book.php 2 locations

@@ 141-146 (lines=6) @@
138
        		if (!file_exists($this->coverFileName)) {
139
        			$this->coverFileName = NULL;
140
        		}
141
        		if (empty($this->coverFileName)) {
142
        			$this->coverFileName = sprintf('%s%s', $imgDirectory, $line->cover);
143
        			if (!file_exists($this->coverFileName)) {
144
        				$this->coverFileName = NULL;
145
        			}
146
        		}
147
        		if (empty($this->coverFileName)) {
148
        			// Try with the epub file name
149
        			$data = $this->getDataFormat('EPUB');
@@ 155-160 (lines=6) @@
152
        				if (!file_exists($this->coverFileName)) {
153
        					$this->coverFileName = NULL;
154
        				}
155
        				if (empty($this->coverFileName)) {
156
        					$this->coverFileName = sprintf('%s%s.jpg', $imgDirectory, $data->name);
157
        					if (!file_exists($this->coverFileName)) {
158
        						$this->coverFileName = NULL;
159
        					}
160
        				}
161
        			}
162
        		}
163
        	}