@@ -1418,7 +1418,7 @@ discard block |
||
1418 | 1418 | * use this in your own stories whenever you to need to add an extra log |
1419 | 1419 | * message, for example to make it really clear what is happening. |
1420 | 1420 | * |
1421 | - * @return \Storyplayer\SPv2\Modules\Host\UsingLog |
|
1421 | + * @return Log\UsingLog |
|
1422 | 1422 | */ |
1423 | 1423 | function usingLog() |
1424 | 1424 | { |
@@ -1615,6 +1615,7 @@ discard block |
||
1615 | 1615 | * This module is for internal use inside Storyplayer. You shouldn't need to |
1616 | 1616 | * use it from your own stories. |
1617 | 1617 | * |
1618 | + * @param string $tableName |
|
1618 | 1619 | * @return \Prose\UsingRuntimeTable |
1619 | 1620 | */ |
1620 | 1621 | function usingRuntimeTable($tableName) |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | // what are we doing? |
91 | - $logMsg = [ "HTTP " . strtoupper($verb) . " '${url}'" ]; |
|
91 | + $logMsg = ["HTTP " . strtoupper($verb) . " '${url}'"]; |
|
92 | 92 | if ($body != null) { |
93 | 93 | $logMsg[] = $body; |
94 | 94 | } |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | foreach ($body as $key => $value) { |
113 | 113 | $request->addData($key, $value); |
114 | 114 | } |
115 | - }else{ |
|
115 | + } else { |
|
116 | 116 | $request->setPayload($body); |
117 | 117 | } |
118 | 118 |
@@ -112,7 +112,8 @@ |
||
112 | 112 | foreach ($body as $key => $value) { |
113 | 113 | $request->addData($key, $value); |
114 | 114 | } |
115 | - }else{ |
|
115 | + } |
|
116 | + else { |
|
116 | 117 | $request->setPayload($body); |
117 | 118 | } |
118 | 119 |
@@ -177,6 +177,7 @@ discard block |
||
177 | 177 | |
178 | 178 | /** |
179 | 179 | * @deprecated since v2.4.0 |
180 | + * @param string $sessionName |
|
180 | 181 | */ |
181 | 182 | public function screenIsRunning($sessionName) |
182 | 183 | { |
@@ -185,6 +186,7 @@ discard block |
||
185 | 186 | |
186 | 187 | /** |
187 | 188 | * @deprecated since v2.4.0 |
189 | + * @param string $sessionName |
|
188 | 190 | */ |
189 | 191 | public function screenIsNotRunning($sessionName) |
190 | 192 | { |
@@ -61,7 +61,7 @@ |
||
61 | 61 | * Storyplayer finishes the current test run. You can prevent this by using |
62 | 62 | * the --readonly-users command-line switch. |
63 | 63 | * |
64 | - * @return \Storyplayer\SPv2\Module\Users\FromUsers |
|
64 | + * @return FromUsers |
|
65 | 65 | */ |
66 | 66 | function fromUsers() |
67 | 67 | { |
@@ -79,7 +79,7 @@ |
||
79 | 79 | */ |
80 | 80 | function fromSupervisor($hostId) |
81 | 81 | { |
82 | - return new FromSupervisor(StoryTeller::instance(),[$hostId]); |
|
82 | + return new FromSupervisor(StoryTeller::instance(), [$hostId]); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | // where are we unbinding from? |
97 | 97 | $endpoints = fromZmqSocket($this->args[0])->getEndpoints(); |
98 | 98 | |
99 | - foreach($endpoints['bind'] as $address) { |
|
99 | + foreach ($endpoints['bind'] as $address) { |
|
100 | 100 | usingLog()->writeToLog("unbinding from {$address}"); |
101 | 101 | $this->args[0]->unbind($address); |
102 | 102 | } |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | // where are we disconnecting from? |
157 | 157 | $endpoints = fromZmqSocket($this->args[0])->getEndpoints(); |
158 | 158 | |
159 | - foreach($endpoints['connect'] as $address) { |
|
159 | + foreach ($endpoints['connect'] as $address) { |
|
160 | 160 | usingLog()->writeToLog("disconnecting from {$address}"); |
161 | 161 | $this->args[0]->disconnect($address); |
162 | 162 | } |
@@ -60,7 +60,7 @@ |
||
60 | 60 | */ |
61 | 61 | class UsingZmq extends Prose |
62 | 62 | { |
63 | - protected $socketMap = array ( |
|
63 | + protected $socketMap = array( |
|
64 | 64 | ZMQ::SOCKET_PUB => "ZMQ::SOCKET_PUB", |
65 | 65 | ZMQ::SOCKET_SUB => "ZMQ::SOCKET_SUB", |
66 | 66 | ZMQ::SOCKET_REQ => "ZMQ::SOCKET_REQ", |
@@ -59,7 +59,7 @@ |
||
59 | 59 | * __construct |
60 | 60 | * |
61 | 61 | * @param StoryTeller $st The StoryTeller object |
62 | - * @param array $args Any arguments to be used in this Prose module |
|
62 | + * @param string[] $args Any arguments to be used in this Prose module |
|
63 | 63 | * |
64 | 64 | * @return parent::__construct |
65 | 65 | */ |
@@ -65,8 +65,8 @@ |
||
65 | 65 | */ |
66 | 66 | public function __construct(StoryTeller $st, $args = array()) |
67 | 67 | { |
68 | - if (!isset($args[0])){ |
|
69 | - throw new E4xx_MissingArgument(__METHOD__, "You must provide a table name to ".get_class($this)."::__construct"); |
|
68 | + if (!isset($args[0])) { |
|
69 | + throw new E4xx_MissingArgument(__METHOD__, "You must provide a table name to " . get_class($this) . "::__construct"); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | // normalise |
@@ -65,7 +65,7 @@ |
||
65 | 65 | */ |
66 | 66 | public function __construct(StoryTeller $st, $args = array()) |
67 | 67 | { |
68 | - if (!isset($args[0])){ |
|
68 | + if (!isset($args[0])) { |
|
69 | 69 | throw new E4xx_MissingArgument(__METHOD__, "You must provide a table name to ".get_class($this)."::__construct"); |
70 | 70 | } |
71 | 71 |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $tables = $this->getAllTables(); |
73 | 73 | |
74 | 74 | // make sure we have a table |
75 | - if (!isset($tables->$tableName)){ |
|
75 | + if (!isset($tables->$tableName)) { |
|
76 | 76 | $tables->$tableName = new BaseObject(); |
77 | 77 | } |
78 | 78 | if (!isset($tables->$tableName->$targetEnv)) { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $tables = $this->getAllTables(); |
98 | 98 | |
99 | 99 | // make sure we have a table |
100 | - if (!isset($tables->$tableName)){ |
|
100 | + if (!isset($tables->$tableName)) { |
|
101 | 101 | $tables->$tableName = new BaseObject(); |
102 | 102 | } |
103 | 103 | if (!isset($tables->$tableName->$targetEnv)) { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $tables = $this->getAllTables(); |
73 | 73 | |
74 | 74 | // make sure we have a table |
75 | - if (!isset($tables->$tableName)){ |
|
75 | + if (!isset($tables->$tableName)) { |
|
76 | 76 | $tables->$tableName = new BaseObject(); |
77 | 77 | } |
78 | 78 | if (!isset($tables->$tableName->$targetEnv)) { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $tables = $this->getAllTables(); |
98 | 98 | |
99 | 99 | // make sure we have a table |
100 | - if (!isset($tables->$tableName)){ |
|
100 | + if (!isset($tables->$tableName)) { |
|
101 | 101 | $tables->$tableName = new BaseObject(); |
102 | 102 | } |
103 | 103 | if (!isset($tables->$tableName->$targetEnv)) { |