bristol-su /
control
| 1 | <?php |
||||
| 2 | |||||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||||
| 3 | namespace BristolSU\ControlDB; |
||||
| 4 | |||||
| 5 | use BristolSU\ControlDB\AdditionalProperties\AdditionalPropertySingletonStore; |
||||
| 6 | use BristolSU\ControlDB\AdditionalProperties\AdditionalPropertyStore; |
||||
| 7 | use BristolSU\ControlDB\Bootstrap\RegistersCachedRepositories; |
||||
| 8 | use BristolSU\ControlDB\Bootstrap\RegistersObserverFramework; |
||||
| 9 | use BristolSU\ControlDB\Commands\SeedDatabase; |
||||
| 10 | use BristolSU\ControlDB\Contracts\Repositories\DataUser as DataUserRepositoryContract; |
||||
| 11 | use BristolSU\ControlDB\Contracts\Repositories\DataGroup as DataGroupRepositoryContract; |
||||
| 12 | use BristolSU\ControlDB\Contracts\Repositories\DataRole as DataRoleRepositoryContract; |
||||
| 13 | use BristolSU\ControlDB\Contracts\Repositories\DataPosition as DataPositionRepositoryContract; |
||||
| 14 | use BristolSU\ControlDB\Contracts\Models\DataUser as DataUserContract; |
||||
| 15 | use BristolSU\ControlDB\Contracts\Models\DataGroup as DataGroupContract; |
||||
| 16 | use BristolSU\ControlDB\Contracts\Models\DataRole as DataRoleContract; |
||||
| 17 | use BristolSU\ControlDB\Contracts\Models\DataPosition as DataPositionContract; |
||||
| 18 | use BristolSU\ControlDB\Contracts\Repositories\Pivots\Tags\GroupGroupTag as GroupGroupTagContract; |
||||
| 19 | use BristolSU\ControlDB\Contracts\Repositories\Pivots\Tags\UserUserTag as UserUserTagContract; |
||||
| 20 | use BristolSU\ControlDB\Contracts\Repositories\Pivots\Tags\RoleRoleTag as RoleRoleTagContract; |
||||
| 21 | use BristolSU\ControlDB\Contracts\Repositories\Pivots\Tags\PositionPositionTag as PositionPositionTagContract; |
||||
| 22 | use BristolSU\ControlDB\Contracts\Repositories\Pivots\UserGroup as UserGroupContract; |
||||
| 23 | use BristolSU\ControlDB\Contracts\Repositories\Pivots\UserRole as UserRoleContract; |
||||
| 24 | use BristolSU\ControlDB\Export\ExportControlCommand; |
||||
| 25 | use BristolSU\ControlDB\Export\ExportManager; |
||||
| 26 | use BristolSU\ControlDB\Models\DataUser; |
||||
| 27 | use BristolSU\ControlDB\Models\DataGroup; |
||||
| 28 | use BristolSU\ControlDB\Models\DataRole; |
||||
| 29 | use BristolSU\ControlDB\Models\DataPosition; |
||||
| 30 | use BristolSU\ControlDB\Models\Group as GroupModel; |
||||
| 31 | use BristolSU\ControlDB\Models\Position as PositionModel; |
||||
| 32 | use BristolSU\ControlDB\Models\Role as RoleModel; |
||||
| 33 | use BristolSU\ControlDB\Models\Tags\GroupTag as GroupTagModel; |
||||
| 34 | use BristolSU\ControlDB\Models\Tags\GroupTagCategory as GroupTagCategoryModel; |
||||
| 35 | use BristolSU\ControlDB\Models\Tags\PositionTag as PositionTagModel; |
||||
| 36 | use BristolSU\ControlDB\Models\Tags\PositionTagCategory as PositionTagCategoryModel; |
||||
| 37 | use BristolSU\ControlDB\Models\Tags\RoleTag as RoleTagModel; |
||||
| 38 | use BristolSU\ControlDB\Models\Tags\RoleTagCategory as RoleTagCategoryModel; |
||||
| 39 | use BristolSU\ControlDB\Models\Tags\UserTag as UserTagModel; |
||||
| 40 | use BristolSU\ControlDB\Models\Tags\UserTagCategory as UserTagCategoryModel; |
||||
| 41 | use BristolSU\ControlDB\Models\User as UserModel; |
||||
| 42 | use BristolSU\ControlDB\Observers\DataGroupObserverClearCache; |
||||
| 43 | use BristolSU\ControlDB\Observers\DataPositionObserverClearCache; |
||||
| 44 | use BristolSU\ControlDB\Observers\DataRoleObserverClearCache; |
||||
| 45 | use BristolSU\ControlDB\Observers\DataUserObserverClearCache; |
||||
| 46 | use BristolSU\ControlDB\Observers\GroupObserverCascadeDelete; |
||||
| 47 | use BristolSU\ControlDB\Observers\GroupObserverClearCache; |
||||
| 48 | use BristolSU\ControlDB\Observers\NotifyObservers\Framework\Observe; |
||||
| 49 | use BristolSU\ControlDB\Observers\NotifyObservers\Framework\ObserverStore; |
||||
| 50 | use BristolSU\ControlDB\Observers\Pivots\Tags\GroupGroupTagObserverClearCache; |
||||
| 51 | use BristolSU\ControlDB\Observers\Pivots\Tags\PositionPositionTagObserverClearCache; |
||||
| 52 | use BristolSU\ControlDB\Observers\Pivots\Tags\RoleRoleTagObserverClearCache; |
||||
| 53 | use BristolSU\ControlDB\Observers\Pivots\Tags\UserUserTagObserverClearCache; |
||||
| 54 | use BristolSU\ControlDB\Observers\Pivots\UserGroupObserverClearCache; |
||||
| 55 | use BristolSU\ControlDB\Observers\Pivots\UserRoleObserverClearCache; |
||||
| 56 | use BristolSU\ControlDB\Observers\PositionObserverCascadeDelete; |
||||
| 57 | use BristolSU\ControlDB\Observers\PositionObserverClearCache; |
||||
| 58 | use BristolSU\ControlDB\Observers\RoleObserverCascadeDelete; |
||||
| 59 | use BristolSU\ControlDB\Observers\RoleObserverClearCache; |
||||
| 60 | use BristolSU\ControlDB\Observers\Tags\GroupTagCategoryObserverCascadeDelete; |
||||
| 61 | use BristolSU\ControlDB\Observers\Tags\GroupTagCategoryObserverClearCache; |
||||
| 62 | use BristolSU\ControlDB\Observers\Tags\GroupTagObserverCascadeDelete; |
||||
| 63 | use BristolSU\ControlDB\Observers\Tags\GroupTagObserverClearCache; |
||||
| 64 | use BristolSU\ControlDB\Observers\Tags\PositionTagCategoryObserverCascadeDelete; |
||||
| 65 | use BristolSU\ControlDB\Observers\Tags\PositionTagCategoryObserverClearCache; |
||||
| 66 | use BristolSU\ControlDB\Observers\Tags\PositionTagObserverCascadeDelete; |
||||
| 67 | use BristolSU\ControlDB\Observers\Tags\PositionTagObserverClearCache; |
||||
| 68 | use BristolSU\ControlDB\Observers\Tags\RoleTagCategoryObserverCascadeDelete; |
||||
| 69 | use BristolSU\ControlDB\Observers\Tags\RoleTagCategoryObserverClearCache; |
||||
| 70 | use BristolSU\ControlDB\Observers\Tags\RoleTagObserverCascadeDelete; |
||||
| 71 | use BristolSU\ControlDB\Observers\Tags\RoleTagObserverClearCache; |
||||
| 72 | use BristolSU\ControlDB\Observers\Tags\UserTagCategoryObserverCascadeDelete; |
||||
| 73 | use BristolSU\ControlDB\Observers\Tags\UserTagCategoryObserverClearCache; |
||||
| 74 | use BristolSU\ControlDB\Observers\Tags\UserTagObserverCascadeDelete; |
||||
| 75 | use BristolSU\ControlDB\Observers\Tags\UserTagObserverClearCache; |
||||
| 76 | use BristolSU\ControlDB\Observers\UserObserverCascadeDelete; |
||||
| 77 | use BristolSU\ControlDB\Observers\UserObserverClearCache; |
||||
| 78 | use BristolSU\ControlDB\Repositories\DataUser as DataUserRepository; |
||||
| 79 | use BristolSU\ControlDB\Repositories\DataGroup as DataGroupRepository; |
||||
| 80 | use BristolSU\ControlDB\Repositories\DataRole as DataRoleRepository; |
||||
| 81 | use BristolSU\ControlDB\Repositories\DataPosition as DataPositionRepository; |
||||
| 82 | use BristolSU\ControlDB\Repositories\Group as GroupRepository; |
||||
| 83 | use BristolSU\ControlDB\Repositories\Pivots\Tags\GroupGroupTag; |
||||
| 84 | use BristolSU\ControlDB\Repositories\Pivots\Tags\PositionPositionTag; |
||||
| 85 | use BristolSU\ControlDB\Repositories\Pivots\Tags\RoleRoleTag; |
||||
| 86 | use BristolSU\ControlDB\Repositories\Pivots\Tags\UserUserTag; |
||||
| 87 | use BristolSU\ControlDB\Repositories\Pivots\UserGroup; |
||||
| 88 | use BristolSU\ControlDB\Repositories\Pivots\UserRole; |
||||
| 89 | use BristolSU\ControlDB\Repositories\Position as PositionRepository; |
||||
| 90 | use BristolSU\ControlDB\Repositories\Role as RoleRepository; |
||||
| 91 | use BristolSU\ControlDB\Repositories\Tags\GroupTag as GroupTagRepository; |
||||
| 92 | use BristolSU\ControlDB\Repositories\Tags\GroupTagCategory as GroupTagCategoryRepository; |
||||
| 93 | use BristolSU\ControlDB\Repositories\Tags\PositionTag as PositionTagRepository; |
||||
| 94 | use BristolSU\ControlDB\Repositories\Tags\PositionTagCategory as PositionTagCategoryRepository; |
||||
| 95 | use BristolSU\ControlDB\Repositories\Tags\RoleTag as RoleTagRepository; |
||||
| 96 | use BristolSU\ControlDB\Repositories\Tags\RoleTagCategory as RoleTagCategoryRepository; |
||||
| 97 | use BristolSU\ControlDB\Repositories\Tags\UserTag as UserTagRepository; |
||||
| 98 | use BristolSU\ControlDB\Repositories\Tags\UserTagCategory as UserTagCategoryRepository; |
||||
| 99 | use BristolSU\ControlDB\Repositories\User as UserRepository; |
||||
| 100 | use BristolSU\ControlDB\Contracts\Models\Group as GroupModelContract; |
||||
| 101 | use BristolSU\ControlDB\Contracts\Models\Position as PositionContract; |
||||
| 102 | use BristolSU\ControlDB\Contracts\Models\Role as RoleModelContract; |
||||
| 103 | use BristolSU\ControlDB\Contracts\Models\Tags\GroupTag as GroupTagModelContract; |
||||
| 104 | use BristolSU\ControlDB\Contracts\Models\Tags\GroupTagCategory as GroupTagCategoryModelContract; |
||||
| 105 | use BristolSU\ControlDB\Contracts\Models\Tags\PositionTag as PositionTagModelContract; |
||||
| 106 | use BristolSU\ControlDB\Contracts\Models\Tags\PositionTagCategory as PositionTagCategoryModelContract; |
||||
| 107 | use BristolSU\ControlDB\Contracts\Models\Tags\RoleTag as RoleTagModelContract; |
||||
| 108 | use BristolSU\ControlDB\Contracts\Models\Tags\RoleTagCategory as RoleTagCategoryModelContract; |
||||
| 109 | use BristolSU\ControlDB\Contracts\Models\Tags\UserTag as UserTagModelContract; |
||||
| 110 | use BristolSU\ControlDB\Contracts\Models\Tags\UserTagCategory as UserTagCategoryModelContract; |
||||
| 111 | use BristolSU\ControlDB\Contracts\Models\User as UserContract; |
||||
| 112 | use BristolSU\ControlDB\Contracts\Repositories\Group as GroupRepositoryContract; |
||||
| 113 | use BristolSU\ControlDB\Contracts\Repositories\Position as PositionRepositoryContract; |
||||
| 114 | use BristolSU\ControlDB\Contracts\Repositories\Role as RoleRepositoryContract; |
||||
| 115 | use BristolSU\ControlDB\Contracts\Repositories\Tags\GroupTag as GroupTagRepositoryContract; |
||||
| 116 | use BristolSU\ControlDB\Contracts\Repositories\Tags\GroupTagCategory as GroupTagCategoryRepositoryContract; |
||||
| 117 | use BristolSU\ControlDB\Contracts\Repositories\Tags\PositionTag as PositionTagRepositoryContract; |
||||
| 118 | use BristolSU\ControlDB\Contracts\Repositories\Tags\PositionTagCategory as PositionTagCategoryRepositoryContract; |
||||
| 119 | use BristolSU\ControlDB\Contracts\Repositories\Tags\RoleTag as RoleTagRepositoryContract; |
||||
| 120 | use BristolSU\ControlDB\Contracts\Repositories\Tags\RoleTagCategory as RoleTagCategoryRepositoryContract; |
||||
| 121 | use BristolSU\ControlDB\Contracts\Repositories\Tags\UserTag as UserTagRepositoryContract; |
||||
| 122 | use BristolSU\ControlDB\Contracts\Repositories\Tags\UserTagCategory as UserTagCategoryRepositoryContract; |
||||
| 123 | use BristolSU\ControlDB\Contracts\Repositories\User as UserRepositoryContract; |
||||
| 124 | use Illuminate\Contracts\Container\BindingResolutionException; |
||||
| 125 | use Illuminate\Database\Eloquent\Factory; |
||||
| 126 | use Illuminate\Support\Facades\Route; |
||||
| 127 | use Illuminate\Support\ServiceProvider; |
||||
| 128 | |||||
| 129 | class ControlDBServiceProvider extends ServiceProvider |
||||
|
0 ignored issues
–
show
|
|||||
| 130 | { |
||||
| 131 | use RegistersCachedRepositories, RegistersObserverFramework; |
||||
| 132 | |||||
| 133 | 804 | public function register() |
|||
|
0 ignored issues
–
show
|
|||||
| 134 | { |
||||
| 135 | 804 | $this->bindContracts(); |
|||
| 136 | 804 | $this->registerObserversFramework($this->app); |
|||
| 137 | 804 | $this->registerCachedRepositories($this->app); |
|||
| 138 | 804 | $this->registerCommands(); |
|||
| 139 | 804 | $this->registerMigrations(); |
|||
| 140 | 804 | $this->registerConfig(); |
|||
| 141 | 804 | $this->registerFactories(); |
|||
| 142 | $this->app->singleton('control-exporter', function() { |
||||
|
0 ignored issues
–
show
|
|||||
| 143 | 5 | return new ExportManager($this->app); |
|||
| 144 | 804 | }); |
|||
|
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
Loading history...
|
|||||
| 145 | 804 | } |
|||
| 146 | |||||
| 147 | 804 | public function boot() |
|||
|
0 ignored issues
–
show
|
|||||
| 148 | { |
||||
| 149 | 804 | $this->setupRouteModelBinding(); |
|||
| 150 | 804 | $this->setupRoutes(); |
|||
| 151 | 804 | $this->setupObservers(); |
|||
| 152 | 804 | } |
|||
| 153 | |||||
| 154 | /** |
||||
| 155 | * Register config |
||||
| 156 | */ |
||||
|
0 ignored issues
–
show
|
|||||
| 157 | 804 | protected function registerConfig() |
|||
| 158 | { |
||||
| 159 | 804 | $this->publishes([__DIR__ .'/../config/control.php' => config_path('control.php'), |
|||
|
0 ignored issues
–
show
|
|||||
| 160 | 804 | ], 'config'); |
|||
|
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
Loading history...
|
|||||
| 161 | 804 | $this->mergeConfigFrom( |
|||
| 162 | 804 | __DIR__ .'/../config/control.php', 'control' |
|||
| 163 | ); |
||||
| 164 | 804 | } |
|||
| 165 | |||||
| 166 | /** |
||||
| 167 | * Register factories in a non-production environment |
||||
| 168 | * |
||||
| 169 | * @throws BindingResolutionException |
||||
| 170 | */ |
||||
|
0 ignored issues
–
show
|
|||||
| 171 | 804 | public function registerFactories() |
|||
| 172 | { |
||||
| 173 | 804 | if (!app()->environment('production') && class_exists(\Faker\Factory::class)) { |
|||
|
0 ignored issues
–
show
The method
environment() does not exist on Illuminate\Container\Container. Are you sure you never get this type here, but always one of the subclasses?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 174 | 804 | $this->app->make(Factory::class)->load(__DIR__ .'/../database/factories'); |
|||
| 175 | } |
||||
| 176 | 804 | } |
|||
| 177 | |||||
| 178 | 804 | public function registerMigrations() |
|||
|
0 ignored issues
–
show
|
|||||
| 179 | { |
||||
| 180 | 804 | $this->loadMigrationsFrom(__DIR__ . '/../database/migrations'); |
|||
| 181 | 804 | } |
|||
| 182 | |||||
| 183 | 804 | public function bindContracts() |
|||
|
0 ignored issues
–
show
|
|||||
| 184 | { |
||||
| 185 | // Base Models |
||||
| 186 | 804 | $this->app->bind(GroupModelContract::class, GroupModel::class); |
|||
| 187 | 804 | $this->app->bind(RoleModelContract::class, RoleModel::class); |
|||
| 188 | 804 | $this->app->bind(UserContract::class, UserModel::class); |
|||
| 189 | 804 | $this->app->bind(PositionContract::class, PositionModel::class); |
|||
| 190 | 804 | $this->app->bind(DataUserContract::class, DataUser::class); |
|||
| 191 | 804 | $this->app->bind(DataGroupContract::class, DataGroup::class); |
|||
| 192 | 804 | $this->app->bind(DataRoleContract::class, DataRole::class); |
|||
| 193 | 804 | $this->app->bind(DataPositionContract::class, DataPosition::class); |
|||
| 194 | |||||
| 195 | // Base Repositories |
||||
| 196 | 804 | $this->app->bind(GroupRepositoryContract::class, GroupRepository::class); |
|||
| 197 | 804 | $this->app->bind(RoleRepositoryContract::class, RoleRepository::class); |
|||
| 198 | 804 | $this->app->bind(UserRepositoryContract::class, UserRepository::class); |
|||
| 199 | 804 | $this->app->bind(PositionRepositoryContract::class, PositionRepository::class); |
|||
| 200 | 804 | $this->app->bind(DataUserRepositoryContract::class, DataUserRepository::class); |
|||
| 201 | 804 | $this->app->bind(DataGroupRepositoryContract::class, DataGroupRepository::class); |
|||
| 202 | 804 | $this->app->bind(DataRoleRepositoryContract::class, DataRoleRepository::class); |
|||
| 203 | 804 | $this->app->bind(DataPositionRepositoryContract::class, DataPositionRepository::class); |
|||
| 204 | |||||
| 205 | // Tag Models |
||||
| 206 | 804 | $this->app->bind(GroupTagModelContract::class, GroupTagModel::class); |
|||
| 207 | 804 | $this->app->bind(GroupTagCategoryModelContract::class, GroupTagCategoryModel::class); |
|||
| 208 | 804 | $this->app->bind(UserTagModelContract::class, UserTagModel::class); |
|||
| 209 | 804 | $this->app->bind(UserTagCategoryModelContract::class, UserTagCategoryModel::class); |
|||
| 210 | 804 | $this->app->bind(RoleTagModelContract::class, RoleTagModel::class); |
|||
| 211 | 804 | $this->app->bind(RoleTagCategoryModelContract::class, RoleTagCategoryModel::class); |
|||
| 212 | 804 | $this->app->bind(PositionTagModelContract::class, PositionTagModel::class); |
|||
| 213 | 804 | $this->app->bind(PositionTagCategoryModelContract::class, PositionTagCategoryModel::class); |
|||
| 214 | |||||
| 215 | // Tag Repositories |
||||
| 216 | 804 | $this->app->bind(GroupTagRepositoryContract::class, GroupTagRepository::class); |
|||
| 217 | 804 | $this->app->bind(GroupTagCategoryRepositoryContract::class, GroupTagCategoryRepository::class); |
|||
| 218 | 804 | $this->app->bind(UserTagRepositoryContract::class, UserTagRepository::class); |
|||
| 219 | 804 | $this->app->bind(UserTagCategoryRepositoryContract::class, UserTagCategoryRepository::class); |
|||
| 220 | 804 | $this->app->bind(RoleTagRepositoryContract::class, RoleTagRepository::class); |
|||
| 221 | 804 | $this->app->bind(RoleTagCategoryRepositoryContract::class, RoleTagCategoryRepository::class); |
|||
| 222 | 804 | $this->app->bind(PositionTagRepositoryContract::class, PositionTagRepository::class); |
|||
| 223 | 804 | $this->app->bind(PositionTagCategoryRepositoryContract::class, PositionTagCategoryRepository::class); |
|||
| 224 | |||||
| 225 | // Additional Properties |
||||
| 226 | 804 | $this->app->singleton(AdditionalPropertyStore::class, AdditionalPropertySingletonStore::class); |
|||
| 227 | |||||
| 228 | // Pivot Repositories |
||||
| 229 | 804 | $this->app->bind(UserGroupContract::class, UserGroup::class); |
|||
| 230 | 804 | $this->app->bind(UserRoleContract::class, UserRole::class); |
|||
| 231 | 804 | $this->app->bind(GroupGroupTagContract::class, GroupGroupTag::class); |
|||
| 232 | 804 | $this->app->bind(UserUserTagContract::class, UserUserTag::class); |
|||
| 233 | 804 | $this->app->bind(RoleRoleTagContract::class, RoleRoleTag::class); |
|||
| 234 | 804 | $this->app->bind(PositionPositionTagContract::class, PositionPositionTag::class); |
|||
| 235 | |||||
| 236 | 804 | $this->app->singleton(ObserverStore::class); |
|||
| 237 | |||||
| 238 | 804 | } |
|||
| 239 | |||||
| 240 | 804 | public function registerCommands() |
|||
|
0 ignored issues
–
show
|
|||||
| 241 | { |
||||
| 242 | 804 | $this->commands([ |
|||
|
0 ignored issues
–
show
|
|||||
| 243 | 804 | SeedDatabase::class, |
|||
| 244 | ExportControlCommand::class, |
||||
| 245 | ]); |
||||
|
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
Loading history...
|
|||||
| 246 | 804 | } |
|||
| 247 | |||||
| 248 | 804 | public function setupRouteModelBinding() |
|||
|
0 ignored issues
–
show
|
|||||
| 249 | { |
||||
| 250 | 804 | Route::model('control_group', GroupModel::class); |
|||
| 251 | 804 | Route::model('control_role', RoleModel::class); |
|||
| 252 | 804 | Route::model('control_user', UserModel::class); |
|||
| 253 | 804 | Route::model('control_position', PositionModel::class); |
|||
| 254 | 804 | Route::model('control_group_tag', GroupTagModel::class); |
|||
| 255 | 804 | Route::model('control_role_tag', RoleTagModel::class); |
|||
| 256 | 804 | Route::model('control_user_tag', UserTagModel::class); |
|||
| 257 | 804 | Route::model('control_position_tag', PositionTagModel::class); |
|||
| 258 | 804 | Route::model('control_group_tag_category', GroupTagCategoryModel::class); |
|||
| 259 | 804 | Route::model('control_role_tag_category', RoleTagCategoryModel::class); |
|||
| 260 | 804 | Route::model('control_user_tag_category', UserTagCategoryModel::class); |
|||
| 261 | 804 | Route::model('control_position_tag_category', PositionTagCategoryModel::class); |
|||
| 262 | |||||
| 263 | Route::bind('control_group', function($id) { |
||||
|
0 ignored issues
–
show
|
|||||
| 264 | 16 | return app(GroupRepositoryContract::class)->getById($id); |
|||
| 265 | 804 | }); |
|||
|
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
Loading history...
|
|||||
| 266 | Route::bind('control_role', function($id) { |
||||
|
0 ignored issues
–
show
|
|||||
| 267 | 14 | return app(RoleRepositoryContract::class)->getById($id); |
|||
| 268 | 804 | }); |
|||
|
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
Loading history...
|
|||||
| 269 | Route::bind('control_user', function($id) { |
||||
|
0 ignored issues
–
show
|
|||||
| 270 | 19 | return app(UserRepositoryContract::class)->getById($id); |
|||
| 271 | 804 | }); |
|||
|
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
Loading history...
|
|||||
| 272 | Route::bind('control_position', function($id) { |
||||
|
0 ignored issues
–
show
|
|||||
| 273 | 11 | return app(PositionRepositoryContract::class)->getById($id); |
|||
| 274 | 804 | }); |
|||
|
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
Loading history...
|
|||||
| 275 | |||||
| 276 | Route::bind('control_group_tag', function($id) { |
||||
|
0 ignored issues
–
show
|
|||||
| 277 | 9 | return app(GroupTagRepositoryContract::class)->getById($id); |
|||
| 278 | 804 | }); |
|||
|
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
Loading history...
|
|||||
| 279 | Route::bind('control_role_tag', function($id) { |
||||
|
0 ignored issues
–
show
|
|||||
| 280 | 9 | return app(RoleTagRepositoryContract::class)->getById($id); |
|||
| 281 | 804 | }); |
|||
|
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
Loading history...
|
|||||
| 282 | Route::bind('control_user_tag', function($id) { |
||||
|
0 ignored issues
–
show
|
|||||
| 283 | 9 | return app(UserTagRepositoryContract::class)->getById($id); |
|||
| 284 | 804 | }); |
|||
|
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
Loading history...
|
|||||
| 285 | Route::bind('control_position_tag', function($id) { |
||||
|
0 ignored issues
–
show
|
|||||
| 286 | 9 | return app(PositionTagRepositoryContract::class)->getById($id); |
|||
| 287 | 804 | }); |
|||
|
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
Loading history...
|
|||||
| 288 | |||||
| 289 | Route::bind('control_group_tag_category', function($id) { |
||||
|
0 ignored issues
–
show
|
|||||
| 290 | 4 | return app(GroupTagCategoryRepositoryContract::class)->getById($id); |
|||
| 291 | 804 | }); |
|||
|
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
Loading history...
|
|||||
| 292 | Route::bind('control_role_tag_category', function($id) { |
||||
|
0 ignored issues
–
show
|
|||||
| 293 | 4 | return app(RoleTagCategoryRepositoryContract::class)->getById($id); |
|||
| 294 | 804 | }); |
|||
|
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
Loading history...
|
|||||
| 295 | Route::bind('control_user_tag_category', function($id) { |
||||
|
0 ignored issues
–
show
|
|||||
| 296 | 4 | return app(UserTagCategoryRepositoryContract::class)->getById($id); |
|||
| 297 | 804 | }); |
|||
|
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
Loading history...
|
|||||
| 298 | Route::bind('control_position_tag_category', function($id) { |
||||
|
0 ignored issues
–
show
|
|||||
| 299 | 4 | return app(PositionTagCategoryRepositoryContract::class)->getById($id); |
|||
| 300 | 804 | }); |
|||
|
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
Loading history...
|
|||||
| 301 | 804 | } |
|||
| 302 | |||||
| 303 | 804 | public function setupRoutes() |
|||
|
0 ignored issues
–
show
|
|||||
| 304 | { |
||||
| 305 | 804 | Route::prefix(config('control.api_prefix')) |
|||
| 306 | 804 | ->middleware(config('control.api_middleware')) |
|||
| 307 | 804 | ->namespace('BristolSU\ControlDB\Http\Controllers') |
|||
| 308 | 804 | ->group(__DIR__ . '/../routes/api.php'); |
|||
| 309 | 804 | } |
|||
| 310 | |||||
| 311 | 804 | private function setupObservers() |
|||
|
0 ignored issues
–
show
|
|||||
| 312 | { |
||||
| 313 | 804 | Observe::attach(RoleRepositoryContract::class, RoleObserverClearCache::class); |
|||
| 314 | 804 | Observe::attach(UserRepositoryContract::class, UserObserverClearCache::class); |
|||
| 315 | 804 | Observe::attach(GroupRepositoryContract::class, GroupObserverClearCache::class); |
|||
| 316 | 804 | Observe::attach(PositionRepositoryContract::class, PositionObserverClearCache::class); |
|||
| 317 | |||||
| 318 | 804 | Observe::attach(DataUserRepositoryContract::class, DataUserObserverClearCache::class); |
|||
| 319 | 804 | Observe::attach(DataGroupRepositoryContract::class, DataGroupObserverClearCache::class); |
|||
| 320 | 804 | Observe::attach(DataRoleRepositoryContract::class, DataRoleObserverClearCache::class); |
|||
| 321 | 804 | Observe::attach(DataPositionRepositoryContract::class, DataPositionObserverClearCache::class); |
|||
| 322 | |||||
| 323 | 804 | Observe::attach(GroupTagRepositoryContract::class, GroupTagObserverClearCache::class); |
|||
| 324 | 804 | Observe::attach(RoleTagRepositoryContract::class, RoleTagObserverClearCache::class); |
|||
| 325 | 804 | Observe::attach(UserTagRepositoryContract::class, UserTagObserverClearCache::class); |
|||
| 326 | 804 | Observe::attach(PositionTagRepositoryContract::class, PositionTagObserverClearCache::class); |
|||
| 327 | |||||
| 328 | 804 | Observe::attach(GroupTagCategoryRepositoryContract::class, GroupTagCategoryObserverClearCache::class); |
|||
| 329 | 804 | Observe::attach(RoleTagCategoryRepositoryContract::class, RoleTagCategoryObserverClearCache::class); |
|||
| 330 | 804 | Observe::attach(UserTagCategoryRepositoryContract::class, UserTagCategoryObserverClearCache::class); |
|||
| 331 | 804 | Observe::attach(PositionTagCategoryRepositoryContract::class, PositionTagCategoryObserverClearCache::class); |
|||
| 332 | |||||
| 333 | 804 | Observe::attach(UserGroupContract::class, UserGroupObserverClearCache::class); |
|||
| 334 | 804 | Observe::attach(UserRoleContract::class, UserRoleObserverClearCache::class); |
|||
| 335 | |||||
| 336 | 804 | Observe::attach(GroupGroupTagContract::class, GroupGroupTagObserverClearCache::class); |
|||
| 337 | 804 | Observe::attach(UserUserTagContract::class, UserUserTagObserverClearCache::class); |
|||
| 338 | 804 | Observe::attach(RoleRoleTagContract::class, RoleRoleTagObserverClearCache::class); |
|||
| 339 | 804 | Observe::attach(PositionPositionTagContract::class, PositionPositionTagObserverClearCache::class); |
|||
| 340 | |||||
| 341 | 804 | Observe::attach(GroupTagRepositoryContract::class, GroupTagObserverCascadeDelete::class); |
|||
| 342 | 804 | Observe::attach(UserTagRepositoryContract::class, UserTagObserverCascadeDelete::class); |
|||
| 343 | 804 | Observe::attach(RoleTagRepositoryContract::class, RoleTagObserverCascadeDelete::class); |
|||
| 344 | 804 | Observe::attach(PositionTagRepositoryContract::class, PositionTagObserverCascadeDelete::class); |
|||
| 345 | |||||
| 346 | 804 | Observe::attach(GroupTagCategoryRepositoryContract::class, GroupTagCategoryObserverCascadeDelete::class); |
|||
| 347 | 804 | Observe::attach(UserTagCategoryRepositoryContract::class, UserTagCategoryObserverCascadeDelete::class); |
|||
| 348 | 804 | Observe::attach(RoleTagCategoryRepositoryContract::class, RoleTagCategoryObserverCascadeDelete::class); |
|||
| 349 | 804 | Observe::attach(PositionTagCategoryRepositoryContract::class, PositionTagCategoryObserverCascadeDelete::class); |
|||
| 350 | |||||
| 351 | 804 | Observe::attach(RoleRepositoryContract::class, RoleObserverCascadeDelete::class); |
|||
| 352 | 804 | Observe::attach(UserRepositoryContract::class, UserObserverCascadeDelete::class); |
|||
| 353 | 804 | Observe::attach(GroupRepositoryContract::class, GroupObserverCascadeDelete::class); |
|||
| 354 | 804 | Observe::attach(PositionRepositoryContract::class, PositionObserverCascadeDelete::class); |
|||
| 355 | 804 | } |
|||
| 356 | |||||
| 357 | |||||
| 358 | } |