Skip to content

Commit 1f1e6b9

Browse files
Antoine Makdessi94noni
authored andcommitted
Add various comments in the codebase
1 parent 77a47d3 commit 1f1e6b9

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

src/Controller/Admin/BlogController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* purposes. However, in your real Symfony application you should use any of the
3131
* existing bundles that let you generate ready-to-use backends without effort.
3232
*
33-
* See http://knpbundles.com/keyword/admin
33+
* See https://symfony.com/bundles/EasyAdminBundle/current/index.html
3434
*
3535
* @author Ryan Weaver <[email protected]>
3636
* @author Javier Eguiluz <[email protected]>

src/Controller/BlogController.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ public function postShow(Post $post): Response
8181
// have enabled the DebugBundle. Uncomment the following line to see it in action:
8282
//
8383
// dump($post, $this->getUser(), new \DateTime());
84+
//
85+
// The result will be displayed either in the Symfony Profiler or in the stream output.
86+
// See https://symfony.com/doc/current/profiler.html
87+
// See https://symfony.com/doc/current/templates.html#the-dump-twig-utilities
88+
//
89+
// You can also leverage Symfony's 'dd()' function that dump and
90+
// stop the execution
8491

8592
return $this->render('blog/post_show.html.twig', ['post' => $post]);
8693
}

src/Security/PostVoter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class PostVoter extends Voter
3737
*/
3838
protected function supports(string $attribute, $subject): bool
3939
{
40-
// this voter is only executed for three specific permissions on Post objects
40+
// this voter is only executed on Post objects and for three specific permissions
4141
return $subject instanceof Post && \in_array($attribute, [self::SHOW, self::EDIT, self::DELETE], true);
4242
}
4343

src/Utils/Validator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
/**
1818
* This class is used to provide an example of integrating simple classes as
1919
* services into a Symfony application.
20+
* See https://symfony.com/doc/current/service_container.html#creating-configuring-services-in-the-container
2021
*
2122
* @author Javier Eguiluz <[email protected]>
2223
*/

0 commit comments

Comments
 (0)