Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
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
PSDI Army
yii2
Commits
7a7d2a9c
Commit
7a7d2a9c
authored
Jun 07, 2013
by
resurtm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CS fixes.
parent
d48ef419
Show whitespace changes
Inline
Side-by-side
Showing
57 changed files
with
20 additions
and
49 deletions
+20
-49
ErrorHandler.php
framework/yii/base/ErrorHandler.php
+1
-1
Formatter.php
framework/yii/base/Formatter.php
+0
-1
InvalidCallException.php
framework/yii/base/InvalidCallException.php
+0
-1
InvalidConfigException.php
framework/yii/base/InvalidConfigException.php
+0
-1
InvalidParamException.php
framework/yii/base/InvalidParamException.php
+0
-1
InvalidRouteException.php
framework/yii/base/InvalidRouteException.php
+0
-1
Jsonable.php
framework/yii/base/Jsonable.php
+1
-1
Module.php
framework/yii/base/Module.php
+0
-0
NotSupportedException.php
framework/yii/base/NotSupportedException.php
+0
-1
Theme.php
framework/yii/base/Theme.php
+0
-0
UnknownClassException.php
framework/yii/base/UnknownClassException.php
+0
-1
UnknownMethodException.php
framework/yii/base/UnknownMethodException.php
+0
-1
UnknownPropertyException.php
framework/yii/base/UnknownPropertyException.php
+0
-1
Button.php
framework/yii/bootstrap/Button.php
+1
-2
ButtonDropdown.php
framework/yii/bootstrap/ButtonDropdown.php
+1
-1
ButtonGroup.php
framework/yii/bootstrap/ButtonGroup.php
+0
-1
Collapse.php
framework/yii/bootstrap/Collapse.php
+0
-0
Dropdown.php
framework/yii/bootstrap/Dropdown.php
+0
-1
Nav.php
framework/yii/bootstrap/Nav.php
+1
-1
Progress.php
framework/yii/bootstrap/Progress.php
+0
-1
Widget.php
framework/yii/bootstrap/Widget.php
+0
-1
DbCache.php
framework/yii/caching/DbCache.php
+0
-0
XCache.php
framework/yii/caching/XCache.php
+0
-1
Exception.php
framework/yii/console/Exception.php
+0
-1
AssetController.php
framework/yii/console/controllers/AssetController.php
+3
-2
MessageController.php
framework/yii/console/controllers/MessageController.php
+1
-2
MigrateController.php
framework/yii/console/controllers/MigrateController.php
+1
-1
Connection.php
framework/yii/db/Connection.php
+2
-3
Module.php
framework/yii/debug/Module.php
+0
-0
DefaultController.php
framework/yii/debug/controllers/DefaultController.php
+0
-0
Json.php
framework/yii/helpers/Json.php
+0
-1
Console.php
framework/yii/helpers/base/Console.php
+2
-3
Html.php
framework/yii/helpers/base/Html.php
+0
-1
Inflector.php
framework/yii/helpers/base/Inflector.php
+1
-1
MessageSource.php
framework/yii/i18n/MessageSource.php
+0
-1
Accordion.php
framework/yii/jui/Accordion.php
+1
-1
Menu.php
framework/yii/jui/Menu.php
+0
-1
Widget.php
framework/yii/jui/Widget.php
+0
-1
DbManager.php
framework/yii/rbac/DbManager.php
+2
-1
PhpManager.php
framework/yii/rbac/PhpManager.php
+0
-0
requirements.php
framework/yii/requirements/requirements.php
+0
-0
CaptchaValidator.php
framework/yii/validators/CaptchaValidator.php
+0
-1
DateValidator.php
framework/yii/validators/DateValidator.php
+0
-1
DefaultValueValidator.php
framework/yii/validators/DefaultValueValidator.php
+0
-1
ExistValidator.php
framework/yii/validators/ExistValidator.php
+0
-1
FilterValidator.php
framework/yii/validators/FilterValidator.php
+1
-0
RangeValidator.php
framework/yii/validators/RangeValidator.php
+0
-0
RegularExpressionValidator.php
framework/yii/validators/RegularExpressionValidator.php
+0
-0
StringValidator.php
framework/yii/validators/StringValidator.php
+0
-1
UrlValidator.php
framework/yii/validators/UrlValidator.php
+1
-1
Validator.php
framework/yii/validators/Validator.php
+0
-0
HeaderCollection.php
framework/yii/web/HeaderCollection.php
+0
-1
PageCache.php
framework/yii/web/PageCache.php
+0
-0
Request.php
framework/yii/web/Request.php
+0
-1
User.php
framework/yii/web/User.php
+0
-0
FragmentCache.php
framework/yii/widgets/FragmentCache.php
+0
-0
ListPager.php
framework/yii/widgets/ListPager.php
+0
-1
No files found.
framework/yii/base/ErrorHandler.php
View file @
7a7d2a9c
...
...
@@ -255,7 +255,7 @@ class ErrorHandler extends Component
if
(
isset
(
$_SERVER
[
'SERVER_SOFTWARE'
]))
{
foreach
(
$serverUrls
as
$url
=>
$keywords
)
{
foreach
(
$keywords
as
$keyword
)
{
if
(
stripos
(
$_SERVER
[
'SERVER_SOFTWARE'
],
$keyword
)
!==
false
)
{
if
(
stripos
(
$_SERVER
[
'SERVER_SOFTWARE'
],
$keyword
)
!==
false
)
{
return
'<a href="'
.
$url
.
'" target="_blank">'
.
$this
->
htmlEncode
(
$_SERVER
[
'SERVER_SOFTWARE'
])
.
'</a>'
;
}
}
...
...
framework/yii/base/Formatter.php
View file @
7a7d2a9c
...
...
@@ -12,7 +12,6 @@ use DateTime;
use
yii\helpers\HtmlPurifier
;
use
yii\helpers\Html
;
/**
* Formatter provides a set of commonly used data formatting methods.
*
...
...
framework/yii/base/InvalidCallException.php
View file @
7a7d2a9c
...
...
@@ -23,4 +23,3 @@ class InvalidCallException extends Exception
return
\Yii
::
t
(
'yii'
,
'Invalid Call'
);
}
}
framework/yii/base/InvalidConfigException.php
View file @
7a7d2a9c
...
...
@@ -23,4 +23,3 @@ class InvalidConfigException extends Exception
return
\Yii
::
t
(
'yii'
,
'Invalid Configuration'
);
}
}
framework/yii/base/InvalidParamException.php
View file @
7a7d2a9c
...
...
@@ -23,4 +23,3 @@ class InvalidParamException extends Exception
return
\Yii
::
t
(
'yii'
,
'Invalid Parameter'
);
}
}
framework/yii/base/InvalidRouteException.php
View file @
7a7d2a9c
...
...
@@ -23,4 +23,3 @@ class InvalidRouteException extends UserException
return
\Yii
::
t
(
'yii'
,
'Invalid Route'
);
}
}
framework/yii/base/Jsonable.php
View file @
7a7d2a9c
...
...
@@ -18,5 +18,5 @@ interface Jsonable
/**
* @return string the JSON representation of this object
*/
function
toJson
();
public
function
toJson
();
}
framework/yii/base/Module.php
View file @
7a7d2a9c
framework/yii/base/NotSupportedException.php
View file @
7a7d2a9c
...
...
@@ -23,4 +23,3 @@ class NotSupportedException extends Exception
return
\Yii
::
t
(
'yii'
,
'Not Supported'
);
}
}
framework/yii/base/Theme.php
View file @
7a7d2a9c
framework/yii/base/UnknownClassException.php
View file @
7a7d2a9c
...
...
@@ -23,4 +23,3 @@ class UnknownClassException extends Exception
return
\Yii
::
t
(
'yii'
,
'Unknown Class'
);
}
}
framework/yii/base/UnknownMethodException.php
View file @
7a7d2a9c
...
...
@@ -23,4 +23,3 @@ class UnknownMethodException extends Exception
return
\Yii
::
t
(
'yii'
,
'Unknown Method'
);
}
}
framework/yii/base/UnknownPropertyException.php
View file @
7a7d2a9c
...
...
@@ -23,4 +23,3 @@ class UnknownPropertyException extends Exception
return
\Yii
::
t
(
'yii'
,
'Unknown Property'
);
}
}
framework/yii/bootstrap/Button.php
View file @
7a7d2a9c
...
...
@@ -6,9 +6,8 @@
*/
namespace
yii\bootstrap
;
use
yii\base\InvalidConfigException
;
use
yii\helpers\Html
;
use
yii\helpers\Html
;
/**
* Button renders a bootstrap button.
...
...
framework/yii/bootstrap/ButtonDropdown.php
View file @
7a7d2a9c
...
...
@@ -6,8 +6,8 @@
*/
namespace
yii\bootstrap
;
use
yii\helpers\Html
;
use
yii\helpers\Html
;
/**
* ButtonDropdown renders a group or split button dropdown bootstrap component.
...
...
framework/yii/bootstrap/ButtonGroup.php
View file @
7a7d2a9c
...
...
@@ -10,7 +10,6 @@ namespace yii\bootstrap;
use
yii\helpers\base\ArrayHelper
;
use
yii\helpers\Html
;
/**
* ButtonGroup renders a button group bootstrap component.
*
...
...
framework/yii/bootstrap/Collapse.php
View file @
7a7d2a9c
framework/yii/bootstrap/Dropdown.php
View file @
7a7d2a9c
...
...
@@ -11,7 +11,6 @@ use yii\base\InvalidConfigException;
use
yii\helpers\ArrayHelper
;
use
yii\helpers\Html
;
/**
* Dropdown renders a Bootstrap dropdown menu component.
*
...
...
framework/yii/bootstrap/Nav.php
View file @
7a7d2a9c
...
...
@@ -118,7 +118,7 @@ class Nav extends Widget
$url
=
Html
::
url
(
ArrayHelper
::
getValue
(
$item
,
'url'
,
'#'
));
$linkOptions
=
ArrayHelper
::
getValue
(
$item
,
'linkOptions'
,
array
());
if
(
ArrayHelper
::
getValue
(
$item
,
'active'
))
{
if
(
ArrayHelper
::
getValue
(
$item
,
'active'
))
{
$this
->
addCssClass
(
$options
,
'active'
);
}
...
...
framework/yii/bootstrap/Progress.php
View file @
7a7d2a9c
...
...
@@ -11,7 +11,6 @@ use yii\base\InvalidConfigException;
use
yii\helpers\ArrayHelper
;
use
yii\helpers\Html
;
/**
* Progress renders a bootstrap progress bar component.
*
...
...
framework/yii/bootstrap/Widget.php
View file @
7a7d2a9c
...
...
@@ -11,7 +11,6 @@ use Yii;
use
yii\base\View
;
use
yii\helpers\Json
;
/**
* \yii\bootstrap\Widget is the base class for all bootstrap widgets.
*
...
...
framework/yii/caching/DbCache.php
View file @
7a7d2a9c
framework/yii/caching/XCache.php
View file @
7a7d2a9c
...
...
@@ -86,4 +86,3 @@ class XCache extends Cache
return
true
;
}
}
framework/yii/console/Exception.php
View file @
7a7d2a9c
...
...
@@ -25,4 +25,3 @@ class Exception extends UserException
return
\Yii
::
t
(
'yii'
,
'Error'
);
}
}
framework/yii/console/controllers/AssetController.php
View file @
7a7d2a9c
...
...
@@ -220,7 +220,8 @@ class AssetController extends Controller
* @param array $result already loaded bundles list.
* @throws \yii\console\Exception on failure.
*/
protected
function
loadBundleDependency
(
$name
,
$bundle
,
&
$result
)
{
protected
function
loadBundleDependency
(
$name
,
$bundle
,
&
$result
)
{
if
(
!
empty
(
$bundle
->
depends
))
{
$assetManager
=
$this
->
getAssetManager
();
foreach
(
$bundle
->
depends
as
$dependencyName
)
{
...
...
@@ -572,7 +573,7 @@ EOD;
$inputFileRelativePathParts
=
explode
(
'/'
,
$inputFileRelativePath
);
$outputFileRelativePathParts
=
explode
(
'/'
,
$outputFileRelativePath
);
$callback
=
function
(
$matches
)
use
(
$inputFileRelativePathParts
,
$outputFileRelativePathParts
)
{
$callback
=
function
(
$matches
)
use
(
$inputFileRelativePathParts
,
$outputFileRelativePathParts
)
{
$fullMatch
=
$matches
[
0
];
$inputUrl
=
$matches
[
1
];
...
...
framework/yii/console/controllers/MessageController.php
View file @
7a7d2a9c
...
...
@@ -179,8 +179,7 @@ class MessageController extends Controller
}
ksort
(
$translated
);
foreach
(
$translated
as
$message
=>
$translation
)
{
if
(
!
isset
(
$merged
[
$message
])
&&
!
isset
(
$todo
[
$message
])
&&
!
$removeOld
)
{
if
(
!
isset
(
$merged
[
$message
])
&&
!
isset
(
$todo
[
$message
])
&&
!
$removeOld
)
{
if
(
substr
(
$translation
,
0
,
2
)
===
'@@'
&&
substr
(
$translation
,
-
2
)
===
'@@'
)
{
$todo
[
$message
]
=
$translation
;
}
else
{
...
...
framework/yii/console/controllers/MigrateController.php
View file @
7a7d2a9c
...
...
@@ -115,7 +115,7 @@ class MigrateController extends Controller
}
$this
->
migrationPath
=
$path
;
if
(
$action
->
id
!==
'create'
)
{
if
(
$action
->
id
!==
'create'
)
{
if
(
is_string
(
$this
->
db
))
{
$this
->
db
=
Yii
::
$app
->
getComponent
(
$this
->
db
);
}
...
...
framework/yii/db/Connection.php
View file @
7a7d2a9c
...
...
@@ -305,8 +305,7 @@ class Connection extends Component
$this
->
pdo
=
$this
->
createPdoInstance
();
$this
->
initConnection
();
Yii
::
endProfile
(
$token
,
__METHOD__
);
}
catch
(
\PDOException
$e
)
{
}
catch
(
\PDOException
$e
)
{
Yii
::
endProfile
(
$token
,
__METHOD__
);
Yii
::
error
(
"Failed to open DB connection (
{
$this
->
dsn
}
): "
.
$e
->
getMessage
(),
__METHOD__
);
$message
=
YII_DEBUG
?
'Failed to open DB connection: '
.
$e
->
getMessage
()
:
'Failed to open DB connection.'
;
...
...
@@ -508,7 +507,7 @@ class Connection extends Component
{
$db
=
$this
;
return
preg_replace_callback
(
'/(\\{\\{([%\w\-\. ]+)\\}\\}|\\[\\[([\w\-\. ]+)\\]\\])/'
,
function
(
$matches
)
use
(
$db
)
{
function
(
$matches
)
use
(
$db
)
{
if
(
isset
(
$matches
[
3
]))
{
return
$db
->
quoteColumnName
(
$matches
[
3
]);
}
else
{
...
...
framework/yii/debug/Module.php
View file @
7a7d2a9c
framework/yii/debug/controllers/DefaultController.php
View file @
7a7d2a9c
framework/yii/helpers/Json.php
View file @
7a7d2a9c
...
...
@@ -14,5 +14,4 @@ namespace yii\helpers;
*/
class
Json
extends
base\Json
{
}
framework/yii/helpers/base/Console.php
View file @
7a7d2a9c
...
...
@@ -286,7 +286,7 @@ class Console
* You can pass any of the FG_*, BG_* and TEXT_* constants and also [[xtermFgColor]] and [[xtermBgColor]].
* @return string
*/
public
static
function
ansiFormat
(
$string
,
$format
=
array
())
public
static
function
ansiFormat
(
$string
,
$format
=
array
())
{
$code
=
implode
(
';'
,
$format
);
return
"
\033
[0m"
.
(
$code
!==
''
?
"
\033
["
.
$code
.
"m"
:
''
)
.
$string
.
"
\033
[0m"
;
...
...
@@ -589,11 +589,10 @@ class Console
if
(
static
::
isRunningOnWindows
())
{
$output
=
array
();
exec
(
'mode con'
,
$output
);
if
(
isset
(
$output
)
&&
strpos
(
$output
[
1
],
'CON'
)
!==
false
)
{
if
(
isset
(
$output
)
&&
strpos
(
$output
[
1
],
'CON'
)
!==
false
)
{
return
$size
=
array
((
int
)
preg_replace
(
'~[^0-9]~'
,
''
,
$output
[
3
]),
(
int
)
preg_replace
(
'~[^0-9]~'
,
''
,
$output
[
4
]));
}
}
else
{
// try stty if available
$stty
=
array
();
if
(
exec
(
'stty -a 2>&1'
,
$stty
)
&&
preg_match
(
'/rows\s+(\d+);\s*columns\s+(\d+);/mi'
,
implode
(
' '
,
$stty
),
$matches
))
{
...
...
framework/yii/helpers/base/Html.php
View file @
7a7d2a9c
...
...
@@ -1479,5 +1479,4 @@ class Html
$name
=
strtolower
(
static
::
getInputName
(
$model
,
$attribute
));
return
str_replace
(
array
(
'[]'
,
']['
,
'['
,
']'
,
' '
),
array
(
''
,
'-'
,
'-'
,
''
,
'-'
),
$name
);
}
}
framework/yii/helpers/base/Inflector.php
View file @
7a7d2a9c
...
...
@@ -468,7 +468,7 @@ class Inflector
if
(
in_array
((
$number
%
100
),
range
(
11
,
13
)))
{
return
$number
.
'th'
;
}
switch
(
(
$number
%
10
)
)
{
switch
(
$number
%
10
)
{
case
1
:
return
$number
.
'st'
;
case
2
:
return
$number
.
'nd'
;
case
3
:
return
$number
.
'rd'
;
...
...
framework/yii/i18n/MessageSource.php
View file @
7a7d2a9c
...
...
@@ -118,4 +118,3 @@ class MessageSource extends Component
}
}
}
framework/yii/jui/Accordion.php
View file @
7a7d2a9c
...
...
@@ -125,7 +125,7 @@ class Accordion extends Widget
$items
[]
=
Html
::
tag
(
$headerTag
,
$item
[
'header'
],
$headerOptions
);
$options
=
array_merge
(
$this
->
itemOptions
,
ArrayHelper
::
getValue
(
$item
,
'options'
,
array
()));
$tag
=
ArrayHelper
::
remove
(
$options
,
'tag'
,
'div'
);
$items
[]
=
Html
::
tag
(
$tag
,
$item
[
'content'
],
$options
);
;
$items
[]
=
Html
::
tag
(
$tag
,
$item
[
'content'
],
$options
);
}
return
implode
(
"
\n
"
,
$items
);
...
...
framework/yii/jui/Menu.php
View file @
7a7d2a9c
...
...
@@ -10,7 +10,6 @@ namespace yii\jui;
use
Yii
;
use
yii\helpers\Json
;
/**
* Menu renders a menu jQuery UI widget.
*
...
...
framework/yii/jui/Widget.php
View file @
7a7d2a9c
...
...
@@ -10,7 +10,6 @@ namespace yii\jui;
use
Yii
;
use
yii\helpers\Json
;
/**
* \yii\jui\Widget is the base class for all jQuery UI widgets.
*
...
...
framework/yii/rbac/DbManager.php
View file @
7a7d2a9c
...
...
@@ -493,9 +493,10 @@ class DbManager extends Manager
'bizRule'
=>
$row
[
'biz_rule'
],
'data'
=>
$data
,
));
}
else
}
else
{
return
null
;
}
}
/**
* Saves an authorization item to persistent storage.
...
...
framework/yii/rbac/PhpManager.php
View file @
7a7d2a9c
framework/yii/requirements/requirements.php
View file @
7a7d2a9c
framework/yii/validators/CaptchaValidator.php
View file @
7a7d2a9c
...
...
@@ -117,4 +117,3 @@ class CaptchaValidator extends Validator
return
'yii.validation.captcha(value, messages, '
.
json_encode
(
$options
)
.
');'
;
}
}
framework/yii/validators/DateValidator.php
View file @
7a7d2a9c
...
...
@@ -73,4 +73,3 @@ class DateValidator extends Validator
return
DateTime
::
createFromFormat
(
$this
->
format
,
$value
)
!==
false
;
}
}
framework/yii/validators/DefaultValueValidator.php
View file @
7a7d2a9c
...
...
@@ -40,4 +40,3 @@ class DefaultValueValidator extends Validator
}
}
}
framework/yii/validators/ExistValidator.php
View file @
7a7d2a9c
...
...
@@ -99,4 +99,3 @@ class ExistValidator extends Validator
return
$query
->
exists
();
}
}
framework/yii/validators/FilterValidator.php
View file @
7a7d2a9c
...
...
@@ -6,6 +6,7 @@
*/
namespace
yii\validators
;
use
yii\base\InvalidConfigException
;
/**
...
...
framework/yii/validators/RangeValidator.php
View file @
7a7d2a9c
framework/yii/validators/RegularExpressionValidator.php
View file @
7a7d2a9c
framework/yii/validators/StringValidator.php
View file @
7a7d2a9c
...
...
@@ -174,4 +174,3 @@ class StringValidator extends Validator
return
'yii.validation.string(value, messages, '
.
json_encode
(
$options
)
.
');'
;
}
}
framework/yii/validators/UrlValidator.php
View file @
7a7d2a9c
...
...
@@ -99,7 +99,7 @@ class UrlValidator extends Validator
}
if
(
$this
->
enableIDN
)
{
$value
=
preg_replace_callback
(
'/:\/\/([^\/]+)/'
,
function
(
$matches
)
{
$value
=
preg_replace_callback
(
'/:\/\/([^\/]+)/'
,
function
(
$matches
)
{
return
'://'
.
idn_to_ascii
(
$matches
[
1
]);
},
$value
);
}
...
...
framework/yii/validators/Validator.php
View file @
7a7d2a9c
framework/yii/web/HeaderCollection.php
View file @
7a7d2a9c
...
...
@@ -11,7 +11,6 @@ use Yii;
use
yii\base\Object
;
use
ArrayIterator
;
/**
* HeaderCollection is used by [[Response]] to maintain the currently registered HTTP headers.
*
...
...
framework/yii/web/PageCache.php
View file @
7a7d2a9c
framework/yii/web/Request.php
View file @
7a7d2a9c
...
...
@@ -792,4 +792,3 @@ class Request extends \yii\base\Request
}
}
}
framework/yii/web/User.php
View file @
7a7d2a9c
framework/yii/widgets/FragmentCache.php
View file @
7a7d2a9c
framework/yii/widgets/ListPager.php
View file @
7a7d2a9c
...
...
@@ -91,5 +91,4 @@ class ListPager extends Widget
'{page}'
=>
$page
+
1
,
));
}
}
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