Skip to content

Commit 7ea8e13

Browse files
authored
Merge pull request #154 from littleredbutton/fix-code-style
Fix code style
2 parents 6aff919 + 519529d commit 7ea8e13

18 files changed

Lines changed: 11 additions & 62 deletions

.php-cs-fixer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
'yoda_style' => false,
1919
'single_line_throw' => false,
2020
'increment_style' => false,
21+
'modernize_strpos' => false,
22+
'get_class_to_class_keyword' => false,
2123
])
2224
->setRiskyAllowed(true)
2325
->setFinder($finder);

src/BigBlueButton.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
use BigBlueButton\Responses\PutRecordingTextTrackResponse;
6060
use BigBlueButton\Responses\UpdateRecordingsResponse;
6161
use BigBlueButton\Util\UrlBuilder;
62-
use SimpleXMLElement;
6362

6463
/**
6564
* Class BigBlueButton.
@@ -108,7 +107,7 @@ class BigBlueButton
108107
*
109108
* @throws ConfigException
110109
*/
111-
public function __construct(?string $baseUrl = null, ?string $secret = null, ?TransportInterface $transport = null)
110+
public function __construct(string $baseUrl = null, string $secret = null, TransportInterface $transport = null)
112111
{
113112
// Keeping backward compatibility with older deployed versions
114113
$this->securitySecret = $secret ?: getenv('BBB_SECURITY_SALT') ?: getenv('BBB_SECRET');
@@ -478,10 +477,10 @@ public function setJSessionId(string $jSessionId): void
478477
* @throws ParsingException
479478
* @throws RuntimeException
480479
*/
481-
private function processXmlResponse(string $url, string $payload = '', string $contentType = 'application/xml'): SimpleXMLElement
480+
private function processXmlResponse(string $url, string $payload = '', string $contentType = 'application/xml'): \SimpleXMLElement
482481
{
483482
try {
484-
return new SimpleXMLElement($this->requestUrl($url, $payload, $contentType));
483+
return new \SimpleXMLElement($this->requestUrl($url, $payload, $contentType));
485484
} catch (NetworkException|RuntimeException $e) {
486485
throw $e;
487486
} catch (\Throwable $e) {

src/Exceptions/BaseException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@
2121

2222
namespace BigBlueButton\Exceptions;
2323

24-
use Exception;
25-
2624
/**
2725
* @abstract since 4.0.
2826
*/
29-
class BaseException extends Exception
27+
class BaseException extends \Exception
3028
{
3129
}

src/Http/Transport/Bridge/PsrHttpClient/PsrHttpClientTransport.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@ public function __construct(
104104
$this->defaultHeaders = $defaultHeaders;
105105
}
106106

107-
/**
108-
* {@inheritDoc}
109-
*/
110107
public function request(TransportRequest $request): TransportResponse
111108
{
112109
if ('' !== $payload = $request->getPayload()) {

src/Http/Transport/Bridge/SymfonyHttpClient/SymfonyHttpClientTransport.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,6 @@ public static function create(array $defaultHeaders = [], array $defaultOptions
101101
// @codeCoverageIgnoreEnd
102102
}
103103

104-
/**
105-
* {@inheritDoc}
106-
*/
107104
public function request(TransportRequest $request): TransportResponse
108105
{
109106
$headers = $this->defaultHeaders;

src/Http/Transport/CurlTransport.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ public static function createWithDefaultOptions(array $additionalCurlOptions = [
8484
// @codeCoverageIgnoreEnd
8585
}
8686

87-
/**
88-
* {@inheritDoc}
89-
*/
9087
public function request(TransportRequest $request): TransportResponse
9188
{
9289
// @codeCoverageIgnoreStart

src/Parameters/BaseParameters.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ public function __call(string $name, array $arguments)
4545
return null;
4646
}
4747

48-
/**
49-
* @return mixed
50-
*/
5148
protected function getter(string $name)
5249
{
5350
if (property_exists($this, $name)) {

src/Parameters/CreateMeetingParameters.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ public function setGuestPolicyAlwaysAccept(): self
476476
return $this;
477477
}
478478

479-
public function addPresentation(string $nameOrUrl, ?string $content = null, ?string $filename = null): self
479+
public function addPresentation(string $nameOrUrl, string $content = null, string $filename = null): self
480480
{
481481
if (!$filename) {
482482
$this->presentations[$nameOrUrl] = !$content ?: base64_encode($content);
@@ -492,9 +492,6 @@ public function getPresentations(): array
492492
return $this->presentations;
493493
}
494494

495-
/**
496-
* @return mixed
497-
*/
498495
public function getPresentationsAsXML()
499496
{
500497
$result = '';

src/Parameters/InsertDocumentParameters.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct(string $meetingID)
4242
$this->meetingID = $meetingID;
4343
}
4444

45-
public function addPresentation(string $url, string $filename, ?bool $downloadable = null, ?bool $removable = null): self
45+
public function addPresentation(string $url, string $filename, bool $downloadable = null, bool $removable = null): self
4646
{
4747
$this->presentations[$url] = [
4848
'filename' => $filename,
@@ -60,9 +60,6 @@ public function removePresentation(string $url): self
6060
return $this;
6161
}
6262

63-
/**
64-
* @return mixed
65-
*/
6663
public function getPresentationsAsXML()
6764
{
6865
$result = '';

src/Parameters/PutRecordingTextTrackParameters.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,10 @@ class PutRecordingTextTrackParameters extends BaseParameters
6262
*/
6363
protected $contentType;
6464

65-
/**
66-
* @var mixed
67-
*/
6865
protected $file;
6966

7067
/**
7168
* GetRecordingTextTracksParameters constructor.
72-
*
73-
* @param $recordID
7469
*/
7570
public function __construct(string $recordID, string $kind, string $lang, string $label)
7671
{

0 commit comments

Comments
 (0)