Skip to content

Commit

Permalink
Merge pull request #2 from t3ran13/master
Browse files Browse the repository at this point in the history
merge updates
  • Loading branch information
NickShtefan authored May 17, 2018
2 parents af08ccb + 5a328cc commit 1a10d2d
Show file tree
Hide file tree
Showing 71 changed files with 1,399 additions and 997 deletions.
25 changes: 0 additions & 25 deletions Commands/Broadcast/BroadcastTransactionCommand.php

This file was deleted.

25 changes: 0 additions & 25 deletions Commands/Broadcast/BroadcastTransactionSynchronousCommand.php

This file was deleted.

108 changes: 0 additions & 108 deletions Commands/Broadcast/CommandAbstract.php

This file was deleted.

20 changes: 0 additions & 20 deletions Commands/Broadcast/CommandInterface.php

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php


namespace GolosPHP\Commands\Login;
namespace GolosPHP\Commands;

use GolosPHP\Commands\CommandQueryDataInterface;

interface CommandInterface
{
Expand Down
4 changes: 4 additions & 0 deletions Commands/CommandQueryData.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,16 @@ protected function validate($value, $rule)
{
if ($rule === 'required') {
return $value === null ? false : true;
} elseif ($rule === 'bool') {
return $value !== null && is_bool($value);
} elseif ($rule === 'array') {
return $value !== null && is_array($value);
} elseif ($rule === 'string') {
return $value !== null && is_string($value);
} elseif ($rule === 'integer') {
return $value !== null && is_int($value);
} elseif ($rule === 'nullOrBool') {
return $value === null || is_bool($value);
} elseif ($rule === 'nullOrArray') {
return $value === null || is_array($value);
} elseif ($rule === 'nullOrString') {
Expand Down
Loading

0 comments on commit 1a10d2d

Please sign in to comment.