Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3921577
D431.id1046.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
7 KB
Referenced Files
None
Subscribers
None
D431.id1046.diff
View Options
diff --git a/app/Console/Commands/AccountDump.php b/app/Console/Commands/AccountDump.php
--- a/app/Console/Commands/AccountDump.php
+++ b/app/Console/Commands/AccountDump.php
@@ -5,8 +5,8 @@
use Illuminate\Console\Command;
use AuthGrove\Models\User;
-class AccountDump extends Command
-{
+class AccountDump extends Command {
+
/**
* The name and signature of the console command.
*
@@ -26,18 +26,16 @@
*
* @return void
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct();
}
-
+
/**
* Execute the console command.
*
* @return mixed
*/
- public function handle()
- {
+ public function handle() {
$format = $this->option('format');
$attributes = User::getDefaultAttributes();
@@ -57,4 +55,5 @@
$this->error("Unknown format: $format");
}
}
+
}
diff --git a/app/Console/Commands/AccountInfo.php b/app/Console/Commands/AccountInfo.php
--- a/app/Console/Commands/AccountInfo.php
+++ b/app/Console/Commands/AccountInfo.php
@@ -5,8 +5,8 @@
use Illuminate\Console\Command;
use AuthGrove\Console\Services\AccountHelpers as AccountHelpers;
-class AccountInfo extends Command
-{
+class AccountInfo extends Command {
+
/**
* The name and signature of the console command.
*
@@ -32,8 +32,7 @@
*
* @return void
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct();
}
@@ -57,8 +56,7 @@
*
* @return mixed
*/
- public function handle()
- {
+ public function handle() {
$format = $this->option('format');
$user = AccountHelpers::findUser($this->argument('user'));
@@ -84,4 +82,5 @@
$this->error("Unknown format: $format");
}
}
+
}
diff --git a/app/Console/Commands/AccountReset.php b/app/Console/Commands/AccountReset.php
--- a/app/Console/Commands/AccountReset.php
+++ b/app/Console/Commands/AccountReset.php
@@ -9,8 +9,8 @@
use AuthGrove\Console\Services\AccountHelpers;
-class AccountReset extends Command
-{
+class AccountReset extends Command {
+
/**
* The name and signature of the console command.
*
@@ -37,8 +37,7 @@
*
* @return void
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct();
}
@@ -91,8 +90,7 @@
*
* @return mixed
*/
- public function handle()
- {
+ public function handle() {
//Gets the information
$user = AccountHelpers::findUser($this->argument('user'));
if ($user === null) {
@@ -128,4 +126,6 @@
$this->error("Unknown format: $format");
}
}
+
+
}
diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php
--- a/app/Console/Kernel.php
+++ b/app/Console/Kernel.php
@@ -5,29 +5,28 @@
class Kernel extends ConsoleKernel {
- /**
- * The Artisan commands provided by your application.
- *
- * @var array
- */
- protected $commands = [
- 'AuthGrove\Console\Commands\AccountInfo',
- 'AuthGrove\Console\Commands\AccountDump',
- 'AuthGrove\Console\Commands\AccountReset',
- 'AuthGrove\Console\Commands\Inspire',
- 'AuthGrove\Console\Commands\DatabaseShell',
- ];
+ /**
+ * The Artisan commands provided by your application.
+ *
+ * @var array
+ */
+ protected $commands = [
+ 'AuthGrove\Console\Commands\AccountInfo',
+ 'AuthGrove\Console\Commands\AccountDump',
+ 'AuthGrove\Console\Commands\AccountReset',
+ 'AuthGrove\Console\Commands\Inspire',
+ 'AuthGrove\Console\Commands\DatabaseShell',
+ ];
- /**
- * Define the application's command schedule.
- *
- * @param \Illuminate\Console\Scheduling\Schedule $schedule
- * @return void
- */
- protected function schedule(Schedule $schedule)
- {
- $schedule->command('inspire')
- ->hourly();
- }
+ /**
+ * Define the application's command schedule.
+ *
+ * @param \Illuminate\Console\Scheduling\Schedule $schedule
+ * @return void
+ */
+ protected function schedule(Schedule $schedule) {
+ $schedule->command('inspire')
+ ->hourly();
+ }
}
diff --git a/app/Console/Services/AccountHelpers.php b/app/Console/Services/AccountHelpers.php
--- a/app/Console/Services/AccountHelpers.php
+++ b/app/Console/Services/AccountHelpers.php
@@ -42,4 +42,5 @@
}
return $localizedString;
}
+
}
diff --git a/app/Models/User.php b/app/Models/User.php
--- a/app/Models/User.php
+++ b/app/Models/User.php
@@ -37,60 +37,60 @@
*/
protected $hidden = ['password', 'remember_token'];
- /**
- * Gets fillable but not hidden attributes, plus create/update time
- *
- * @return Array
- */
- public function getAttributes () {
- $attributes = array_diff($this->fillable , $this->hidden);
- $attributes[] = 'created_at';
- $attributes[] = 'updated_at';
- array_unshift($attributes, 'id');
- return $attributes;
- }
+ /**
+ * Gets fillable but not hidden attributes, plus create/update time
+ *
+ * @return Array
+ */
+ public function getAttributes () {
+ $attributes = array_diff($this->fillable , $this->hidden);
+ $attributes[] = 'created_at';
+ $attributes[] = 'updated_at';
+ array_unshift($attributes, 'id');
+ return $attributes;
+ }
- /**
- * Localizes attribute
- *
- * @param string $attribute The attribute to localize
- * @return string The localized name of the attribute
- */
- public static function localizeAttribute ($attribute) {
- return trans("panel.user-attributes.$attribute");
- }
+ /**
+ * Localizes attribute
+ *
+ * @param string $attribute The attribute to localize
+ * @return string The localized name of the attribute
+ */
+ public static function localizeAttribute ($attribute) {
+ return trans("panel.user-attributes.$attribute");
+ }
- /**
- * Gets default attributes
- *
- * @return Array an array of string, each a default attribute of the model
- */
- public static function getDefaultAttributes () {
- $user = new self();
- return $user->getAttributes();
- }
+ /**
+ * Gets default attributes
+ *
+ * @return Array an array of string, each a default attribute of the model
+ */
+ public static function getDefaultAttributes () {
+ $user = new self();
+ return $user->getAttributes();
+ }
- /**
- * Gets non sensible properties
- *
- * @return Array
- */
- public function getInformation () {
- $info = [];
- $attributes = $this->getAttributes();
- foreach ($attributes as $attribute) {
- $info[$attribute] = $this->attributes[$attribute];
- }
- return $info;
- }
+ /**
+ * Gets non sensible properties
+ *
+ * @return Array
+ */
+ public function getInformation () {
+ $info = [];
+ $attributes = $this->getAttributes();
+ foreach ($attributes as $attribute) {
+ $info[$attribute] = $this->attributes[$attribute];
+ }
+ return $info;
+ }
- /**
- * Gets the full name of an user, or if not defined, the username.
- */
- public function getName () {
- if ($this->attributes['fullname'] !== "") {
- return $this->attributes['fullname'];
- }
- return $this->attributes['username'];
- }
+ /**
+ * Gets the full name of an user, or if not defined, the username.
+ */
+ public function getName () {
+ if ($this->attributes['fullname'] !== "") {
+ return $this->attributes['fullname'];
+ }
+ return $this->attributes['username'];
+ }
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 22:06 (19 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2309738
Default Alt Text
D431.id1046.diff (7 KB)
Attached To
Mode
D431: Whitespace issues
Attached
Detach File
Event Timeline
Log In to Comment