This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Psr\Http\Message\ServerRequestInterface as Request; | |
| use Psr\Http\Message\ResponseInterface as Response; | |
| class Dispatcher | |
| { | |
| protected $queue; | |
| protected $resolver; | |
| public function __construct(array $queue, callable $resolver) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class MiddlewareQueue | |
| { | |
| protected $queue = []; | |
| public function add($spec) | |
| { | |
| $this->queue[] = $spec; | |
| } | |
| public function asArray() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Psr\Http\Message\ResponseInterface as Response; | |
| use Psr\Http\Message\ServerRequestInterface as Request; | |
| class Action | |
| { | |
| // specifications to be resolved | |
| protected $input; | |
| protected $domain; | |
| protected $responder; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class BlogFilter | |
| { | |
| protected $messages = array(); | |
| public function forUpdate(BlogPost $post) | |
| { | |
| $this->messages = array(); | |
| if (! trim($post->title)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $di = $app->getContainer(); | |
| // ----------------------------------------------------------------------------- | |
| // Service providers | |
| // ----------------------------------------------------------------------------- | |
| // Twig | |
| $di->set('view', function () use ($di) { | |
| $settings = $di->get('settings'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // add to the end of FactoryTest | |
| public function testSetterCallable() | |
| { | |
| $this->factory->setter['Aura\Di\FakeChildClass']['setFake'] = function () { | |
| return 'OOPS'; | |
| }; | |
| $object = $this->factory->newInstance('Aura\Di\FakeChildClass'); | |
| $actual = $object->getFake(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 24118 vendors have 1 packages. | |
| 7316 vendors have 2 packages. | |
| 3496 vendors have 3 packages. | |
| 1987 vendors have 4 packages. | |
| 1259 vendors have 5 packages. | |
| 889 vendors have 6 packages. | |
| 654 vendors have 7 packages. | |
| 492 vendors have 8 packages. | |
| 405 vendors have 9 packages. | |
| 307 vendors have 10 packages. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Per convo at <https://medium.com/@taylorotwell/measuring-code-complexity-64356da605f9> and <https://www.reddit.com/r/PHP/comments/5mycc5/framework_code_complexity_comparison/>. | |
| Ran `phploc` against different branches of <https://github.com/laravel/framework/tree/5.4/src/Illuminate>. | |
| # Size | |
| ## 4.0 | |
| Directories 90 | |
| Files 430 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ composer create-project aura/web-project | |
| $ cd web-project | |
| $ rm -rf vendor/composer/ vendor/monolog/ vendor/psr/ | |
| $ phploc --names-exclude="*Test.php" . | |
| phploc 3.0.1 by Sebastian Bergmann. | |
| Directories 29 | |
| Files 131 | |
| Size |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ composer require radar/adr 1.x | |
| $ rm -rf vendor/composer/ vendor/container-interop/ vendor/psr/ | |
| $ phploc --names-exclude="*Test.php" . | |
| phploc 3.0.1 by Sebastian Bergmann. | |
| Directories 31 | |
| Files 121 | |
| Size | |
| Lines of Code (LOC) 9390 |