Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
af170af1
Commit
af170af1
authored
Jan 25, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
overall code quality audit.
parent
45969e35
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
11 additions
and
92 deletions
+11
-92
autoloader.php
laravel/autoloader.php
+1
-1
console.php
laravel/cli/console.php
+0
-2
bundler.php
laravel/cli/tasks/bundle/bundler.php
+0
-4
publisher.php
laravel/cli/tasks/bundle/publisher.php
+1
-1
database.php
laravel/cli/tasks/migrate/database.php
+1
-1
session.php
laravel/cli/tasks/session.php
+0
-69
file.php
laravel/file.php
+2
-2
helpers.php
laravel/helpers.php
+1
-1
ioc.php
laravel/ioc.php
+0
-5
log.php
laravel/log.php
+1
-1
paginator.php
laravel/paginator.php
+4
-5
No files found.
laravel/autoloader.php
View file @
af170af1
...
...
@@ -116,7 +116,7 @@ class Autoloader {
//
// We will check for both lowercase and CamelCase files as
// Laravel uses a lowercase version of PSR-0, while true
// PSR-0 uses CamelCase for file names.
// PSR-0 uses CamelCase for
all
file names.
foreach
(
$directories
as
$directory
)
{
if
(
file_exists
(
$path
=
$directory
.
strtolower
(
$file
)
.
EXT
))
...
...
laravel/cli/console.php
View file @
af170af1
...
...
@@ -5,8 +5,6 @@ class Console {
/**
* Parse the command line arguments and return the results.
*
* The returned array contains the arguments and the options.
*
* @param array $argv
* @param array
*/
...
...
laravel/cli/tasks/bundle/bundler.php
View file @
af170af1
...
...
@@ -73,10 +73,6 @@ class Bundler extends Task {
$repository
=
IoC
::
resolve
(
'bundle.repository'
);
// This method is primarily responsible for gathering the data
// for all bundles that need to be installed. This allows us
// to verify the existence of the bundle before even getting
// started on the actual installation process.
foreach
(
$bundles
as
$bundle
)
{
// First we'll call the bundle repository to gather the bundle data
...
...
laravel/cli/tasks/bundle/publisher.php
View file @
af170af1
...
...
@@ -32,7 +32,7 @@ class Publisher {
*/
protected
function
move
(
$source
,
$destination
)
{
File
::
c
opy_
dir
(
$source
,
$destination
);
File
::
c
p
dir
(
$source
,
$destination
);
}
/**
...
...
laravel/cli/tasks/migrate/database.php
View file @
af170af1
...
...
@@ -78,7 +78,7 @@ class Database {
*/
protected
function
table
()
{
return
DB
::
connection
()
->
table
(
'laravel_migrations'
);
return
DB
::
connection
(
Request
::
server
(
'cli.db'
)
)
->
table
(
'laravel_migrations'
);
}
}
\ No newline at end of file
laravel/cli/tasks/session.php
deleted
100644 → 0
View file @
45969e35
<?php
namespace
Laravel\CLI\Tasks\Session
;
use
Laravel\File
;
use
Laravel\Config
;
use
Laravel\Database\Schema
;
use
Laravel\Session\Drivers\Sweeper
;
class
Manager
extends
Task
{
/**
* Generate the session table on the database.
*
* @param array $arguments
* @return void
*/
public
function
table
(
$arguments
=
array
())
{
Schema
::
table
(
Config
::
get
(
'session.table'
),
function
(
$table
)
{
$table
->
create
();
// The session table consists simply of an ID, a UNIX timestamp to
// indicate the expiration time, and a blob field which will hold
// the serialized form of the session payload.
$table
->
string
(
'id'
)
->
length
(
40
)
->
primary
(
'session_primary'
);
$table
->
integer
(
'last_activity'
);
$table
->
text
(
'data'
);
});
// By default no session driver is specified in the configuration.
// Since the developer is requesting that the session table be
// created on the database, we'll set the driver to database
// to save an extra step for the developer.
$config
=
File
::
get
(
APP_PATH
.
'config/session'
.
EXT
);
$config
=
str_replace
(
"'driver' => '',"
,
"'driver' => 'database',"
,
$config
);
File
::
put
(
APP_PATH
.
'config/session'
.
EXT
,
$config
);
echo
"The table has been created! Database set as session driver."
;
}
/**
* Sweep the expired sessions from storage.
*
* @param array $arguments
* @return void
*/
public
function
sweep
(
$arguments
=
array
())
{
$driver
=
\Laravel\Session
::
factory
(
Config
::
get
(
'session.driver'
));
// If the driver implements the "Sweeper" interface, we know that
// it can sweep expired sessions from storage. Not all drivers
// need be sweepers, as stores like Memcached and APC will
// perform their own garbage collection.
if
(
$driver
instanceof
Sweeper
)
{
$lifetime
=
Config
::
get
(
'session.lifetime'
);
$driver
->
sweep
(
time
()
-
(
$lifetime
*
60
));
}
echo
"The session table has been swept!"
;
}
}
\ No newline at end of file
laravel/file.php
View file @
af170af1
...
...
@@ -181,7 +181,7 @@ class File {
* @param string $destination
* @return void
*/
public
static
function
c
opy_
dir
(
$source
,
$destination
)
public
static
function
c
p
dir
(
$source
,
$destination
)
{
if
(
!
is_dir
(
$source
))
return
;
...
...
@@ -207,7 +207,7 @@ class File {
{
$path
=
$item
->
getRealPath
();
static
::
c
opy_
dir
(
$path
,
$location
);
static
::
c
p
dir
(
$path
,
$location
);
}
// If the file system item is an actual file, we can copy the
// file from the bundle asset directory to the public asset
...
...
laravel/helpers.php
View file @
af170af1
...
...
@@ -21,7 +21,7 @@ function e($value)
* @param string $language
* @return string
*/
function
__
(
$key
,
$replacements
=
array
(),
$language
=
null
)
function
lang
(
$key
,
$replacements
=
array
(),
$language
=
null
)
{
return
Laravel\Lang
::
line
(
$key
,
$replacements
,
$language
);
}
...
...
laravel/ioc.php
View file @
af170af1
...
...
@@ -124,11 +124,6 @@ class IoC {
return
static
::
$singletons
[
$name
];
}
if
(
!
static
::
registered
(
$name
))
{
throw
new
\Exception
(
"Error resolving [
$name
]. No resolver has been registered."
);
}
$object
=
call_user_func
(
static
::
$registry
[
$name
][
'resolver'
],
$parameters
);
// If the resolver is registering as a singleton resolver, we will cache
...
...
laravel/log.php
View file @
af170af1
...
...
@@ -43,7 +43,7 @@ class Log {
{
$message
=
date
(
'Y-m-d H:i:s'
)
.
' '
.
Str
::
upper
(
$type
)
.
" -
{
$message
}
"
.
PHP_EOL
;
File
::
append
(
STORAGE_PATH
.
'logs/'
.
date
(
'Y-m'
)
.
'.log'
,
$message
);
File
::
append
(
STORAGE_PATH
.
'logs/'
.
date
(
'Y-m
-d
'
)
.
'.log'
,
$message
);
}
/**
...
...
laravel/paginator.php
View file @
af170af1
...
...
@@ -375,17 +375,16 @@ class Paginator {
}
/**
* Create the "appendage" that should be attached to every pagination link.
*
* The developer may assign an array of values that will be converted to a
* query string and attached to every pagination link. This allows simple
* implementation of sorting or other things the developer may need.
* Create the "appendage" to be attached to every pagination link.
*
* @param array $appends
* @return string
*/
protected
function
appendage
(
$appends
)
{
// The developer may assign an array of values that will be converted to a
// query string and attached to every pagination link. This allows simple
// implementation of sorting or other things the developer may need.
if
(
!
is_null
(
$this
->
appendage
))
return
$this
->
appendage
;
if
(
count
(
$appends
)
<=
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment