Skip to content

Commit c5fec93

Browse files
committed
Ran through phpcbf to clean up to PSR-12
1 parent 635510b commit c5fec93

22 files changed

+177
-172
lines changed

phpcs.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<ruleset name="PSR2">
3-
<rule ref="PSR2"/>
2+
<ruleset name="PSR12">
3+
<rule ref="PSR12"/>
44
<file>./src</file>
55
</ruleset>

src/OpenTok/Archive.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use OpenTok\Util\Client;
66
use OpenTok\Util\Validators;
7-
87
use OpenTok\Exception\InvalidArgumentException;
98
use OpenTok\Exception\ArchiveUnexpectedValueException;
109

@@ -77,7 +76,8 @@
7776
* set to null. The download URL is obfuscated, and the file is only available from the URL for
7877
* 10 minutes. To generate a new URL, call the Archive.listArchives() or OpenTok.getArchive() method.
7978
*/
80-
class Archive {
79+
class Archive
80+
{
8181
// NOTE: after PHP 5.3.0 support is dropped, the class can implement JsonSerializable
8282

8383
/** @internal */
@@ -122,7 +122,7 @@ public function __get($name)
122122
if ($this->isDeleted) {
123123
// TODO: throw an logic error about not being able to stop an archive thats deleted
124124
}
125-
switch($name) {
125+
switch ($name) {
126126
case 'createdAt':
127127
case 'duration':
128128
case 'id':

src/OpenTok/ArchiveList.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
/**
1111
* A class for accessing an array of Archive objects.
1212
*/
13-
class ArchiveList {
13+
class ArchiveList
14+
{
1415

1516
/**
1617
* @internal
@@ -79,7 +80,7 @@ public function getItems()
7980
{
8081
if (!$this->items) {
8182
$items = array();
82-
foreach($this->data['items'] as $archiveData) {
83+
foreach ($this->data['items'] as $archiveData) {
8384
$items[] = new Archive($archiveData, array( 'client' => $this->client ));
8485
}
8586
$this->items = $items;

src/OpenTok/ArchiveMode.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
* See <a href="OpenTok.OpenTok.html#method_createSession">OpenTok->createSession()</a>
1212
* and <a href="OpenTok.Archive.html#method_getArchiveMode">Session->getArchiveMode()</a>.
1313
*/
14-
abstract class ArchiveMode extends BasicEnum {
14+
abstract class ArchiveMode extends BasicEnum
15+
{
1516
/**
1617
* The session is not archived automatically. To archive the session, you can call the
1718
* \OpenTok\OpenTok->startArchive() method.

src/OpenTok/Broadcast.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Represents a broadcast of an OpenTok session.
1313
*
1414
* @property int $createdAt
15-
* The timestamp when the broadcast was created, expressed in seconds since the Unix epoch.
15+
* The timestamp when the broadcast was created, expressed in seconds since the Unix epoch.
1616
*
1717
* @property int $updatedAt
1818
* The time the broadcast was started or stopped, expressed in seconds since the Unix epoch.
@@ -35,7 +35,8 @@
3535
* @property boolean $isStopped
3636
* Whether the broadcast is stopped (true) or in progress (false).
3737
*/
38-
class Broadcast {
38+
class Broadcast
39+
{
3940
// NOTE: after PHP 5.3.0 support is dropped, the class can implement JsonSerializable
4041

4142
/** @ignore */

src/OpenTok/Exception/AuthenticationException.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ class AuthenticationException extends \OpenTok\Exception\DomainException impleme
1111
/** @ignore */
1212
public function __construct($apiKey, $apiSecret, $code = 0, $previous)
1313
{
14-
$message = 'The OpenTok API credentials were rejected. apiKey='.$apiKey.', apiSecret='.$apiSecret;
15-
parent::__construct($message, $code, $previous);
14+
$message = 'The OpenTok API credentials were rejected. apiKey=' . $apiKey . ', apiSecret=' . $apiSecret;
15+
parent::__construct($message, $code, $previous);
1616
}
1717
}
1818
/* vim: set ts=4 sw=4 tw=100 sts=4 et :*/

src/OpenTok/Exception/Exception.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* The interface used by all exceptions in the OpenTok PHP API.
77
*/
8-
interface Exception
8+
interface Exception
99
{
1010
}
1111
/* vim: set ts=4 sw=4 tw=100 sts=4 et :*/

src/OpenTok/Exception/ForceDisconnectConnectionException.php

+5-6
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
*/
99
class ForceDisconnectConnectionException extends \OpenTok\Exception\DomainException implements \OpenTok\Exception\ForceDisconnectException
1010
{
11-
/** @ignore */
12-
13-
public function __construct($message, $code)
14-
{
15-
parent::__construct($message, $code);
16-
}
11+
/** @ignore */
12+
public function __construct($message, $code)
13+
{
14+
parent::__construct($message, $code);
15+
}
1716
}

src/OpenTok/Exception/ForceDisconnectUnexpectedValueException.php

+5-6
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
*/
99
class ForceDisconnectUnexpectedValueException extends \OpenTok\Exception\UnexpectedValueException implements \OpenTok\Exception\ForceDisconnectException
1010
{
11-
/** @ignore */
12-
13-
public function __construct($message, $code)
14-
{
15-
parent::__construct($message, $code);
16-
}
11+
/** @ignore */
12+
public function __construct($message, $code)
13+
{
14+
parent::__construct($message, $code);
15+
}
1716
}

src/OpenTok/Exception/SignalConnectionException.php

+5-6
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
*/
99
class SignalConnectionException extends \OpenTok\Exception\DomainException implements \OpenTok\Exception\SignalException
1010
{
11-
/** @ignore */
12-
13-
public function __construct($message, $code)
14-
{
15-
parent::__construct($message, $code);
16-
}
11+
/** @ignore */
12+
public function __construct($message, $code)
13+
{
14+
parent::__construct($message, $code);
15+
}
1716
}

src/OpenTok/Exception/SignalUnexpectedValueException.php

+5-6
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
*/
99
class SignalUnexpectedValueException extends \OpenTok\Exception\UnexpectedValueException implements \OpenTok\Exception\SignalException
1010
{
11-
/** @ignore */
12-
13-
public function __construct($message, $code)
14-
{
15-
parent::__construct($message, $code);
16-
}
11+
/** @ignore */
12+
public function __construct($message, $code)
13+
{
14+
parent::__construct($message, $code);
15+
}
1716
}

src/OpenTok/Layout.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
* <a href="https://tokbox.com/developer/guides/broadcast/live-streaming/#configuring-video-layout-for-opentok-live-streaming-broadcasts">Configuring
2020
* video layout for OpenTok live streaming broadcasts</a>.
2121
*/
22-
class Layout {
22+
class Layout
23+
{
2324
// NOTE: after PHP 5.3.0 support is dropped, the class can implement JsonSerializable
2425

2526
/** @ignore */
@@ -81,7 +82,7 @@ public static function getHorizontalPresentation()
8182
* @param array $options An array containing one property: <code>$stylesheet<code>,
8283
* which is a string containing the stylesheet to be used for the layout.
8384
*/
84-
public static function createCustom($options)
85+
public static function createCustom($options)
8586
{
8687
// unpack optional arguments (merging with default values) into named variables
8788
// NOTE: the default value of stylesheet=null will not pass validation, this essentially

src/OpenTok/MediaMode.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
* Defines values for the mediaMode parameter of the \OpenTok\OpenTok->createSession()
99
* method.
1010
*/
11-
abstract class MediaMode extends BasicEnum {
11+
abstract class MediaMode extends BasicEnum
12+
{
1213
/**
1314
* The session will send streams using the OpenTok Media Router.
1415
*/

0 commit comments

Comments
 (0)