| @@ 130-134 (lines=5) @@ | ||
| 127 | $song = null; |
|
| 128 | $songId = null; |
|
| 129 | ||
| 130 | if (preg_match('/^[a-f0-9]{6}$/i', $songKey)) { |
|
| 131 | $song = $this->dataSource->fetchSongByKey($songKey); |
|
| 132 | } elseif (preg_match('/^\d+$/', $songKey)) { |
|
| 133 | $song = $this->dataSource->fetchSongById($songKey); |
|
| 134 | } |
|
| 135 | ||
| 136 | if ($song) { |
|
| 137 | $songId = $song['id']; |
|
| @@ 104-108 (lines=5) @@ | ||
| 101 | $song = null; |
|
| 102 | $songId = null; |
|
| 103 | ||
| 104 | if (preg_match('/^[a-f0-9]{6}$/i', $songKey)) { |
|
| 105 | $song = $this->getDataStore()->fetchSongByKey($songKey); |
|
| 106 | } elseif (preg_match('/^\d+$/', $songKey)) { |
|
| 107 | $song = $this->getDataStore()->fetchSongById($songKey); |
|
| 108 | } |
|
| 109 | ||
| 110 | if ($song) { |
|
| 111 | $songId = $song['id']; |
|