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

Commit

Permalink
feat: Added namespace, classes to use and correct spelling in the com…
Browse files Browse the repository at this point in the history
…ments
  • Loading branch information
joserick committed Apr 13, 2019
1 parent 7eed20c commit 1cd1f89
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions src/Joserick/Plex/Server/Library.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?php

namespace Joserick\Plex\Server;

use Joserick\Plex\Plex_Server;
use Joserick\Plex\Exception\Server\Plex_Exception_Server_Library;
use Joserick\Plex\Server\Library\Plex_Server_Library_ItemAbstract;
use Joserick\Plex\Server\Library\Plex_Server_Library_SectionAbstract;

/**
* Plex Server Library
*
Expand Down Expand Up @@ -106,6 +113,8 @@ class Plex_Server_Library extends Plex_Server
/**
* Generic way of building a url agains the Plex library.
*
* @param string $endpoint A URL endpoint of a Plex service.
*
* @uses Plex_MachineAbstract::getBaseUrl()
* @uses Plex_Server_Library::ENDPOINT_LIBRARY
*
Expand Down Expand Up @@ -136,6 +145,8 @@ protected function buildUrl($endpoint)
/**
* Generic way of requesting Plex library items.
*
* @param string $endpoint A URL endpoint of a Plex service.
*
* @uses Plex_MachineAbstract::$name
* @uses Plex_MachineAbstract::$address
* @uses Plex_MachineAbstract::$port
Expand All @@ -144,7 +155,7 @@ protected function buildUrl($endpoint)
* @uses Plex_Server_Library_ItemAbstract::factory()
* @uses Plex_Server_Library_ItemInterface::setAttributes()
*
* return Plex_Server_Library_Item[] An array of plex library items.
* @return Plex_Server_Library_Item[] An array of plex library items.
*/
protected function getItems($endpoint)
{
Expand Down Expand Up @@ -173,7 +184,7 @@ protected function getItems($endpoint)

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

/**
* Returns an array of user defined Plex library sections that can be used
* to interact with th eitems contained within.
* to interact with the items contained within.
*
* @uses Plex_MachineAbstract::$name
* @uses Plex_MachineAbstract::$address
Expand Down Expand Up @@ -250,7 +261,7 @@ public function getSections()
}

/**
* Returns a Plex library section by its given key. Here we simpoly run
* Returns a Plex library section by its given key. Here we simply run
* self::getSections() because the endpoint /library/sections/ID does not
* return full section data, it returns the categories below the section.
*
Expand All @@ -263,7 +274,7 @@ public function getSections()
*
* @throws Plex_Exception_Server_Library()
*
* @deprecated This method is deprectated in lieu of the new getSection()
* @deprecated This method is deprecated in lieu of the new getSection()
* method.
*/
public function getSectionByKey($key)
Expand Down Expand Up @@ -327,7 +338,7 @@ public function getSection($polymorphicData)
* @uses Plex_Server_Library::getItem()
* @uses Plex_Server_Library::ENPOINT_RECENTLY_ADDED
*
* return Plex_Server_Library_Item[] An array of plex library items.
* @return Plex_Server_Library_Item[] An array of plex library items.
*/
public function getRecentlyAddedItems()
{
Expand All @@ -340,7 +351,7 @@ public function getRecentlyAddedItems()
* @uses Plex_Server_Library::getItem()
* @uses Plex_Server_Library::ENPOINT_RECENTLY_ADDED
*
* return Plex_Server_Library_Item[] An array of plex library items.
* @return Plex_Server_Library_Item[] An array of plex library items.
*/
public function getOnDeckItems()
{
Expand Down

0 comments on commit 1cd1f89

Please sign in to comment.