Apply fixes from StyleCI

This commit is contained in:
2020-10-21 00:01:41 +00:00
committed by StyleCI Bot
parent 53c23f3698
commit 773ec570d9
218 changed files with 5137 additions and 1672 deletions

View File

@@ -1,5 +1,24 @@
<?php
/*
* Copyright © 2020 Miguel Nogueira
*
* This file is part of Raspberry Staff Manager.
*
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Raspberry Staff Manager is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
*/
use App\Profile;
use App\User;
use Illuminate\Database\Seeder;
@@ -22,7 +41,7 @@ class UserSeeder extends Seeder
'email' => 'tester1@example.com',
'username' => 'tester1',
'originalIP' => '99.18.146.235',
'password' => Hash::make('password')
'password' => Hash::make('password'),
],
[
'uuid' => 'ab22b5da02644953ace969fce85c0819',
@@ -30,7 +49,7 @@ class UserSeeder extends Seeder
'email' => 'tester2@example.com',
'username' => 'tester2',
'originalIP' => '141.239.229.53',
'password' => Hash::make('password')
'password' => Hash::make('password'),
],
[
'uuid' => 'df38e6bf762944d3a600ded59a693ad1',
@@ -38,7 +57,7 @@ class UserSeeder extends Seeder
'email' => 'tester3@example.com',
'username' => 'tester3',
'originalIP' => '25.63.20.97',
'password' => Hash::make('password')
'password' => Hash::make('password'),
],
[
'uuid' => '689e446484824f6bad5064e3df0aaa96',
@@ -46,7 +65,7 @@ class UserSeeder extends Seeder
'email' => 'tester4@example.com',
'username' => 'tester4',
'originalIP' => '220.105.223.142',
'password' => Hash::make('password')
'password' => Hash::make('password'),
],
[
'uuid' => '172391f917bf418ab1c40ebc041ed5ba',
@@ -54,7 +73,7 @@ class UserSeeder extends Seeder
'email' => 'tester5@example.com',
'username' => 'tester5',
'originalIP' => '224.66.76.60',
'password' => Hash::make('password')
'password' => Hash::make('password'),
],
[
'uuid' => '371f34dcce2a4457bf385ab9417a2345',
@@ -62,7 +81,7 @@ class UserSeeder extends Seeder
'email' => 'tester6@example.com',
'username' => 'tester6',
'originalIP' => '97.113.131.0',
'password' => Hash::make('password')
'password' => Hash::make('password'),
],
[
'uuid' => '89aa5222855542bebe7a7780248ef5f9',
@@ -70,7 +89,7 @@ class UserSeeder extends Seeder
'email' => 'tester7@example.com',
'username' => 'tester7',
'originalIP' => '15.160.137.222',
'password' => Hash::make('password')
'password' => Hash::make('password'),
],
];
@@ -83,7 +102,7 @@ class UserSeeder extends Seeder
'email' => 'user1@example.com',
'username' => 'user1',
'originalIP' => '253.25.237.78',
'password' => Hash::make('password')
'password' => Hash::make('password'),
],
[
'uuid' => '5f900018241e4aaba7883f2d5c5c2357',
@@ -91,7 +110,7 @@ class UserSeeder extends Seeder
'email' => 'user2@example.com',
'username' => 'user2',
'originalIP' => '82.92.156.176',
'password' => Hash::make('password')
'password' => Hash::make('password'),
],
[
'uuid' => 'ba9780c3270745c6840eaabe1bf8aa14',
@@ -99,34 +118,31 @@ class UserSeeder extends Seeder
'email' => 'user3@example.com',
'username' => 'user3',
'originalIP' => '224.123.129.17',
'password' => Hash::make('password')
]
'password' => Hash::make('password'),
],
];
foreach ($regularUsers as $regularUser)
{
foreach ($regularUsers as $regularUser) {
$user = User::create($regularUser);
Profile::create([
'profileShortBio' => 'Random data ' . rand(0,1000),
'profileAboutMe' => 'Random data ' . rand(0, 1000),
'socialLinks' => "[]", // empty json set, not an array
'profileShortBio' => 'Random data '.rand(0, 1000),
'profileAboutMe' => 'Random data '.rand(0, 1000),
'socialLinks' => '[]', // empty json set, not an array
'avatarPreference' => 'gravatar',
'userID' => $user->id
'userID' => $user->id,
]);
}
foreach($staffUsers as $staffUser)
{
foreach ($staffUsers as $staffUser) {
$user = User::create($staffUser);
Profile::create([
'profileShortBio' => 'Random data ' . rand(0,1000),
'profileAboutMe' => 'Random data ' . rand(0, 1000),
'socialLinks' => "[]",
'profileShortBio' => 'Random data '.rand(0, 1000),
'profileAboutMe' => 'Random data '.rand(0, 1000),
'socialLinks' => '[]',
'avatarPreference' => 'gravatar',
'userID' => $user->id
'userID' => $user->id,
]);
}
User::create([
@@ -135,11 +151,10 @@ class UserSeeder extends Seeder
'email' => 'admin@example.com',
'username' => 'admin',
'originalIP' => '192.168.1.2',
'password' => Hash::make('password')
'password' => Hash::make('password'),
]);
foreach (User::all() as $user)
{
foreach (User::all() as $user) {
$user->assignRole('reviewer', 'user');
}
}