Skip to content

Commit e4b75ce

Browse files
committed
Minor: Format code
1 parent 7c5857d commit e4b75ce

27 files changed

+41
-49
lines changed

main/admin/export_exercise_results.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ function confirm_your_choice() {
181181
echo Display::return_message(
182182
get_lang('PleaseWaitThisCouldTakeAWhile'),
183183
'normal',
184-
false,
184+
false
185185
);
186186

187-
echo $form->display();
187+
$form->display();
188188

189189
Display::display_footer();

main/cron/forum_bulk_notification_to_course_teacher_for_new_post_in_last_X_days.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function sendMessage(
109109
$toUserId,
110110
$subject,
111111
$content,
112-
1,
112+
1
113113
);
114114
}
115115

plugin/buycourses/src/stripe_success.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
$plugin->get_lang('bc_subject'),
4646
$messageConfirmBuyerTemplate->fetch('buycourses/view/message_confirm_buyer.tpl'),
4747
'',
48-
$globalParameters['sale_email'],
48+
$globalParameters['sale_email']
4949
);
5050

5151
$messageConfirmTemplate = new Template();

plugin/h5pimport/Entity/H5pImport.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class H5pImport
7474
private $course;
7575

7676
/**
77-
* @var null|Session
77+
* @var Session|null
7878
*
7979
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Session")
8080
*
@@ -83,14 +83,14 @@ class H5pImport
8383
private $session;
8484

8585
/**
86-
* @var null|string
86+
* @var string|null
8787
*
8888
* @ORM\Column(name="name", type="text", nullable=true)
8989
*/
9090
private $name;
9191

9292
/**
93-
* @var null|string
93+
* @var string|null
9494
*
9595
* @ORM\Column(name="description", type="text", nullable=true)
9696
*/

plugin/h5pimport/Entity/H5pImportLibrary.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,24 +298,24 @@ public function setCourse(Course $course): self
298298
return $this;
299299
}
300300

301-
public function getCreatedAt(): \DateTime
301+
public function getCreatedAt(): DateTime
302302
{
303303
return $this->createdAt;
304304
}
305305

306-
public function setCreatedAt(\DateTime $createdAt): H5pImportLibrary
306+
public function setCreatedAt(DateTime $createdAt): H5pImportLibrary
307307
{
308308
$this->createdAt = $createdAt;
309309

310310
return $this;
311311
}
312312

313-
public function getModifiedAt(): \DateTime
313+
public function getModifiedAt(): DateTime
314314
{
315315
return $this->modifiedAt;
316316
}
317317

318-
public function setModifiedAt(\DateTime $modifiedAt): H5pImportLibrary
318+
public function setModifiedAt(DateTime $modifiedAt): H5pImportLibrary
319319
{
320320
$this->modifiedAt = $modifiedAt;
321321

plugin/h5pimport/Entity/H5pImportResults.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class H5pImportResults
6868
private $course;
6969

7070
/**
71-
* @var null|Session
71+
* @var Session|null
7272
*
7373
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Session")
7474
*
@@ -205,7 +205,7 @@ public function setUser(User $user): H5pImportResults
205205
return $this;
206206
}
207207

208-
public function getCreatedAt(): \DateTime
208+
public function getCreatedAt(): DateTime
209209
{
210210
return $this->createdAt;
211211
}
@@ -246,19 +246,19 @@ public function setTotalTime(int $totalTime): H5pImportResults
246246
return $this;
247247
}
248248

249-
public function setCreatedAt(\DateTime $createdAt): H5pImportResults
249+
public function setCreatedAt(DateTime $createdAt): H5pImportResults
250250
{
251251
$this->createdAt = $createdAt;
252252

253253
return $this;
254254
}
255255

256-
public function getModifiedAt(): \DateTime
256+
public function getModifiedAt(): DateTime
257257
{
258258
return $this->modifiedAt;
259259
}
260260

261-
public function setModifiedAt(\DateTime $modifiedAt): H5pImportResults
261+
public function setModifiedAt(DateTime $modifiedAt): H5pImportResults
262262
{
263263
$this->modifiedAt = $modifiedAt;
264264

plugin/h5pimport/src/H5pPackageImporter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ public static function create(array $fileInfo, Course $course): ZipPackageImport
6565
/**
6666
* Check the package and unzip it, checking if it has the 'h5p.json' file or some php script.
6767
*
68-
* @return mixed
69-
*
7068
* @throws \Exception
69+
*
70+
* @return mixed
7171
*/
7272
abstract public function import(): string;
7373

plugin/h5pimport/src/H5pPackageTools.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ public static function checkPackageIntegrity(object $h5pJson, string $extractedD
8888
* @param string $packagePath the path to the H5P package file
8989
* @param object $h5pJson the parsed H5P JSON object
9090
* @param Course $course the course entity related to the package
91-
* @param null|Session $session the session entity related to the package
92-
* @param null|array $values the advance options in upload form
91+
* @param Session|null $session the session entity related to the package
92+
* @param array|null $values the advance options in upload form
9393
*/
9494
public static function storeH5pPackage(
9595
string $packagePath,
@@ -196,7 +196,7 @@ public static function deleteH5pPackage(H5pImport $h5pImport): bool
196196
*
197197
* @return array the core settings for H5P content
198198
*/
199-
public static function getCoreSettings(H5pImport $h5pImport, \H5PCore $h5pCore): array
199+
public static function getCoreSettings(H5pImport $h5pImport, H5PCore $h5pCore): array
200200
{
201201
$originIsLearnpath = 'learnpath' === api_get_origin();
202202

@@ -270,7 +270,7 @@ public static function getCoreAssets()
270270
*
271271
* @param mixed $h5pNode
272272
*/
273-
public static function getContentSettings($h5pNode, \H5PCore $h5pCore): array
273+
public static function getContentSettings($h5pNode, H5PCore $h5pCore): array
274274
{
275275
$filtered = $h5pCore->filterParameters($h5pNode);
276276
$contentUserData = [

plugin/h5pimport/src/ZipPackageImporter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ class ZipPackageImporter extends H5pPackageImporter
6767
/**
6868
* Import an H5P package. No DB change.
6969
*
70-
* @return string The path to the extracted package directory.
71-
*
7270
* @throws Exception When the H5P package is invalid.
71+
*
72+
* @return string The path to the extracted package directory.
7373
*/
7474
public function import(): string
7575
{
@@ -160,7 +160,7 @@ private function generatePackageDirectory(string $name): string
160160
while ($fs->exists($directoryPath)) {
161161
$modifiedName = $safeName.'_'.$counter;
162162
$directoryPath = $baseDirectory.$modifiedName;
163-
++$counter;
163+
$counter++;
164164
}
165165
}
166166

plugin/h5pimport/src/ajax.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
}
2828

2929
if (is_numeric($_POST['score']) && is_numeric($_POST['maxScore'])) {
30-
/** @var null|H5pImport $h5pImport */
30+
/** @var H5pImport|null $h5pImport */
3131
$h5pImport = $h5pImportRepo->find($h5pId);
3232
$entityManager = Database::getManager();
3333

@@ -48,15 +48,15 @@
4848
$lpObject = Session::read('oLP');
4949
$clpItemViewRepo = $em->getRepository('ChamiloCourseBundle:CLpItemView');
5050

51-
/** @var null|CLpItemView $lpItemView */
51+
/** @var CLpItemView|null $lpItemView */
5252
$lpItemView = $clpItemViewRepo->findOneBy(
5353
[
5454
'lpViewId' => $lpObject->lp_view_id,
5555
'lpItemId' => $lpObject->current,
5656
]
5757
);
5858

59-
/** @var null|CLpItem $lpItem */
59+
/** @var CLpItem|null $lpItem */
6060
$lpItem = $entityManager->find('ChamiloCourseBundle:CLpItem', $lpItemView->getLpItemId());
6161
if ('h5p' !== $lpItem->getItemType()) {
6262
return null;
@@ -83,7 +83,7 @@
8383
H5PCore::ajaxError($plugin->get_lang('h5p_error_invalid_token'));
8484
}
8585

86-
/** @var null|H5pImport $h5pImport */
86+
/** @var H5pImport|null $h5pImport */
8787
$h5pImport = $h5pImportRepo->find($h5pId);
8888
} else {
8989
H5PCore::ajaxError(get_lang('InvalidAction'));

0 commit comments

Comments
 (0)