1. Go to this page and download the library: Download umanit/dev-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
umanit / dev-bundle example snippets
use Arkitect\Expression\ForClasses\ResideInOneOfTheseNamespaces;
use Umanit\DevBundle\Arkitect\Expression\ForClasses\NotAbuseFinalUsage;
use Umanit\DevBundle\Arkitect\Expression\ForClasses\NotUseGenericException;
// [...]
$rules[] = Rule
::allClasses()
->that(new ResideInOneOfTheseNamespaces('App'))
->should(new NotUseGenericException())
->because('we want to force usage of SPL exceptions or custom ones')
;
$rules[] = Rule
::allClasses()
->that(new ResideInOneOfTheseNamespaces('App'))
->should(new NotUseConcreteWhenInterfaceExists())
->because('we want to depend on interfaces, not concrete implementations')
;
$rules[] = Rule
::allClasses()
->that(new ResideInOneOfTheseNamespaces('App'))
->should(new NotAbuseFinalUsage())
->because('we want avoid final classes which reduce extensibility')
;
$event = $dispatcher->getLastDispatchedEvent(MyEvent::class);
$this->assertInstanceOf(MyEvent::class, $event);
// All events dispatched under a given name
$events = $dispatcher->getDispatchedEvents(MyEvent::class);
// Full map of every dispatched event
$all = $dispatcher->getAllDispatchedEvents();
TestUtils::setId($entity, 42);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.