Skip to content
This repository was archived by the owner on Jun 9, 2023. It is now read-only.

Commit 1cd1f89

Browse files
committed
feat: Added namespace, classes to use and correct spelling in the comments
1 parent 7eed20c commit 1cd1f89

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

src/Joserick/Plex/Server/Library.php

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
<?php
22

3+
namespace Joserick\Plex\Server;
4+
5+
use Joserick\Plex\Plex_Server;
6+
use Joserick\Plex\Exception\Server\Plex_Exception_Server_Library;
7+
use Joserick\Plex\Server\Library\Plex_Server_Library_ItemAbstract;
8+
use Joserick\Plex\Server\Library\Plex_Server_Library_SectionAbstract;
9+
310
/**
411
* Plex Server Library
512
*
@@ -106,6 +113,8 @@ class Plex_Server_Library extends Plex_Server
106113
/**
107114
* Generic way of building a url agains the Plex library.
108115
*
116+
* @param string $endpoint A URL endpoint of a Plex service.
117+
*
109118
* @uses Plex_MachineAbstract::getBaseUrl()
110119
* @uses Plex_Server_Library::ENDPOINT_LIBRARY
111120
*
@@ -136,6 +145,8 @@ protected function buildUrl($endpoint)
136145
/**
137146
* Generic way of requesting Plex library items.
138147
*
148+
* @param string $endpoint A URL endpoint of a Plex service.
149+
*
139150
* @uses Plex_MachineAbstract::$name
140151
* @uses Plex_MachineAbstract::$address
141152
* @uses Plex_MachineAbstract::$port
@@ -144,7 +155,7 @@ protected function buildUrl($endpoint)
144155
* @uses Plex_Server_Library_ItemAbstract::factory()
145156
* @uses Plex_Server_Library_ItemInterface::setAttributes()
146157
*
147-
* return Plex_Server_Library_Item[] An array of plex library items.
158+
* @return Plex_Server_Library_Item[] An array of plex library items.
148159
*/
149160
protected function getItems($endpoint)
150161
{
@@ -173,7 +184,7 @@ protected function getItems($endpoint)
173184

174185
/**
175186
* Given a function name, uses that name to decide what Plex library item
176-
* item type with whic the function is associated. This is useful when
187+
* item type with which the function is associated. This is useful when
177188
* trying to polymorphically request items because we can use the calling
178189
* function to abstractly identify what type of item with which we are
179190
* dealing.
@@ -212,7 +223,7 @@ public function functionToType($function)
212223

213224
/**
214225
* Returns an array of user defined Plex library sections that can be used
215-
* to interact with th eitems contained within.
226+
* to interact with the items contained within.
216227
*
217228
* @uses Plex_MachineAbstract::$name
218229
* @uses Plex_MachineAbstract::$address
@@ -250,7 +261,7 @@ public function getSections()
250261
}
251262

252263
/**
253-
* Returns a Plex library section by its given key. Here we simpoly run
264+
* Returns a Plex library section by its given key. Here we simply run
254265
* self::getSections() because the endpoint /library/sections/ID does not
255266
* return full section data, it returns the categories below the section.
256267
*
@@ -263,7 +274,7 @@ public function getSections()
263274
*
264275
* @throws Plex_Exception_Server_Library()
265276
*
266-
* @deprecated This method is deprectated in lieu of the new getSection()
277+
* @deprecated This method is deprecated in lieu of the new getSection()
267278
* method.
268279
*/
269280
public function getSectionByKey($key)
@@ -327,7 +338,7 @@ public function getSection($polymorphicData)
327338
* @uses Plex_Server_Library::getItem()
328339
* @uses Plex_Server_Library::ENPOINT_RECENTLY_ADDED
329340
*
330-
* return Plex_Server_Library_Item[] An array of plex library items.
341+
* @return Plex_Server_Library_Item[] An array of plex library items.
331342
*/
332343
public function getRecentlyAddedItems()
333344
{
@@ -340,7 +351,7 @@ public function getRecentlyAddedItems()
340351
* @uses Plex_Server_Library::getItem()
341352
* @uses Plex_Server_Library::ENPOINT_RECENTLY_ADDED
342353
*
343-
* return Plex_Server_Library_Item[] An array of plex library items.
354+
* @return Plex_Server_Library_Item[] An array of plex library items.
344355
*/
345356
public function getOnDeckItems()
346357
{

0 commit comments

Comments
 (0)