Skip to content

Commit afb0c03

Browse files
GrahamCampbellnunomadurotaylorotwell
authored
[7.x] Fixes database offset value with non numbers (#39656)
* Fixes database offset value with non numbers (#37164) * Apply fixes from StyleCI Co-authored-by: Nuno Maduro <enunomaduro@gmail.com> Co-authored-by: Taylor Otwell <taylorotwell@users.noreply.github.com>
1 parent 46130d0 commit afb0c03

40 files changed

+116
-81
lines changed

src/Illuminate/Console/Events/ScheduledTaskFailed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class ScheduledTaskFailed
2424
/**
2525
* Create a new event instance.
2626
*
27-
* @param \Illuminate\Console\Scheduling\Event $task
28-
* @param \Throwable $exception
27+
* @param \Illuminate\Console\Scheduling\Event $task
28+
* @param \Throwable $exception
2929
*/
3030
public function __construct(Event $task, Throwable $exception)
3131
{

src/Illuminate/Console/Scheduling/Event.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ protected function pingCallback($url)
579579
return function (Container $container, HttpClient $http) use ($url) {
580580
try {
581581
$http->request('GET', $url);
582-
} catch (ClientExceptionInterface | TransferException $e) {
582+
} catch (ClientExceptionInterface|TransferException $e) {
583583
$container->make(ExceptionHandler::class)->report($e);
584584
}
585585
};

src/Illuminate/Container/Container.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,6 @@ protected function fireAfterResolvingCallbacks($abstract, $object)
11121112
* @param string $abstract
11131113
* @param object $object
11141114
* @param array $callbacksPerType
1115-
*
11161115
* @return array
11171116
*/
11181117
protected function getCallbacksForType($abstract, $object, array $callbacksPerType)

src/Illuminate/Contracts/Foundation/Application.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ public function basePath($path = '');
2424
/**
2525
* Get the path to the bootstrap directory.
2626
*
27-
* @param string $path Optionally, a path to append to the bootstrap path
27+
* @param string $path Optionally, a path to append to the bootstrap path
2828
* @return string
2929
*/
3030
public function bootstrapPath($path = '');
3131

3232
/**
3333
* Get the path to the application configuration files.
3434
*
35-
* @param string $path Optionally, a path to append to the config path
35+
* @param string $path Optionally, a path to append to the config path
3636
* @return string
3737
*/
3838
public function configPath($path = '');
3939

4040
/**
4141
* Get the path to the database directory.
4242
*
43-
* @param string $path Optionally, a path to append to the database path
43+
* @param string $path Optionally, a path to append to the database path
4444
* @return string
4545
*/
4646
public function databasePath($path = '');

src/Illuminate/Database/Eloquent/Relations/BelongsTo.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ class BelongsTo extends Relation
5454
* @param string $foreignKey
5555
* @param string $ownerKey
5656
* @param string $relationName
57-
*
5857
* @return void
5958
*/
6059
public function __construct(Builder $query, Model $child, $foreignKey, $ownerKey, $relationName)

src/Illuminate/Database/Query/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2022,7 +2022,7 @@ public function offset($value)
20222022
{
20232023
$property = $this->unions ? 'unionOffset' : 'offset';
20242024

2025-
$this->$property = max(0, $value);
2025+
$this->$property = max(0, (int) $value);
20262026

20272027
return $this;
20282028
}

src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,7 @@ protected function typeDateTime(Fluent $column)
625625
* Create the column definition for a date-time (with time zone) type.
626626
*
627627
* Note: "SQLite does not have a storage class set aside for storing dates and/or times."
628+
*
628629
* @link https://www.sqlite.org/datatype3.html
629630
*
630631
* @param \Illuminate\Support\Fluent $column

src/Illuminate/Foundation/Application.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ public function useAppPath($path)
344344
/**
345345
* Get the base path of the Laravel installation.
346346
*
347-
* @param string $path Optionally, a path to append to the base path
347+
* @param string $path Optionally, a path to append to the base path
348348
* @return string
349349
*/
350350
public function basePath($path = '')
@@ -355,7 +355,7 @@ public function basePath($path = '')
355355
/**
356356
* Get the path to the bootstrap directory.
357357
*
358-
* @param string $path Optionally, a path to append to the bootstrap path
358+
* @param string $path Optionally, a path to append to the bootstrap path
359359
* @return string
360360
*/
361361
public function bootstrapPath($path = '')
@@ -366,7 +366,7 @@ public function bootstrapPath($path = '')
366366
/**
367367
* Get the path to the application configuration files.
368368
*
369-
* @param string $path Optionally, a path to append to the config path
369+
* @param string $path Optionally, a path to append to the config path
370370
* @return string
371371
*/
372372
public function configPath($path = '')
@@ -377,7 +377,7 @@ public function configPath($path = '')
377377
/**
378378
* Get the path to the database directory.
379379
*
380-
* @param string $path Optionally, a path to append to the database path
380+
* @param string $path Optionally, a path to append to the database path
381381
* @return string
382382
*/
383383
public function databasePath($path = '')

src/Illuminate/Foundation/Testing/Concerns/InteractsWithExceptionHandling.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ protected function withoutExceptionHandling(array $except = [])
6464
$this->originalExceptionHandler = app(ExceptionHandler::class);
6565
}
6666

67-
$this->app->instance(ExceptionHandler::class, new class($this->originalExceptionHandler, $except) implements ExceptionHandler {
67+
$this->app->instance(ExceptionHandler::class, new class($this->originalExceptionHandler, $except) implements ExceptionHandler
68+
{
6869
protected $except;
6970
protected $originalHandler;
7071

src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ public function withoutMiddleware($middleware = null)
142142
}
143143

144144
foreach ((array) $middleware as $abstract) {
145-
$this->app->instance($abstract, new class {
145+
$this->app->instance($abstract, new class
146+
{
146147
public function handle($request, $next)
147148
{
148149
return $next($request);

0 commit comments

Comments
 (0)