File tree Expand file tree Collapse file tree 14 files changed +17
-17
lines changed
CodeExplorerBundle/EventListener
tests/AppBundle/Controller Expand file tree Collapse file tree 14 files changed +17
-17
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- use Symfony \Component \HttpKernel \Kernel ;
4
3
use Symfony \Component \Config \Loader \LoaderInterface ;
4
+ use Symfony \Component \HttpKernel \Kernel ;
5
5
6
6
class AppKernel extends Kernel
7
7
{
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- use Doctrine \Common \Annotations \AnnotationRegistry ;
4
3
use Composer \Autoload \ClassLoader ;
4
+ use Doctrine \Common \Annotations \AnnotationRegistry ;
5
5
6
6
/** @var ClassLoader $loader */
7
7
$ loader = require __DIR__ .'/../vendor/autoload.php ' ;
Original file line number Diff line number Diff line change 11
11
12
12
namespace AppBundle \Command ;
13
13
14
+ use AppBundle \Entity \User ;
15
+ use Doctrine \Common \Persistence \ObjectManager ;
14
16
use Symfony \Bundle \FrameworkBundle \Command \ContainerAwareCommand ;
15
17
use Symfony \Component \Console \Input \InputArgument ;
16
18
use Symfony \Component \Console \Input \InputInterface ;
17
19
use Symfony \Component \Console \Input \InputOption ;
18
20
use Symfony \Component \Console \Output \OutputInterface ;
19
21
use Symfony \Component \Console \Question \Question ;
20
- use Doctrine \Common \Persistence \ObjectManager ;
21
- use AppBundle \Entity \User ;
22
22
23
23
/**
24
24
* A command console that creates users and stores them in the database.
Original file line number Diff line number Diff line change 12
12
namespace AppBundle \Command ;
13
13
14
14
use AppBundle \Entity \User ;
15
+ use Doctrine \Common \Persistence \ObjectManager ;
15
16
use Symfony \Bundle \FrameworkBundle \Command \ContainerAwareCommand ;
16
17
use Symfony \Component \Console \Input \InputArgument ;
17
18
use Symfony \Component \Console \Input \InputInterface ;
18
19
use Symfony \Component \Console \Output \OutputInterface ;
19
20
use Symfony \Component \Console \Question \Question ;
20
- use Doctrine \Common \Persistence \ObjectManager ;
21
21
22
22
/**
23
23
* A command console that deletes users from the database.
Original file line number Diff line number Diff line change 17
17
use Symfony \Component \Console \Helper \Table ;
18
18
use Symfony \Component \Console \Input \InputInterface ;
19
19
use Symfony \Component \Console \Input \InputOption ;
20
- use Symfony \Component \Console \Output \OutputInterface ;
21
20
use Symfony \Component \Console \Output \BufferedOutput ;
21
+ use Symfony \Component \Console \Output \OutputInterface ;
22
22
23
23
/**
24
24
* A command console that lists all the existing users.
Original file line number Diff line number Diff line change 13
13
14
14
use AppBundle \Entity \Comment ;
15
15
use AppBundle \Entity \Post ;
16
+ use AppBundle \Form \CommentType ;
16
17
use Sensio \Bundle \FrameworkExtraBundle \Configuration \Cache ;
17
18
use Sensio \Bundle \FrameworkExtraBundle \Configuration \Method ;
18
19
use Sensio \Bundle \FrameworkExtraBundle \Configuration \ParamConverter ;
21
22
use Symfony \Bundle \FrameworkBundle \Controller \Controller ;
22
23
use Symfony \Component \HttpFoundation \Request ;
23
24
use Symfony \Component \HttpFoundation \Response ;
24
- use AppBundle \Form \CommentType ;
25
25
26
26
/**
27
27
* Controller used to manage blog contents in the public part of the site.
Original file line number Diff line number Diff line change 11
11
12
12
namespace AppBundle \Controller ;
13
13
14
- use Symfony \Bundle \FrameworkBundle \Controller \Controller ;
15
14
use Sensio \Bundle \FrameworkExtraBundle \Configuration \Route ;
15
+ use Symfony \Bundle \FrameworkBundle \Controller \Controller ;
16
16
17
17
/**
18
18
* Controller used to manage the application security.
Original file line number Diff line number Diff line change 11
11
12
12
namespace AppBundle \DataFixtures \ORM ;
13
13
14
- use AppBundle \Entity \User ;
15
- use AppBundle \Entity \Post ;
16
14
use AppBundle \Entity \Comment ;
15
+ use AppBundle \Entity \Post ;
16
+ use AppBundle \Entity \User ;
17
17
use Doctrine \Common \DataFixtures \FixtureInterface ;
18
18
use Doctrine \Common \Persistence \ObjectManager ;
19
19
use Symfony \Component \DependencyInjection \ContainerAwareInterface ;
Original file line number Diff line number Diff line change 2
2
3
3
namespace AppBundle \Entity ;
4
4
5
- use Doctrine \ORM \Mapping as ORM ;
6
5
use Doctrine \Common \Collections \ArrayCollection ;
6
+ use Doctrine \ORM \Mapping as ORM ;
7
7
use Symfony \Component \Validator \Constraints as Assert ;
8
8
9
9
/**
Original file line number Diff line number Diff line change 11
11
12
12
namespace AppBundle \EventListener ;
13
13
14
- use Symfony \Component \HttpKernel \Event \GetResponseEvent ;
15
14
use Symfony \Component \HttpFoundation \RedirectResponse ;
15
+ use Symfony \Component \HttpKernel \Event \GetResponseEvent ;
16
16
use Symfony \Component \Routing \Generator \UrlGeneratorInterface ;
17
17
18
18
/**
Original file line number Diff line number Diff line change 11
11
12
12
namespace CodeExplorerBundle \EventListener ;
13
13
14
- use Symfony \Component \HttpKernel \Event \FilterControllerEvent ;
15
14
use CodeExplorerBundle \Twig \SourceCodeExtension ;
15
+ use Symfony \Component \HttpKernel \Event \FilterControllerEvent ;
16
16
17
17
/**
18
18
* Defines the method that 'listens' to the 'kernel.controller' event, which is
Original file line number Diff line number Diff line change 11
11
12
12
namespace Tests \AppBundle \Controller ;
13
13
14
- use Symfony \Bundle \FrameworkBundle \Test \WebTestCase ;
15
14
use AppBundle \Entity \Post ;
15
+ use Symfony \Bundle \FrameworkBundle \Test \WebTestCase ;
16
16
17
17
/**
18
18
* Functional test for the controllers defined inside BlogController.
Original file line number Diff line number Diff line change 5
5
// * http://symfony.com/doc/current/cookbook/configuration/front_controllers_and_kernel.html
6
6
// * http://symfony.com/doc/current/cookbook/configuration/environments.html
7
7
8
- use Symfony \Component \HttpFoundation \Request ;
9
8
use Symfony \Component \Debug \Debug ;
9
+ use Symfony \Component \HttpFoundation \Request ;
10
10
11
11
// If you don't want to setup permissions the proper way, just uncomment the
12
12
// following PHP line. See:
Original file line number Diff line number Diff line change 14
14
exit ('This script cannot be run from the CLI. Run it from a browser. ' );
15
15
}
16
16
17
- if (!in_array (@$ _SERVER ['REMOTE_ADDR ' ], array (
17
+ if (!in_array (@$ _SERVER ['REMOTE_ADDR ' ], [
18
18
'127.0.0.1 ' ,
19
19
'::1 ' ,
20
- ) )) {
20
+ ] )) {
21
21
header ('HTTP/1.0 403 Forbidden ' );
22
22
exit ('This script is only accessible from localhost. ' );
23
23
}
You can’t perform that action at this time.
0 commit comments