Not gonna lie, most code was written by Chat-GPT. :)
For now, extension brings 3 snippets with it:\
php
- boilerplate for php file with fulfilled namespace and class name
<?php
namespace __automatically__filled__psr_4__namespace__;
class __class_from_filename__{
}
namespace
- outputs automatically filled namespace according to path and psr-4 definition
namespace __automatically__filled__psr_4__namespace__;
class
- outputs class with current filename
class __class_from_filename__{}
- composer.json must exist in folder structure above file from where the class is being created/edited
- psr-4 paths defined inside composer.json
// composer.json
{
"psr-4": {
"Tests\\": "tests/",
"App\\": "src/"
}
}
Currently no settings available
Initial release.
- Snippets
php
,namespace
,class