You've already forked ugly-queue
fix: Relabelling namespace/package names ♻️
All checks were successful
CI / release (push) Successful in 24s
All checks were successful
CI / release (push) Successful in 24s
This commit is contained in:
@@ -4,7 +4,7 @@ use DCarbone\Helpers\FileHelper;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class UglyQueue
|
* Class UglyQueue
|
||||||
* @package DCarbone
|
* @package Cybercinch
|
||||||
*/
|
*/
|
||||||
class UglyQueue implements \Serializable, \SplSubject, \Countable
|
class UglyQueue implements \Serializable, \SplSubject, \Countable
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class UglyQueueEnum
|
* Class UglyQueueEnum
|
||||||
* @package DCarbone
|
* @package Cybercinch
|
||||||
*
|
*
|
||||||
* Pseudo-enum thing.
|
* Pseudo-enum thing.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
<?php namespace Cybercinch;
|
<?php namespace Cybercinch;
|
||||||
|
|
||||||
|
use InvalidArgumentException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class UglyQueueManager
|
* Class UglyQueueManager
|
||||||
* @package DCarbone
|
* @package Cybercinch
|
||||||
*/
|
*/
|
||||||
class UglyQueueManager implements \SplObserver, \Countable
|
class UglyQueueManager implements \SplObserver, \Countable
|
||||||
{
|
{
|
||||||
@@ -17,12 +19,12 @@ class UglyQueueManager implements \SplObserver, \Countable
|
|||||||
*
|
*
|
||||||
* @param string $baseDir
|
* @param string $baseDir
|
||||||
* @throws \RuntimeException
|
* @throws \RuntimeException
|
||||||
* @throws \InvalidArgumentException
|
* @throws InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
public function __construct($baseDir)
|
public function __construct($baseDir)
|
||||||
{
|
{
|
||||||
if (false === is_string($baseDir))
|
if (false === is_string($baseDir))
|
||||||
throw new \InvalidArgumentException('Argument 1 expected to be string, "'.gettype($baseDir).'" seen.');
|
throw new InvalidArgumentException('Argument 1 expected to be string, "'.gettype($baseDir).'" seen.');
|
||||||
|
|
||||||
if (false === is_dir($baseDir))
|
if (false === is_dir($baseDir))
|
||||||
throw new \RuntimeException('"'.$baseDir.'" points to a directory that does not exist.');
|
throw new \RuntimeException('"'.$baseDir.'" points to a directory that does not exist.');
|
||||||
@@ -40,7 +42,7 @@ class UglyQueueManager implements \SplObserver, \Countable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @return UglyQueue|UglyQueueManager
|
* @return UglyQueue
|
||||||
*/
|
*/
|
||||||
public function getQueue($name)
|
public function getQueue($name)
|
||||||
{
|
{
|
||||||
@@ -56,7 +58,7 @@ class UglyQueueManager implements \SplObserver, \Countable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param UglyQueue $uglyQueue
|
* @param UglyQueue $uglyQueue
|
||||||
* @return \DCarbone\UglyQueueManager
|
* @return UglyQueueManager
|
||||||
* @throws \RuntimeException
|
* @throws \RuntimeException
|
||||||
*/
|
*/
|
||||||
public function addQueue(UglyQueue $uglyQueue)
|
public function addQueue(UglyQueue $uglyQueue)
|
||||||
@@ -111,7 +113,7 @@ class UglyQueueManager implements \SplObserver, \Countable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param UglyQueue $uglyQueue
|
* @param UglyQueue $uglyQueue
|
||||||
* @return \DCarbone\UglyQueueManager
|
* @return UglyQueueManager
|
||||||
*/
|
*/
|
||||||
public function removeQueue(UglyQueue $uglyQueue)
|
public function removeQueue(UglyQueue $uglyQueue)
|
||||||
{
|
{
|
||||||
@@ -124,7 +126,7 @@ class UglyQueueManager implements \SplObserver, \Countable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @return \DCarbone\UglyQueueManager
|
* @return UglyQueueManager
|
||||||
*/
|
*/
|
||||||
public function removeQueueByName($name)
|
public function removeQueueByName($name)
|
||||||
{
|
{
|
||||||
@@ -136,15 +138,15 @@ class UglyQueueManager implements \SplObserver, \Countable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @return \DCarbone\UglyQueue
|
* @return UglyQueue
|
||||||
* @throws \InvalidArgumentException
|
* @throws InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
public function getQueueWithName($name)
|
public function getQueueWithName($name)
|
||||||
{
|
{
|
||||||
if (isset($this->queues[$name]))
|
if (isset($this->queues[$name]))
|
||||||
return $this->queues[$name];
|
return $this->queues[$name];
|
||||||
|
|
||||||
throw new \InvalidArgumentException('Argument 1 expected to be valid queue name.');
|
throw new InvalidArgumentException('Argument 1 expected to be valid queue name.');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user