Skip to content

Add a basename() helper - #46

Open
edalzell wants to merge 1 commit into
Stillat:masterfrom
edalzell:feature/basename-helper
Open

edalzell wants to merge 1 commit into
Stillat:masterfrom
edalzell:feature/basename-helper

Conversation

@edalzell

Copy link
Copy Markdown
Collaborator

Summary

  • Add FunctionWriter::basename() so a path expression can be wrapped without makeSimpleFunctionCall().
  • A string path is written as a literal. Another call, such as basePath(), is passed through as the argument.
ConfigWriter::f()->basename(ConfigWriter::f()->basePath())
// basename(base_path())

Test plan

  • vendor/bin/phpunit tests/LaravelFunctionCallTest.php --filter testBasenameCanWrapAPathCall

makeSimpleFunctionCall takes an argument list, so basename(base_path()) had to be built by hand.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant