Skip to content

Commit 825e8b2

Browse files
committed
cleaning up code and comments.
1 parent a77196d commit 825e8b2

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

laravel/session/drivers/cookie.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<?php namespace Laravel\Session\Drivers;
2-
3-
use Laravel\Crypter;
1+
<?php namespace Laravel\Session\Drivers; use Laravel\Crypter, Laravel\Cookie as C;
42

53
class Cookie extends Driver {
64

@@ -21,9 +19,9 @@ class Cookie extends Driver {
2119
*/
2220
public function load($id)
2321
{
24-
if (\Laravel\Cookie::has(Cookie::payload))
22+
if (C::has(Cookie::payload))
2523
{
26-
return unserialize(Crypter::decrypt(\Laravel\Cookie::get(Cookie::payload)));
24+
return unserialize(Crypter::decrypt(C::get(Cookie::payload)));
2725
}
2826
}
2927

@@ -41,7 +39,7 @@ public function save($session, $config, $exists)
4139

4240
$payload = Crypter::encrypt(serialize($session));
4341

44-
\Laravel\Cookie::put(Cookie::payload, $payload, $lifetime, $path, $domain);
42+
C::put(Cookie::payload, $payload, $lifetime, $path, $domain);
4543
}
4644

4745
/**
@@ -52,7 +50,7 @@ public function save($session, $config, $exists)
5250
*/
5351
public function delete($id)
5452
{
55-
\Laravel\Cookie::forget(Cookie::payload);
53+
C::forget(Cookie::payload);
5654
}
5755

5856
}

laravel/session/drivers/driver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ abstract public function save($session, $config, $exists);
3131
abstract public function delete($id);
3232

3333
/**
34-
* Insert a fresh session and return the payload array.
34+
* Create a fresh session array with a unique ID.
3535
*
3636
* @return array
3737
*/

laravel/session/payload.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,9 @@ public function save()
298298
// session on the user's subsequent requests to the application.
299299
$this->cookie($config);
300300

301-
// Some session drivers implement the Sweeper interface, meaning that
301+
// Some session drivers implement the Sweeper interface meaning that
302302
// they must clean up expired sessions manually. If the driver is a
303-
// sweeper, we need to determine if garbage collection should be
304-
// run for the request.
303+
// sweeper, we'll calculate if we need to run garbage collection.
305304
$sweepage = $config['sweepage'];
306305

307306
if ($this->driver instanceof Sweeper and (mt_rand(1, $sweepage[1]) <= $sweepage[0]))

0 commit comments

Comments
 (0)