Skip to content

Commit b64c6d6

Browse files
schiesslenickvergessen
authored andcommitted
only search the license header for @copyright statements
1 parent c98de82 commit b64c6d6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

build/license.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,10 @@ private function eatOldLicense($source) {
228228

229229
private function getCopyrightNotices($path, $file) {
230230
$licenseHeaderEndsAtLine = (int)trim(shell_exec("grep -n '*/' $path | head -n 1 | cut -d ':' -f 1"));
231-
$lineByLine = explode(PHP_EOL, $file, $licenseHeaderEndsAtLine);
231+
$lineByLine = explode(PHP_EOL, $file, $licenseHeaderEndsAtLine + 1);
232232
$copyrightNotice = [];
233-
foreach ($lineByLine as $line) {
233+
$licensePart = array_slice($lineByLine, 0, $licenseHeaderEndsAtLine);
234+
foreach ($licensePart as $line) {
234235
if (strpos($line, '@copyright') !== false) {
235236
$copyrightNotice[] = $line;
236237
}

0 commit comments

Comments
 (0)