Skip to content

Commit

Permalink
Add test for class method argument as seen in codesearch in gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrala committed Dec 23, 2023
1 parent 4210d56 commit c13c401
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ function as_an_argument() {

$class = new \TestClass(FILE_STATUS_PERMANENT);
}

class ClassDefault {
public function test($status = FILE_STATUS_PERMANENT) {
return true;
}
}

?>
-----
<?php
Expand All @@ -26,4 +33,11 @@ function as_an_argument() {

$class = new \TestClass(\Drupal\file\FileInterface::STATUS_PERMANENT);
}

class ClassDefault {
public function test($status = \Drupal\file\FileInterface::STATUS_PERMANENT) {
return true;
}
}

?>

0 comments on commit c13c401

Please sign in to comment.