Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
08d04b40
Commit
08d04b40
authored
Feb 25, 2018
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed CS
parent
5e032d07
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
35 additions
and
16 deletions
+35
-16
.php_cs.dist
.php_cs.dist
+19
-0
src/Silex/AppArgumentValueResolver.php
src/Silex/AppArgumentValueResolver.php
+1
-1
src/Silex/Application.php
src/Silex/Application.php
+1
-1
src/Silex/Application/SecurityTrait.php
src/Silex/Application/SecurityTrait.php
+1
-1
src/Silex/CallbackResolver.php
src/Silex/CallbackResolver.php
+2
-2
src/Silex/ControllerCollection.php
src/Silex/ControllerCollection.php
+1
-1
src/Silex/Provider/Form/SilexFormExtension.php
src/Silex/Provider/Form/SilexFormExtension.php
+5
-5
src/Silex/Provider/Routing/RedirectableUrlMatcher.php
src/Silex/Provider/Routing/RedirectableUrlMatcher.php
+1
-1
src/Silex/Provider/SecurityServiceProvider.php
src/Silex/Provider/SecurityServiceProvider.php
+1
-1
src/Silex/Provider/SwiftmailerServiceProvider.php
src/Silex/Provider/SwiftmailerServiceProvider.php
+1
-1
src/Silex/ServiceControllerResolver.php
src/Silex/ServiceControllerResolver.php
+1
-1
tests/Silex/Tests/ControllerCollectionTest.php
tests/Silex/Tests/ControllerCollectionTest.php
+1
-1
No files found.
.php_cs.dist
0 → 100644
View file @
08d04b40
<?php
return
PhpCsFixer\Config
::
create
()
->
setRules
(
array
(
'@Symfony'
=>
true
,
'@Symfony:risky'
=>
true
,
'@PHPUnit48Migration:risky'
=>
true
,
'php_unit_no_expectation_annotation'
=>
false
,
// part of `PHPUnitXYMigration:risky` ruleset, to be enabled when PHPUnit 4.x support will be dropped, as we don't want to rewrite exceptions handling twice
'array_syntax'
=>
array
(
'syntax'
=>
'long'
),
'protected_to_private'
=>
false
,
))
->
setRiskyAllowed
(
true
)
->
setFinder
(
PhpCsFixer\Finder
::
create
()
->
in
(
__DIR__
.
'/src/'
)
->
in
(
__DIR__
.
'/tests/'
)
->
name
(
'*.php'
)
)
;
src/Silex/AppArgumentValueResolver.php
View file @
08d04b40
...
...
@@ -34,7 +34,7 @@ class AppArgumentValueResolver implements ArgumentValueResolverInterface
*/
public
function
supports
(
Request
$request
,
ArgumentMetadata
$argument
)
{
return
null
!==
$argument
->
getType
()
&&
(
$argument
->
getType
()
===
Application
::
class
||
is_subclass_of
(
$argument
->
getType
(),
Application
::
class
));
return
null
!==
$argument
->
getType
()
&&
(
Application
::
class
===
$argument
->
getType
()
||
is_subclass_of
(
$argument
->
getType
(),
Application
::
class
));
}
/**
...
...
src/Silex/Application.php
View file @
08d04b40
...
...
@@ -54,7 +54,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn
*
* Objects and parameters can be passed as argument to the constructor.
*
* @param array $values
The parameters or objects.
* @param array $values
the parameters or objects
*/
public
function
__construct
(
array
$values
=
array
())
{
...
...
src/Silex/Application/SecurityTrait.php
View file @
08d04b40
...
...
@@ -44,7 +44,7 @@ trait SecurityTrait
*
* @return bool
*
* @throws AuthenticationCredentialsNotFoundException when the token storage has no authentication token
.
* @throws AuthenticationCredentialsNotFoundException when the token storage has no authentication token
*/
public
function
isGranted
(
$attributes
,
$object
=
null
)
{
...
...
src/Silex/CallbackResolver.php
View file @
08d04b40
...
...
@@ -43,7 +43,7 @@ class CallbackResolver
*
* @return callable
*
* @throws \InvalidArgumentException
In case the method does not exist.
* @throws \InvalidArgumentException
in case the method does not exist
*/
public
function
convertCallback
(
$name
)
{
...
...
@@ -69,7 +69,7 @@ class CallbackResolver
*
* @return string|callable A callable value or the string passed in
*
* @throws \InvalidArgumentException
In case the method does not exist.
* @throws \InvalidArgumentException
in case the method does not exist
*/
public
function
resolveCallback
(
$name
)
{
...
...
src/Silex/ControllerCollection.php
View file @
08d04b40
...
...
@@ -211,7 +211,7 @@ class ControllerCollection
private
function
doFlush
(
$prefix
,
RouteCollection
$routes
)
{
if
(
$prefix
!==
''
)
{
if
(
''
!==
$prefix
)
{
$prefix
=
'/'
.
trim
(
trim
(
$prefix
),
'/'
);
}
...
...
src/Silex/Provider/Form/SilexFormExtension.php
View file @
08d04b40
...
...
@@ -52,7 +52,7 @@ class SilexFormExtension implements FormExtensionInterface
public
function
getTypeExtensions
(
$name
)
{
return
isset
(
$this
->
typeExtensions
[
$name
])
?
$this
->
typeExtensions
[
$name
]
:
[]
;
return
isset
(
$this
->
typeExtensions
[
$name
])
?
$this
->
typeExtensions
[
$name
]
:
array
()
;
}
public
function
hasTypeExtensions
(
$name
)
...
...
@@ -66,7 +66,7 @@ class SilexFormExtension implements FormExtensionInterface
$this
->
guesserLoaded
=
true
;
if
(
$this
->
guessers
)
{
$guessers
=
[]
;
$guessers
=
array
()
;
foreach
(
$this
->
guessers
as
$guesser
)
{
if
(
!
is_object
(
$guesser
))
{
$guesser
=
$this
->
app
[
$guesser
];
...
...
@@ -82,7 +82,7 @@ class SilexFormExtension implements FormExtensionInterface
private
function
setTypes
(
array
$types
)
{
$this
->
types
=
[]
;
$this
->
types
=
array
()
;
foreach
(
$types
as
$type
)
{
if
(
!
is_object
(
$type
))
{
if
(
!
isset
(
$this
->
app
[
$type
]))
{
...
...
@@ -97,7 +97,7 @@ class SilexFormExtension implements FormExtensionInterface
private
function
setTypeExtensions
(
array
$typeExtensions
)
{
$this
->
typeExtensions
=
[]
;
$this
->
typeExtensions
=
array
()
;
foreach
(
$typeExtensions
as
$extension
)
{
if
(
!
is_object
(
$extension
))
{
if
(
!
isset
(
$this
->
app
[
$extension
]))
{
...
...
@@ -111,7 +111,7 @@ class SilexFormExtension implements FormExtensionInterface
private
function
setGuessers
(
array
$guessers
)
{
$this
->
guessers
=
[]
;
$this
->
guessers
=
array
()
;
foreach
(
$guessers
as
$guesser
)
{
if
(
!
is_object
(
$guesser
)
&&
!
isset
(
$this
->
app
[
$guesser
]))
{
throw
new
InvalidArgumentException
(
sprintf
(
'Invalid form type guesser. The silex service "%s" does not exist.'
,
$guesser
));
...
...
src/Silex/Provider/Routing/RedirectableUrlMatcher.php
View file @
08d04b40
...
...
@@ -29,7 +29,7 @@ class RedirectableUrlMatcher extends BaseRedirectableUrlMatcher
$url
=
$this
->
context
->
getBaseUrl
()
.
$path
;
$query
=
$this
->
context
->
getQueryString
()
?:
''
;
if
(
$query
!==
''
)
{
if
(
''
!==
$query
)
{
$url
.=
'?'
.
$query
;
}
...
...
src/Silex/Provider/SecurityServiceProvider.php
View file @
08d04b40
...
...
@@ -613,7 +613,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener
return
$app
[
$options
[
'entry_point'
]];
}
$authenticatorIds
=
$options
[
'authenticators'
];
if
(
count
(
$authenticatorIds
)
==
1
)
{
if
(
1
==
count
(
$authenticatorIds
)
)
{
// if there is only one authenticator, use that as the entry point
return
$app
[
reset
(
$authenticatorIds
)];
}
...
...
src/Silex/Provider/SwiftmailerServiceProvider.php
View file @
08d04b40
...
...
@@ -62,7 +62,7 @@ class SwiftmailerServiceProvider implements ServiceProviderInterface, EventListe
'password'
=>
''
,
'encryption'
=>
null
,
'auth_mode'
=>
null
,
'stream_context_options'
=>
[]
,
'stream_context_options'
=>
array
()
,
),
$app
[
'swiftmailer.options'
]);
$transport
->
setHost
(
$options
[
'host'
]);
...
...
src/Silex/ServiceControllerResolver.php
View file @
08d04b40
...
...
@@ -17,7 +17,7 @@ use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
/**
* Enables name_of_service:method_name syntax for declaring controllers.
*
* @
link
http://silex.sensiolabs.org/doc/providers/service_controller.html
* @
see
http://silex.sensiolabs.org/doc/providers/service_controller.html
*/
class
ServiceControllerResolver
implements
ControllerResolverInterface
{
...
...
tests/Silex/Tests/ControllerCollectionTest.php
View file @
08d04b40
...
...
@@ -154,7 +154,7 @@ class ControllerCollectionTest extends TestCase
$routes
=
$controllers
->
flush
();
$subRoutes
=
$subControllers
->
flush
();
$this
->
assertTrue
(
$routes
->
count
()
==
2
&&
$subRoutes
->
count
()
==
0
);
$this
->
assertTrue
(
2
==
$routes
->
count
()
&&
0
==
$subRoutes
->
count
()
);
}
public
function
testMountControllersFactory
()
...
...
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