FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

PSR-2 · JavaDevl/framework@b3c65c7 · GitHub

PSR-2 · JavaDevl/framework@b3c65c7 · GitHub
Skip to content

Navigation Menu

Repository navigation

Commit b3c65c7

Browse files
Graham Campbell
committed
PSR-2
Signed-off-by: Graham Campbell <graham@cachethq.io>
1 parent 2e4b417 commit b3c65c7

612 files changed

Lines changed: 4804 additions & 6555 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎src/Illuminate/Auth/AuthManager.php‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
use Illuminate\Support\Manager;
44

5-
class AuthManager extends Manager {
6-
5+
class AuthManager extends Manager
6+
{
77
/**
88
* Create a new driver instance.
99
*
@@ -34,8 +34,7 @@ protected function callCustomCreator($driver)
3434
{
3535
$custom = parent::callCustomCreator($driver);
3636

37-
if ($custom instanceof Guard)
38-
{
37+
if ($custom instanceof Guard) {
3938
return $custom;
4039
}
4140

@@ -115,5 +114,4 @@ public function setDefaultDriver($name)
115114
{
116115
$this->app['config']['auth.driver'] = $name;
117116
}
118-
119117
}

‎src/Illuminate/Auth/AuthServiceProvider.php‎

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
use Illuminate\Support\ServiceProvider;
44

5-
class AuthServiceProvider extends ServiceProvider {
6-
5+
class AuthServiceProvider extends ServiceProvider
6+
{
77
/**
88
* Register the service provider.
99
*
@@ -25,8 +25,7 @@ public function register()
2525
*/
2626
protected function registerAuthenticator()
2727
{
28-
$this->app->singleton('auth', function($app)
29-
{
28+
$this->app->singleton('auth', function ($app) {
3029
// Once the authentication service has actually been requested by the developer
3130
// we will set a variable in the application indicating such. This helps us
3231
// know that we need to set any queued cookies in the after event later.
@@ -35,8 +34,7 @@ protected function registerAuthenticator()
3534
return new AuthManager($app);
3635
});
3736

38-
$this->app->singleton('auth.driver', function($app)
39-
{
37+
$this->app->singleton('auth.driver', function ($app) {
4038
return $app['auth']->driver();
4139
});
4240
}
@@ -48,8 +46,7 @@ protected function registerAuthenticator()
4846
*/
4947
protected function registerUserResolver()
5048
{
51-
$this->app->bind('Illuminate\Contracts\Auth\Authenticatable', function($app)
52-
{
49+
$this->app->bind('Illuminate\Contracts\Auth\Authenticatable', function ($app) {
5350
return $app['auth']->user();
5451
});
5552
}
@@ -61,13 +58,10 @@ protected function registerUserResolver()
6158
*/
6259
protected function registerRequestRebindHandler()
6360
{
64-
$this->app->rebinding('request', function($app, $request)
65-
{
66-
$request->setUserResolver(function() use ($app)
67-
{
61+
$this->app->rebinding('request', function ($app, $request) {
62+
$request->setUserResolver(function () use ($app) {
6863
return $app['auth']->user();
6964
});
7065
});
7166
}
72-
7367
}

‎src/Illuminate/Auth/Authenticatable.php‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php namespace Illuminate\Auth;
22

3-
trait Authenticatable {
4-
3+
trait Authenticatable
4+
{
55
/**
66
* Get the unique identifier for the user.
77
*
@@ -52,5 +52,4 @@ public function getRememberTokenName()
5252
{
5353
return 'remember_token';
5454
}
55-
5655
}

‎src/Illuminate/Auth/Console/ClearResetsCommand.php‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
use Illuminate\Console\Command;
44

5-
class ClearResetsCommand extends Command {
6-
5+
class ClearResetsCommand extends Command
6+
{
77
/**
88
* The console command name.
99
*
@@ -29,5 +29,4 @@ public function fire()
2929

3030
$this->info('Expired reset tokens cleared!');
3131
}
32-
3332
}

‎src/Illuminate/Auth/DatabaseUserProvider.php‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
use Illuminate\Contracts\Hashing\Hasher as HasherContract;
66
use Illuminate\Contracts\Auth\Authenticatable as UserContract;
77

8-
class DatabaseUserProvider implements UserProvider {
9-
8+
class DatabaseUserProvider implements UserProvider
9+
{
1010
/**
1111
* The active database connection.
1212
*
@@ -100,10 +100,8 @@ public function retrieveByCredentials(array $credentials)
100100
// generic "user" object that will be utilized by the Guard instances.
101101
$query = $this->conn->table($this->table);
102102

103-
foreach ($credentials as $key => $value)
104-
{
105-
if ( ! str_contains($key, 'password'))
106-
{
103+
foreach ($credentials as $key => $value) {
104+
if (! str_contains($key, 'password')) {
107105
$query->where($key, $value);
108106
}
109107
}
@@ -124,8 +122,7 @@ public function retrieveByCredentials(array $credentials)
124122
*/
125123
protected function getGenericUser($user)
126124
{
127-
if ($user !== null)
128-
{
125+
if ($user !== null) {
129126
return new GenericUser((array) $user);
130127
}
131128
}
@@ -143,5 +140,4 @@ public function validateCredentials(UserContract $user, array $credentials)
143140

144141
return $this->hasher->check($plain, $user->getAuthPassword());
145142
}
146-
147143
}

‎src/Illuminate/Auth/EloquentUserProvider.php‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
use Illuminate\Contracts\Hashing\Hasher as HasherContract;
55
use Illuminate\Contracts\Auth\Authenticatable as UserContract;
66

7-
class EloquentUserProvider implements UserProvider {
8-
7+
class EloquentUserProvider implements UserProvider
8+
{
99
/**
1010
* The hasher implementation.
1111
*
@@ -88,10 +88,8 @@ public function retrieveByCredentials(array $credentials)
8888
// Eloquent User "model" that will be utilized by the Guard instances.
8989
$query = $this->createModel()->newQuery();
9090

91-
foreach ($credentials as $key => $value)
92-
{
93-
if ( ! str_contains($key, 'password'))
94-
{
91+
foreach ($credentials as $key => $value) {
92+
if (! str_contains($key, 'password')) {
9593
$query->where($key, $value);
9694
}
9795
}
@@ -124,5 +122,4 @@ public function createModel()
124122

125123
return new $class;
126124
}
127-
128125
}

‎src/Illuminate/Auth/GeneratorServiceProvider.php‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
use Illuminate\Support\ServiceProvider;
44
use Illuminate\Auth\Console\ClearResetsCommand;
55

6-
class GeneratorServiceProvider extends ServiceProvider {
7-
6+
class GeneratorServiceProvider extends ServiceProvider
7+
{
88
/**
99
* Indicates if loading of the provider is deferred.
1010
*
@@ -28,8 +28,7 @@ class GeneratorServiceProvider extends ServiceProvider {
2828
*/
2929
public function register()
3030
{
31-
foreach ($this->commands as $command)
32-
{
31+
foreach ($this->commands as $command) {
3332
$this->{"register{$command}Command"}();
3433
}
3534

@@ -45,8 +44,7 @@ public function register()
4544
*/
4645
protected function registerClearResetsCommand()
4746
{
48-
$this->app->singleton('command.auth.resets.clear', function()
49-
{
47+
$this->app->singleton('command.auth.resets.clear', function () {
5048
return new ClearResetsCommand;
5149
});
5250
}
@@ -62,5 +60,4 @@ public function provides()
6260
'command.auth.resets.clear',
6361
];
6462
}
65-
6663
}

‎src/Illuminate/Auth/GenericUser.php‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
use Illuminate\Contracts\Auth\Authenticatable as UserContract;
44

5-
class GenericUser implements UserContract {
6-
5+
class GenericUser implements UserContract
6+
{
77
/**
88
* All of the user's attributes.
99
*
@@ -117,5 +117,4 @@ public function __unset($key)
117117
{
118118
unset($this->attributes[$key]);
119119
}
120-
121120
}

0 commit comments

Comments
 (0)

Footer

© 2026 GitHub, Inc.

Back | FazBrowse Home | New Git URL