Stan Daniëls
fd30d1190d
Fix issues with parsing invokable macros ( #1124 )
...
* Fix issues with parsing invokable macros
* Add macro test
# Conflicts:
# tests/MacroTest.php
2021-01-09 13:24:28 +01:00
Aleksei Lebedev
25cc68c75f
Macro::initPhpDoc() will save original docblock if present. (#1116 )
...
* `Macro::initPhpDoc()` will save original docblock if present.
* Added `MacroTest::testInitPhpDocClosureWithoutDocBlock()`.
* Mock class rename.
* Code cleanup.
2020-12-23 12:26:18 +01:00
Aleksei Lebedev
36c4406b3a
Alias will grab macros from \Illuminate\Database\Eloquent\Builder too (#1118 )
...
* `Alias` will grab macros from `\Illuminate\Database\Eloquent\Builder` too.
* `@return` will contains `|static` for Eloquent Builder macros which return Eloquent Builder instance.
* `Macro` tests.
* `Alias::detectMethods()` tests.
* Mock classes rename.
2020-12-21 11:15:47 +01:00
Richard van Baarsen and Markus Podar
2ff9672a49
Add @see location for macros & mixins to PhpDoc ( #1054 )
...
* Add @see location for macros & mixins to PhpDoc
* Fix CS
* Add entry to changelog
* Improve changelog entry
* Adjust CS
* Update CHANGELOG.md
Co-authored-by: Markus Podar <[email protected] >
2020-09-11 16:35:41 +02:00
domkrm and Dominik Krämer
3a22b8daf6
Add better support for macros and mixins ( #1006 )
...
Co-authored-by: Dominik Krämer <[email protected] >
2020-09-06 07:58:13 +02:00
Markus Podar and Barry vd. Heuvel
764bc02b84
[CODESTYLE] Replace phpcs with php-cs-fixer ( #1030 )
...
* composer require --dev friendsofphp/php-cs-fixer:^2
* php-cs-fixer: ignore cache and custom local config file
* php-cs-fixer: initial config
* php-cs-fixer: replace commands in composer
* php-cs-fixer: add PSR12 "as good as it currently gets"
* php-cs-fixer: apply PSR12 to codebase
* tests: add workaround to keep unused imports for snapshot testing
* php-cs-fixer: apply no_unused_imports
* php-cs-fixer: apply array_syntax short
* php-cs-fixer: apply single_quote
* php-cs-fixer: switch ordered_imports sort_algorithm to alpha
Let's be opinionated here for consistency
* php-cs-fixer: split between non-tests and tests and share config
* php-cs-fixer: apply declare_strict_types for tests
* php-cs-fixer: apply fully_qualified_strict_types
* php-cs-fixer: apply space_after_semicolon
* php-cs-fixer: apply trailing_comma_in_multiline_array
* php-cs-fixer: apply trim_array_spaces
* php-cs-fixer: apply unary_operator_spaces
* php-cs-fixer: apply whitespace_after_comma_in_array
* php-cs-fixer: apply native_function_invocation
* php-cs-fixer: apply concat_space
* grumphp: reflect we're using phpcsfixer now
* composer remove --dev squizlabs/php_codesniffer
* gha: simplify fix-style approach
Not really necessary to remove packages and then manually prevent
unrelated commits creeping in
Co-authored-by: Barry vd. Heuvel <[email protected] >
2020-09-01 11:32:31 +02:00
Danny van der Sluijs
8287f02afa
Fix typos; Optimise if-else branches ( #1009 )
2020-08-28 09:15:43 +02:00
Pavlo Zhukov
d7359b86d4
Avoid code duplication in constructors
2018-10-01 00:20:54 +03:00
Pavlo Zhukov
5d8d93273f
Fix missed helpers for abstract methods the same name but different classes
2018-10-01 00:02:03 +03:00
Ezra Pool
8ab907f219
Support php's array callable format for macro's.
...
This allows you to define methods like this as well: Str::macro('name', [$this, 'method']);
2018-02-03 21:10:48 +01:00
Matthew Erwin
b76156b24c
Adds support for macros ( #500 )
...
* Adds support for macros
* Fixes formatting
2017-05-05 11:22:12 +02:00