for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Rinvex\Repository\Providers;
use Illuminate\Support\ServiceProvider;
use Rinvex\Repository\Listeners\RepositoryEventListener;
class RepositoryServiceProvider extends ServiceProvider
{
/**
* The repository alias pattern.
*
* @var string
*/
protected $repositoryAliasPattern = '{{class}}Contract';
$repositoryAliasPattern
20
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.
* {@inheritdoc}
public function register()
// Merge config
$this->mergeConfigFrom(realpath(__DIR__.'/../../config/config.php'), 'rinvex.repository');
// Register the event listener
$this->app->bind('rinvex.repository.listener', RepositoryEventListener::class);
}
public function boot()
if ($this->app->runningInConsole()) {
// Publish config
$this->publishes([realpath(__DIR__.'/../../config/config.php') => config_path('rinvex.repository.php')], 'rinvex-repository-config');
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.
// Subscribe the registered event listener
$this->app['events']->subscribe('rinvex.repository.listener');
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.