Minor code style fix - refs BT#17288

pull/3274/head
Sébastien Ducoulombier 6 years ago
parent 1b3c07d15b
commit 0b9197d56d
  1. 5
      plugin/zoom/API/JWTClient.php
  2. 15
      plugin/zoom/API/JsonDeserializable.php
  3. 3
      plugin/zoom/API/Meeting.php
  4. 3
      plugin/zoom/API/MeetingInstances.php
  5. 3
      plugin/zoom/API/MeetingList.php
  6. 2
      plugin/zoom/API/MeetingSettings.php
  7. 4
      plugin/zoom/API/ParticipantList.php
  8. 4
      plugin/zoom/API/RecordingMeeting.php
  9. 4
      plugin/zoom/lib/zoom_plugin.class.php

@ -120,7 +120,7 @@ class JWTClient
*/
public function getMeetings($type)
{
return $this->getFullList("users/me/meetings", MeetingList::class, 'meetings', ['type'=>$type]);
return $this->getFullList("users/me/meetings", MeetingList::class, 'meetings', ['type' => $type]);
}
/**
@ -293,11 +293,12 @@ class JWTClient
}
/**
* Retrieves a full list of items using one or more API calls to the Zoom server
* Retrieves a full list of items using one or more API calls to the Zoom server.
*
* @param string $relativePath @see self::send
* @param string $listClassName name of the API's list class, such as 'MeetingList'
* @param string $arrayPropertyName name of the class property that contains the actual items, such as 'meetings'
* @param array $parameters query string parameters associative array
*
* @throws Exception on API, JSON or other error
*

@ -8,7 +8,7 @@ use Exception;
trait JsonDeserializable
{
/**
* Builds a class instance from the Json description of the object
* Builds a class instance from the Json description of the object.
*
* @param string $json
*
@ -33,11 +33,12 @@ trait JsonDeserializable
}
/**
* Returns the class name of the items to be found in the named array property
* Returns the class name of the items to be found in the named array property.
*
* To override in classes that have a property of type array
*
* @param string $propertyName array property name
*
* @throws Exception if not implemented for this propertyName
*/
protected function itemClass($propertyName)
@ -47,9 +48,9 @@ trait JsonDeserializable
/**
* Copies values from another object properties to an instance, recursively
* Copies values from another object properties to an instance, recursively.
*
* @param object $source source object
* @param object $source source object
* @param object $destination specific class instance, with already initialized properties
*
* @throws Exception when the source object has an unexpected property
@ -68,7 +69,7 @@ trait JsonDeserializable
if (is_array($destination->$name)) {
foreach ($value as $sourceItem) {
$itemClass = $destination->itemClass($name);
$item = new $itemClass;
$item = new $itemClass();
self::recursivelyCopyObjectProperties($sourceItem, $item);
$destination->$name[] = $item;
}
@ -79,9 +80,7 @@ trait JsonDeserializable
$destination->$name = $value;
}
} else {
throw new Exception(
"Source object has property $name, which was not expected."
);
throw new Exception("Source object has property $name, which was not expected.");
}
}
}

@ -53,7 +53,7 @@ class Meeting
/**
* @param string $topic
* @param int $type
* @param int $type
* @return static
*/
public static function fromTopicAndType($topic, $type = self::TYPE_SCHEDULED)
@ -61,6 +61,7 @@ class Meeting
$instance = new static();
$instance->topic = $topic;
$instance->type = $type;
return $instance;
}
}

@ -24,7 +24,10 @@ class MeetingInstances
* @see JsonDeserializable::itemClass()
*
* @param string $propertyName array property name
*
* @throws Exception on wrong propertyName
*
* @return string
*/
protected function itemClass($propertyName)
{

@ -24,7 +24,10 @@ class MeetingList
* @see JsonDeserializable::itemClass()
*
* @param string $propertyName array property name
*
* @throws Exception on wrong propertyName
*
* @return string
*/
protected function itemClass($propertyName)
{

@ -56,7 +56,7 @@ class MeetingSettings
/** @var string either local, cloud or none */
public $auto_recording;
/** @var boolean @deprecated only signed in users can join this meeting */
/** @var bool @deprecated only signed in users can join this meeting */
public $enforce_login;
/** @var string @deprecated only signed in users with specified domains can join meetings */

@ -24,7 +24,10 @@ class ParticipantList
* @see JsonDeserializable::itemClass()
*
* @param string $propertyName array property name
*
* @throws Exception on wrong propertyName
*
* @return string
*/
protected function itemClass($propertyName)
{
@ -33,5 +36,4 @@ class ParticipantList
}
throw new Exception("No such array property $propertyName");
}
}

@ -51,7 +51,10 @@ class RecordingMeeting
* @see JsonDeserializable::itemClass()
*
* @param string $propertyName array property name
*
* @throws Exception on wrong propertyName
*
* @return string
*/
protected function itemClass($propertyName)
{
@ -60,5 +63,4 @@ class RecordingMeeting
}
throw new Exception("No such array property $propertyName");
}
}

@ -230,9 +230,9 @@ class ZoomPlugin extends Plugin
*
* @param string $meetingUUID
*
* @return RecordingMeeting the recordings of the meeting
*
* @throws Exception on API error
*
* @return RecordingMeeting the recordings of the meeting
*/
public function getRecordings($meetingUUID)
{

Loading…
Cancel
Save