Skip to content

Commit 85d0b8e

Browse files
author
PrintNodeJames
authored
Merge pull request #8 from unlooped/master
Fix scales API
2 parents aa76f22 + a245277 commit 85d0b8e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/PrintNode/Request.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ public function getPrintJobsByPrinters()
489489
* @param string $computerId id of computer to find scales
490490
* @return Entity[]
491491
* */
492-
public function getScales(string $computerId)
492+
public function getScales($computerId)
493493
{
494494
$endPointUrl = $this->apiurl."/computer/";
495495
$endPointUrl.= $computerId;
@@ -522,7 +522,7 @@ public function getPrintersByComputers()
522522
$arguments = func_get_args();
523523

524524
if (count($arguments) > 2) {
525-
throw new InvalidArgumentException(
525+
throw new \InvalidArgumentException(
526526
sprintf(
527527
'Too many arguments given to getPrintersByComputers.'
528528
)
@@ -570,7 +570,7 @@ public function __call($methodName, $arguments)
570570
$arguments = array_shift($arguments);
571571

572572
if (!is_string($arguments)) {
573-
throw new InvalidArgumentException(
573+
throw new \InvalidArgumentException(
574574
sprintf(
575575
'Invalid argument type passed to %s. Expecting a string got %s',
576576
$methodName,
@@ -614,7 +614,7 @@ public function __call($methodName, $arguments)
614614
public function patch(Entity $entity)
615615
{
616616
if (!($entity instanceof Entity)) {
617-
throw new InvalidArgumentException(
617+
throw new \InvalidArgumentException(
618618
sprintf(
619619
'Invalid argument type passed to patch. Expecting Entity got %s',
620620
gettype($entity)
@@ -644,7 +644,7 @@ public function patch(Entity $entity)
644644
public function post(Entity $entity)
645645
{
646646
if (!($entity instanceof Entity)) {
647-
throw new InvalidArgumentException(
647+
throw new \InvalidArgumentException(
648648
sprintf(
649649
'Invalid argument type passed to patch. Expecting Entity got %s',
650650
gettype($entity)
@@ -677,7 +677,7 @@ public function put()
677677
$entity = array_shift($arguments);
678678

679679
if (!($entity instanceof Entity)) {
680-
throw new InvalidArgumentException(
680+
throw new \InvalidArgumentException(
681681
sprintf(
682682
'Invalid argument type passed to patch. Expecting Entity got %s',
683683
gettype($entity)

src/PrintNode/Scale.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @property-read string $port
1414
* @property-read int $count
1515
* @property-read int[string] $measurement
16-
* @property-read DateTime $clientReportedCreateTimestamp
16+
* @property-read \DateTime $clientReportedCreateTimestamp
1717
* @property-read string $ntpOffset
1818
* @property-read int $ageOfData
1919
* @property-read int $computerId
@@ -29,7 +29,7 @@ class Scale extends Entity
2929
protected $port;
3030
protected $count;
3131
protected $measurement;
32-
protected $clientReprotedCreateTimestamp;
32+
protected $clientReportedCreateTimestamp;
3333
protected $ntpOffset;
3434
protected $ageOfData;
3535
protected $computerId;

0 commit comments

Comments
 (0)