Skip to content

Commit 81b130a

Browse files
authored
[8.x] Update doc blocks (#1218)
* Update top level * Chrome * Commands * Traits
1 parent b5495b9 commit 81b130a

12 files changed

Lines changed: 17 additions & 17 deletions

src/Browser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ public function elsewhereWhenAvailable($selector, Closure $callback, $seconds =
639639
* Return a browser scoped to the given component.
640640
*
641641
* @param \Laravel\Dusk\Component $component
642-
* @return \Laravel\Dusk\Browser
642+
* @return static
643643
*/
644644
public function component(Component $component)
645645
{

src/Chrome/SupportsChrome.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ trait SupportsChrome
1414
/**
1515
* The Chromedriver process instance.
1616
*
17-
* @var \Symfony\Component\Process\Process
17+
* @var \Symfony\Component\Process\Process|null
1818
*/
1919
protected static $chromeProcess;
2020

src/Concerns/InteractsWithAuthentication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function login()
2020
/**
2121
* Log into the application using a given user ID or email.
2222
*
23-
* @param object|string $userId
23+
* @param object|string|int $userId
2424
* @param string|null $guard
2525
* @return $this
2626
*/

src/Concerns/InteractsWithCookies.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ trait InteractsWithCookies
1616
* @param string|null $value
1717
* @param int|DateTimeInterface|null $expiry
1818
* @param array $options
19-
* @return $this|string|null
19+
* @return ($value is null ? string|null : $this)
2020
*/
2121
public function cookie($name, $value = null, $expiry = null, array $options = [])
2222
{
@@ -46,7 +46,7 @@ public function cookie($name, $value = null, $expiry = null, array $options = []
4646
* @param string|null $value
4747
* @param int|DateTimeInterface|null $expiry
4848
* @param array $options
49-
* @return $this|string|null
49+
* @return ($value is null ? string|null : $this)
5050
*/
5151
public function plainCookie($name, $value = null, $expiry = null, array $options = [])
5252
{

src/Concerns/InteractsWithElements.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function clickLink($link, $element = 'a')
5959
*
6060
* @param string $selector
6161
* @param string|null $value
62-
* @return $this
62+
* @return ($value is null ? string|true|null : $this)
6363
*/
6464
public function value($selector, $value = null)
6565
{
@@ -92,7 +92,7 @@ public function text($selector)
9292
*
9393
* @param string $selector
9494
* @param string $attribute
95-
* @return string
95+
* @return string|true|null
9696
*/
9797
public function attribute($selector, $attribute)
9898
{

src/Concerns/MakesAssertions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ public function assertInputValueIsNot($field, $value)
435435
* Get the value of the given input or text area field.
436436
*
437437
* @param string $field
438-
* @return string
438+
* @return string|true|null
439439
*/
440440
public function inputValue($field)
441441
{
@@ -1199,7 +1199,7 @@ public function assertVueDoesNotContain($key, $value, $componentSelector = null)
11991199
/**
12001200
* Retrieve the value of the Vue component's attribute at the given key.
12011201
*
1202-
* @param string $componentSelector
1202+
* @param string|null $componentSelector
12031203
* @param string $key
12041204
* @return mixed
12051205
*/

src/Concerns/MakesUrlAssertions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public function assertRouteIs($route, $parameters = [])
258258
* Assert that the given query string parameter is present and has a given value.
259259
*
260260
* @param string $name
261-
* @param string|null $value
261+
* @param string|array|null $value
262262
* @return $this
263263
*/
264264
public function assertQueryStringHas($name, $value = null)

src/Concerns/ProvidesBrowser.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ trait ProvidesBrowser
1616
/**
1717
* All of the active browser instances.
1818
*
19-
* @var array
19+
* @var \Illuminate\Support\Collection|array
2020
*/
2121
protected static $browsers = [];
2222

@@ -57,7 +57,7 @@ public static function afterClass(Closure $callback)
5757
* Create a new browser instance.
5858
*
5959
* @param \Closure $callback
60-
* @return \Laravel\Dusk\Browser|void
60+
* @return void
6161
*
6262
* @throws \Exception
6363
* @throws \Throwable
@@ -89,7 +89,7 @@ public function browse(Closure $callback)
8989
* Create the browser instances needed for the given callback.
9090
*
9191
* @param \Closure $callback
92-
* @return array
92+
* @return \Illuminate\Support\Collection
9393
*
9494
* @throws \ReflectionException
9595
*/

src/Concerns/WaitsForElements.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function waitUntilMissing($selector, $seconds = null)
7373
/**
7474
* Wait for the given text to be removed.
7575
*
76-
* @param string $text
76+
* @param array|string $text
7777
* @param int|null $seconds
7878
* @return $this
7979
*

src/Console/ChromeDriverCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ protected function latestVersion()
158158
* Detect the installed Chrome / Chromium major version.
159159
*
160160
* @param string $os
161-
* @return int|bool
161+
* @return string|false
162162
*/
163163
protected function detectChromeVersion($os)
164164
{

0 commit comments

Comments
 (0)