beyondcode /
dusk-dashboard
This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | namespace BeyondCode\DuskDashboard\Dusk\Concerns; |
||
| 4 | |||
| 5 | trait MakesAssertions |
||
| 6 | { |
||
| 7 | /** {@inheritdoc} */ |
||
| 8 | public function assertTitle($title) |
||
| 9 | { |
||
| 10 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
|
0 ignored issues
–
show
|
|||
| 11 | |||
| 12 | return parent::assertTitle($title); |
||
| 13 | } |
||
| 14 | |||
| 15 | /** {@inheritdoc} */ |
||
| 16 | public function assertTitleContains($title) |
||
| 17 | { |
||
| 18 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 19 | |||
| 20 | return parent::assertTitleContains($title); |
||
| 21 | } |
||
| 22 | |||
| 23 | /** {@inheritdoc} */ |
||
| 24 | public function assertHasCookie($name, $decrypt = true) |
||
| 25 | { |
||
| 26 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 27 | |||
| 28 | return parent::assertHasCookie($name, $decrypt); |
||
| 29 | } |
||
| 30 | |||
| 31 | /** {@inheritdoc} */ |
||
| 32 | public function assertHasPlainCookie($name) |
||
| 33 | { |
||
| 34 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 35 | |||
| 36 | return parent::assertHasPlainCookie($name); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** {@inheritdoc} */ |
||
| 40 | public function assertCookieMissing($name, $decrypt = true) |
||
| 41 | { |
||
| 42 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 43 | |||
| 44 | return parent::assertCookieMissing($name, $decrypt); |
||
| 45 | } |
||
| 46 | |||
| 47 | /** {@inheritdoc} */ |
||
| 48 | public function assertPlainCookieMissing($name) |
||
| 49 | { |
||
| 50 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 51 | |||
| 52 | return parent::assertPlainCookieMissing($name); |
||
| 53 | } |
||
| 54 | |||
| 55 | /** {@inheritdoc} */ |
||
| 56 | public function assertCookieValue($name, $value, $decrypt = true) |
||
| 57 | { |
||
| 58 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 59 | |||
| 60 | return parent::assertCookieValue($name, $value, $decrypt); |
||
| 61 | } |
||
| 62 | |||
| 63 | /** {@inheritdoc} */ |
||
| 64 | public function assertPlainCookieValue($name, $value) |
||
| 65 | { |
||
| 66 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 67 | |||
| 68 | return parent::assertPlainCookieValue($name, $value); |
||
| 69 | } |
||
| 70 | |||
| 71 | /** {@inheritdoc} */ |
||
| 72 | public function assertSee($text) |
||
| 73 | { |
||
| 74 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 75 | |||
| 76 | return parent::assertSee($text); |
||
| 77 | } |
||
| 78 | |||
| 79 | /** {@inheritdoc} */ |
||
| 80 | public function assertSeeIn($selector, $text) |
||
| 81 | { |
||
| 82 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 83 | |||
| 84 | return parent::assertSeeIn($selector, $text); |
||
| 85 | } |
||
| 86 | |||
| 87 | /** {@inheritdoc} */ |
||
| 88 | public function assertDontSeeIn($selector, $text) |
||
| 89 | { |
||
| 90 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 91 | |||
| 92 | return parent::assertDontSeeIn($selector, $text); |
||
| 93 | } |
||
| 94 | |||
| 95 | /** {@inheritdoc} */ |
||
| 96 | public function assertSourceHas($code) |
||
| 97 | { |
||
| 98 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 99 | |||
| 100 | return parent::assertSourceHas($code); |
||
| 101 | } |
||
| 102 | |||
| 103 | /** {@inheritdoc} */ |
||
| 104 | public function assertSourceMissing($code) |
||
| 105 | { |
||
| 106 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 107 | |||
| 108 | return parent::assertSourceMissing($code); |
||
| 109 | } |
||
| 110 | |||
| 111 | /** {@inheritdoc} */ |
||
| 112 | public function assertSeeLink($link) |
||
| 113 | { |
||
| 114 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 115 | |||
| 116 | return parent::assertSeeLink($link); |
||
| 117 | } |
||
| 118 | |||
| 119 | /** {@inheritdoc} */ |
||
| 120 | public function assertDontSeeLink($link) |
||
| 121 | { |
||
| 122 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 123 | |||
| 124 | return parent::assertDontSeeLink($link); |
||
| 125 | } |
||
| 126 | |||
| 127 | /** {@inheritdoc} */ |
||
| 128 | public function seeLink($link) |
||
| 129 | { |
||
| 130 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 131 | |||
| 132 | return parent::seeLink($link); |
||
| 133 | } |
||
| 134 | |||
| 135 | /** {@inheritdoc} */ |
||
| 136 | public function assertInputValue($field, $value) |
||
| 137 | { |
||
| 138 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 139 | |||
| 140 | return parent::assertInputValue($field, $value); |
||
| 141 | } |
||
| 142 | |||
| 143 | /** {@inheritdoc} */ |
||
| 144 | public function assertInputValueIsNot($field, $value) |
||
| 145 | { |
||
| 146 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 147 | |||
| 148 | return parent::assertInputValueIsNot($field, $value); |
||
| 149 | } |
||
| 150 | |||
| 151 | /** {@inheritdoc} */ |
||
| 152 | public function inputValue($field) |
||
| 153 | { |
||
| 154 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 155 | |||
| 156 | return parent::inputValue($field); |
||
| 157 | } |
||
| 158 | |||
| 159 | /** {@inheritdoc} */ |
||
| 160 | public function assertChecked($field, $value = null) |
||
| 161 | { |
||
| 162 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 163 | |||
| 164 | return parent::assertChecked($field, $value); |
||
| 165 | } |
||
| 166 | |||
| 167 | /** {@inheritdoc} */ |
||
| 168 | public function assertNotChecked($field, $value = null) |
||
| 169 | { |
||
| 170 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 171 | |||
| 172 | return parent::assertNotChecked($field, $value); |
||
| 173 | } |
||
| 174 | |||
| 175 | /** {@inheritdoc} */ |
||
| 176 | public function assertRadioSelected($field, $value) |
||
| 177 | { |
||
| 178 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 179 | |||
| 180 | return parent::assertRadioSelected($field, $value); |
||
| 181 | } |
||
| 182 | |||
| 183 | /** {@inheritdoc} */ |
||
| 184 | public function assertRadioNotSelected($field, $value = null) |
||
| 185 | { |
||
| 186 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 187 | |||
| 188 | return parent::assertRadioNotSelected($field, $value); |
||
| 189 | } |
||
| 190 | |||
| 191 | /** {@inheritdoc} */ |
||
| 192 | public function assertSelected($field, $value) |
||
| 193 | { |
||
| 194 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 195 | |||
| 196 | return parent::assertSelectHasOption($field, $value); |
||
|
0 ignored issues
–
show
It seems like you call parent on a different method (
assertSelectHasOption() instead of assertSelected()). Are you sure this is correct? If so, you might want to change this to $this->assertSelectHasOption().
This check looks for a call to a parent method whose name is different than the method from which it is called. Consider the following code: class Daddy
{
protected function getFirstName()
{
return "Eidur";
}
protected function getSurName()
{
return "Gudjohnsen";
}
}
class Son
{
public function getFirstName()
{
return parent::getSurname();
}
}
The Loading history...
|
|||
| 197 | } |
||
| 198 | |||
| 199 | /** {@inheritdoc} */ |
||
| 200 | public function assertNotSelected($field, $value) |
||
| 201 | { |
||
| 202 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 203 | |||
| 204 | return parent::assertNotSelected($field, $value); |
||
| 205 | } |
||
| 206 | |||
| 207 | /** {@inheritdoc} */ |
||
| 208 | public function assertSelectHasOptions($field, array $values) |
||
| 209 | { |
||
| 210 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 211 | |||
| 212 | return parent::assertSelectHasOptions($field, $values); |
||
| 213 | } |
||
| 214 | |||
| 215 | /** {@inheritdoc} */ |
||
| 216 | public function assertSelectMissingOptions($field, array $values) |
||
| 217 | { |
||
| 218 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 219 | |||
| 220 | return parent::assertSelectMissingOptions($field, $values); |
||
| 221 | } |
||
| 222 | |||
| 223 | /** {@inheritdoc} */ |
||
| 224 | public function assertSelectHasOption($field, $value) |
||
| 225 | { |
||
| 226 | return $this->assertSelectHasOptions($field, [$value]); |
||
| 227 | } |
||
| 228 | |||
| 229 | /** {@inheritdoc} */ |
||
| 230 | public function assertSelectMissingOption($field, $value) |
||
| 231 | { |
||
| 232 | return $this->assertSelectMissingOptions($field, [$value]); |
||
| 233 | } |
||
| 234 | |||
| 235 | /** {@inheritdoc} */ |
||
| 236 | public function selected($field, $value) |
||
| 237 | { |
||
| 238 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 239 | |||
| 240 | return parent::select($field, $value); |
||
|
0 ignored issues
–
show
It seems like you call parent on a different method (
select() instead of selected()). Are you sure this is correct? If so, you might want to change this to $this->select().
This check looks for a call to a parent method whose name is different than the method from which it is called. Consider the following code: class Daddy
{
protected function getFirstName()
{
return "Eidur";
}
protected function getSurName()
{
return "Gudjohnsen";
}
}
class Son
{
public function getFirstName()
{
return parent::getSurname();
}
}
The Loading history...
|
|||
| 241 | } |
||
| 242 | |||
| 243 | /** {@inheritdoc} */ |
||
| 244 | public function assertValue($selector, $value) |
||
|
0 ignored issues
–
show
|
|||
| 245 | { |
||
| 246 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 247 | |||
| 248 | return parent::assertValue($field, $value); |
||
|
0 ignored issues
–
show
|
|||
| 249 | } |
||
| 250 | |||
| 251 | /** {@inheritdoc} */ |
||
| 252 | public function assertVisible($selector) |
||
| 253 | { |
||
| 254 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 255 | |||
| 256 | return parent::assertVisible($selector); |
||
| 257 | } |
||
| 258 | |||
| 259 | /** {@inheritdoc} */ |
||
| 260 | public function assertPresent($selector) |
||
| 261 | { |
||
| 262 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 263 | |||
| 264 | return parent::assertPresent($selector); |
||
| 265 | } |
||
| 266 | |||
| 267 | /** {@inheritdoc} */ |
||
| 268 | public function assertMissing($selector) |
||
| 269 | { |
||
| 270 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 271 | |||
| 272 | return parent::assertMissing($selector); |
||
| 273 | } |
||
| 274 | |||
| 275 | /** {@inheritdoc} */ |
||
| 276 | public function assertDialogOpened($message) |
||
| 277 | { |
||
| 278 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 279 | |||
| 280 | return parent::assertDialogOpened($message); |
||
| 281 | } |
||
| 282 | |||
| 283 | /** {@inheritdoc} */ |
||
| 284 | public function assertEnabled($field) |
||
| 285 | { |
||
| 286 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 287 | |||
| 288 | return parent::assertEnabled($field); |
||
| 289 | } |
||
| 290 | |||
| 291 | /** {@inheritdoc} */ |
||
| 292 | public function assertDisabled($field) |
||
| 293 | { |
||
| 294 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 295 | |||
| 296 | return parent::assertDisabled($field); |
||
| 297 | } |
||
| 298 | |||
| 299 | /** {@inheritdoc} */ |
||
| 300 | public function assertFocused($field) |
||
| 301 | { |
||
| 302 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 303 | |||
| 304 | return parent::assertFocused($field); |
||
| 305 | } |
||
| 306 | |||
| 307 | /** {@inheritdoc} */ |
||
| 308 | public function assertNotFocused($field) |
||
| 309 | { |
||
| 310 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 311 | |||
| 312 | return parent::assertNotFocused($field); |
||
| 313 | } |
||
| 314 | |||
| 315 | /** {@inheritdoc} */ |
||
| 316 | public function assertVue($key, $value, $componentSelector = null) |
||
| 317 | { |
||
| 318 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 319 | |||
| 320 | return parent::assertVue($key, $value, $componentSelector); |
||
| 321 | } |
||
| 322 | |||
| 323 | /** {@inheritdoc} */ |
||
| 324 | public function assertVueIsNot($key, $value, $componentSelector = null) |
||
| 325 | { |
||
| 326 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 327 | |||
| 328 | return parent::assertVueIsNot($key, $value, $componentSelector); |
||
| 329 | } |
||
| 330 | |||
| 331 | /** {@inheritdoc} */ |
||
| 332 | public function assertVueContains($key, $value, $componentSelector = null) |
||
| 333 | { |
||
| 334 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 335 | |||
| 336 | return parent::assertVueContains($key, $value, $componentSelector); |
||
| 337 | } |
||
| 338 | |||
| 339 | /** {@inheritdoc} */ |
||
| 340 | public function assertVueDoesNotContain($key, $value, $componentSelector = null) |
||
| 341 | { |
||
| 342 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 343 | |||
| 344 | return parent::assertVueDoesNotContain($key, $value, $componentSelector); |
||
| 345 | } |
||
| 346 | |||
| 347 | /** {@inheritdoc} */ |
||
| 348 | public function vueAttribute($componentSelector, $key) |
||
| 349 | { |
||
| 350 | $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this); |
||
| 351 | |||
| 352 | return parent::vueAttribute($componentSelector, $key); |
||
| 353 | } |
||
| 354 | } |
||
| 355 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: