Skip to content

Commit cdd9c03

Browse files
committed
cs cleanup
1 parent bdd7383 commit cdd9c03

14 files changed

+60
-56
lines changed

CmfCreateBundle.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
1312
namespace Symfony\Cmf\Bundle\CreateBundle;
1413

1514
use Symfony\Component\DependencyInjection\ContainerBuilder;

Command/InitHalloDevelCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
1312
namespace Symfony\Cmf\Bundle\CreateBundle\Command;
1413

1514
use Symfony\Component\Console\Command\Command;

Composer/ScriptHandler.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
1312
namespace Symfony\Cmf\Bundle\CreateBundle\Composer;
1413

15-
use Symfony\Component\ClassLoader\ClassCollectionLoader;
1614
use Symfony\Component\Process\Process;
17-
use Symfony\Component\Process\PhpExecutableFinder;
1815

1916
/**
2017
* A hack to work around the missing support for js assets in composer
@@ -95,9 +92,9 @@ public static function downloadCkeditor($event)
9592

9693
/**
9794
* @throws \RuntimeException
98-
* @param string $directory The directory where the repository should be clone into
99-
* @param string $repository The git repository
100-
* @param string $commitId The commit id
95+
* @param string $directory The directory where the repository should be clone into
96+
* @param string $repository The git repository
97+
* @param string $commitId The commit id
10198
*/
10299
public static function gitSynchronize($directory, $repository, $commitId)
103100
{

Controller/ImageController.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
1312
namespace Symfony\Cmf\Bundle\CreateBundle\Controller;
1413

1514
use Doctrine\Common\Persistence\ManagerRegistry;
@@ -22,7 +21,6 @@
2221
use Symfony\Component\HttpFoundation\Request;
2322
use Symfony\Component\HttpFoundation\Response;
2423
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
25-
use Symfony\Component\Security\Core\SecurityContextInterface;
2624

2725
class ImageController extends FileController
2826
{
@@ -41,7 +39,7 @@ class ImageController extends FileController
4139
* @param string $managerName
4240
* @param string $class FQN of image class
4341
* @param string $rootPath Repository path where the
44-
* images are located
42+
* images are located
4543
* @param MediaManagerInterface $mediaManager
4644
* @param UploadFileHelperInterface $uploadFileHelper
4745
* @param ViewHandlerInterface $viewHandler
@@ -84,6 +82,7 @@ private function processResults($images, $offset)
8482
);
8583

8684
$view = View::create($data);
85+
8786
return $this->viewHandler->handle($view);
8887
}
8988

@@ -95,8 +94,8 @@ private function processResults($images, $offset)
9594
*/
9695
public function searchAction(Request $request)
9796
{
98-
$offset = (int)$request->query->get('offset', 0);
99-
$limit = (int)$request->query->get('limit', 8);
97+
$offset = (int) $request->query->get('offset', 0);
98+
$limit = (int) $request->query->get('limit', 8);
10099
$query = $request->query->get('query');
101100
$images = $this->getImagesByCaption($query, $offset, $limit);
102101

@@ -107,8 +106,8 @@ public function searchAction(Request $request)
107106
* Get images by a specified caption
108107
*
109108
* @param string $name
110-
* @param int $offset
111-
* @param int $limit
109+
* @param int $offset
110+
* @param int $limit
112111
*
113112
* @return array
114113
*/
@@ -136,6 +135,7 @@ public function showRelatedAction(Request $request)
136135
);
137136

138137
$view = View::create($data);
138+
139139
return $this->viewHandler->handle($view);
140140
}
141141

Controller/JsloaderController.php

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
1312
namespace Symfony\Cmf\Bundle\CreateBundle\Controller;
1413

1514
use FOS\RestBundle\View\ViewHandlerInterface,
@@ -70,29 +69,28 @@ class JsloaderController
7069
*/
7170
private $browserFileHelper;
7271

73-
7472
/**
7573
* Create the Controller
7674
*
7775
* @param ViewHandlerInterface $viewHandler
7876
* @param AccessCheckerInterface $accessChecker
7977
* @param string $stanbolUrl the url to use for
80-
* the semantic enhancer stanbol.
78+
* the semantic enhancer stanbol.
8179
* @param Boolean $imageUploadEnabled used to determine
82-
* whether image upload should be activated.
80+
* whether image upload should be activated.
8381
* @param Boolean $fixedToolbar whether the toolbar
84-
* is fixed or floating. Hallo editor specific.
82+
* is fixed or floating. Hallo editor specific.
8583
* @param array $plainTextTypes RDFa types to edit
86-
* in raw text only.
84+
* in raw text only.
8785
* @param string|boolean $requiredRole Role a user needs to
88-
* be granted in order to see the the editor. If set to false, the
89-
* editor is always loaded.
86+
* be granted in order to see the the editor. If set to false, the
87+
* editor is always loaded.
9088
* @param SecurityContextInterface $securityContext The security
91-
* context to use to check for the role.
89+
* context to use to check for the role.
9290
* @param string $editorBasePath Configuration for
93-
* ckeditor.
91+
* ckeditor.
9492
* @param BrowserFileHelper $browserFileHelper Used to determine
95-
* image editing for ckeditor.
93+
* image editing for ckeditor.
9694
*/
9795
public function __construct(
9896
ViewHandlerInterface $viewHandler,

Controller/RestController.php

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
1312
namespace Symfony\Cmf\Bundle\CreateBundle\Controller;
1413

1514
use Symfony\Cmf\Bundle\CreateBundle\Security\AccessCheckerInterface;
@@ -92,7 +91,10 @@ protected function getModelBySubject(Request $request, $subject)
9291
* @param Request $request
9392
* @param string $subject URL of the subject, ie: cms/simple/news/news-name
9493
*
95-
* @return \Symfony\Component\HttpFoundation\Response
94+
* @return Response
95+
*
96+
* @throws AccessDeniedException If the action is not allowed by the access
97+
* checker.
9698
*/
9799
public function putDocumentAction(Request $request, $subject)
98100
{
@@ -115,6 +117,9 @@ public function putDocumentAction(Request $request, $subject)
115117
* @param Request $request
116118
*
117119
* @return Response
120+
*
121+
* @throws AccessDeniedException If the action is not allowed by the access
122+
* checker.
118123
*/
119124
public function postDocumentAction(Request $request)
120125
{
@@ -129,18 +134,23 @@ public function postDocumentAction(Request $request)
129134

130135
if (!is_null($result)) {
131136
$view = View::create($result)->setFormat('json');
137+
132138
return $this->viewHandler->handle($view, $request);
133139
}
134140

135141
return Response::create('The document could not be created', 500);
136142
}
137143

138144
/**
139-
* Handle document delete
145+
* Handle document deletion.
146+
*
147+
* @param Request $request
148+
* @param string $subject URL of the subject, ie: cms/simple/news/news-name
149+
*
150+
* @return Response
140151
*
141-
* @param \Symfony\Component\HttpFoundation\Request $request
142-
* @param string $subject URL of the subject, ie: cms/simple/news/news-name
143-
* @return \Symfony\Component\HttpFoundation\Response
152+
* @throws AccessDeniedException If the action is not allowed by the access
153+
* checker.
144154
*/
145155
public function deleteDocumentAction(Request $request, $subject)
146156
{
@@ -158,11 +168,15 @@ public function deleteDocumentAction(Request $request, $subject)
158168
}
159169

160170
/**
161-
* Get available Workflows for a document
171+
* Get available Workflows for a document.
162172
*
163173
* @param Request $request
164-
* @param $subject
174+
* @param string $subject
175+
*
165176
* @return Response
177+
*
178+
* @throws AccessDeniedException If getting workflows for this document is
179+
* not allowed by the access checker.
166180
*/
167181
public function workflowsAction(Request $request, $subject)
168182
{

DependencyInjection/CmfCreateExtension.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
1312
namespace Symfony\Cmf\Bundle\CreateBundle\DependencyInjection;
1413

1514
use Midgard\CreatePHP\RestService;

DependencyInjection/Configuration.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
1312
namespace Symfony\Cmf\Bundle\CreateBundle\DependencyInjection;
1413

1514
use Symfony\Component\Config\Definition\Builder\TreeBuilder;

Security/AccessCheckerInterface.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
1312
namespace Symfony\Cmf\Bundle\CreateBundle\Security;
1413

1514
use Symfony\Component\HttpFoundation\Request;
16-
use Symfony\Component\Security\Core\SecurityContextInterface;
1715

1816
/**
1917
* An access check for the create bundle controllers that can decide whether
@@ -26,7 +24,7 @@ interface AccessCheckerInterface
2624
* exception.
2725
*
2826
* @param Request $request The request in question, to take into account if
29-
* needed.
27+
* needed.
3028
*
3129
* @return boolean true if access is granted, false otherwise
3230
*/

Security/AlwaysAllowChecker.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
1312
namespace Symfony\Cmf\Bundle\CreateBundle\Security;
1413
use Symfony\Component\HttpFoundation\Request;
1514

0 commit comments

Comments
 (0)