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
bf6313e5
Commit
bf6313e5
authored
Feb 17, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaning up code.
parent
ba3f62f7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
31 deletions
+20
-31
file.php
laravel/file.php
+1
-2
helpers.php
laravel/helpers.php
+0
-12
ioc.php
laravel/ioc.php
+1
-5
laravel.php
laravel/laravel.php
+4
-3
validator.php
laravel/validator.php
+14
-9
No files found.
laravel/file.php
View file @
bf6313e5
...
...
@@ -161,8 +161,7 @@ class File {
// The MIME configuration file contains an array of file extensions and
// their associated MIME types. We will spin through each extension the
// developer wants to check to determine if the file's MIME type is in
// the list of MIMEs we have for that extension.
// developer wants to check and look for the MIME type.
foreach
((
array
)
$extensions
as
$extension
)
{
if
(
isset
(
$mimes
[
$extension
])
and
in_array
(
$mime
,
(
array
)
$mimes
[
$extension
]))
...
...
laravel/helpers.php
View file @
bf6313e5
...
...
@@ -177,18 +177,6 @@ function array_first($array, $callback, $default = null)
return
value
(
$default
);
}
/**
* Spin through the array, executing a callback with each key and element.
*
* @param array $array
* @param mixed $callback
* @return array
*/
function
array_spin
(
$array
,
$callback
)
{
return
array_map
(
$callback
,
array_keys
(
$array
),
array_values
(
$array
));
}
/**
* Recursively remove slashes from array keys and values.
*
...
...
laravel/ioc.php
View file @
bf6313e5
...
...
@@ -129,11 +129,7 @@ class IoC {
// If the resolver is registering as a singleton resolver, we will cache
// the instance of the object in the container so we can resolve it next
// time without having to instantiate a new instance of the object.
//
// This allows the developer to reuse objects that do not need to be
// instantiated each time they are needed, such as a SwiftMailer or
// Twig object that can be shared.
// time without having to instantiate a brand new instance.
if
(
isset
(
static
::
$registry
[
$name
][
'singleton'
]))
{
return
static
::
$singletons
[
$name
]
=
$object
;
...
...
laravel/laravel.php
View file @
bf6313e5
...
...
@@ -53,9 +53,10 @@ error_reporting(-1);
ini_set
(
'display_errors'
,
Config
::
get
(
'error.display'
));
/**
* Determine if we need to set the application key to a random
* string for the developer. This provides the developer with
* a zero configuration install process.
* Determine if we need to set the application key to a very random
* string so we can provide a zero configuration installation but
* still ensure that the key is set to something random. It is
* possible to disable this feature.
*/
$auto_key
=
Config
::
get
(
'application.auto_key'
);
...
...
laravel/validator.php
View file @
bf6313e5
...
...
@@ -697,14 +697,15 @@ class Validator {
protected
function
size_message
(
$bundle
,
$attribute
,
$rule
)
{
// There are three different types of size validations. The attribute
// may be either a number, file, or a string. If the attribute has a
// numeric rule attached to it, we can assume it is a number. If the
// attribute is in the file array, it is a file, otherwise we can
// assume the attribute is simply a string.
// may be either a number, file, or a string, so we'll check a few
// things to figure out which one it is.
if
(
$this
->
has_rule
(
$attribute
,
$this
->
numeric_rules
))
{
$line
=
'numeric'
;
}
// We assume that attributes present in the $_FILES array are files,
// which makes sense. If the attribute doesn't have numeric rules
// and isn't as file, it's a string.
elseif
(
array_key_exists
(
$attribute
,
Input
::
file
()))
{
$line
=
'file'
;
...
...
@@ -877,15 +878,19 @@ class Validator {
// More reader friendly versions of the attribute names may be stored
// in the validation language file, allowing a more readable version
// of the attribute name to be used in the message.
//
// If no language line has been specified for the attribute, all of
// the underscores will be removed from the attribute name and that
// will be used as the attribtue name.
$line
=
"
{
$bundle
}
validation.attributes.
{
$attribute
}
"
;
$display
=
Lang
::
line
(
$line
)
->
get
(
$this
->
language
);
return
(
is_null
(
$display
))
?
str_replace
(
'_'
,
' '
,
$attribute
)
:
$display
;
// If no language line has been specified for the attribute, all of
// the underscores are removed from the attribute name and that
// will be used as the attribtue name.
if
(
is_null
(
$display
))
{
return
str_replace
(
'_'
,
' '
,
$attribute
);
}
return
$display
;
}
/**
...
...
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