Update composer dependencies
This commit is contained in:
parent
58c179bef2
commit
3c0c375fbb
11 changed files with 127 additions and 122 deletions
|
@ -18,7 +18,7 @@ class ArticlesController extends Controller
|
|||
/**
|
||||
* Show all articles (with pagination).
|
||||
*/
|
||||
public function index(int $year = null, int $month = null): View
|
||||
public function index(?int $year = null, ?int $month = null): View
|
||||
{
|
||||
$articles = Article::where('published', '1')
|
||||
->date($year, $month)
|
||||
|
|
|
@ -107,7 +107,7 @@ class Article extends Model
|
|||
/**
|
||||
* Scope a query to only include articles from a particular year/month.
|
||||
*/
|
||||
public function scopeDate(Builder $query, int $year = null, int $month = null): Builder
|
||||
public function scopeDate(Builder $query, ?int $year = null, ?int $month = null): Builder
|
||||
{
|
||||
if ($year === null) {
|
||||
return $query;
|
||||
|
|
|
@ -8,7 +8,7 @@ use App\Models\Article;
|
|||
|
||||
class ArticleService extends Service
|
||||
{
|
||||
public function create(array $request, string $client = null): Article
|
||||
public function create(array $request, ?string $client = null): Article
|
||||
{
|
||||
return Article::create([
|
||||
'title' => $this->getDataByKey($request, 'name'),
|
||||
|
|
|
@ -18,7 +18,7 @@ class BookmarkService extends Service
|
|||
/**
|
||||
* Create a new Bookmark.
|
||||
*/
|
||||
public function create(array $request, string $client = null): Bookmark
|
||||
public function create(array $request, ?string $client = null): Bookmark
|
||||
{
|
||||
if (Arr::get($request, 'properties.bookmark-of.0')) {
|
||||
//micropub request
|
||||
|
|
|
@ -13,7 +13,7 @@ class LikeService extends Service
|
|||
/**
|
||||
* Create a new Like.
|
||||
*/
|
||||
public function create(array $request, string $client = null): Like
|
||||
public function create(array $request, ?string $client = null): Like
|
||||
{
|
||||
if (Arr::get($request, 'properties.like-of.0')) {
|
||||
//micropub request
|
||||
|
|
|
@ -15,7 +15,7 @@ class HEntryService
|
|||
/**
|
||||
* Create the relevant model from some h-entry data.
|
||||
*/
|
||||
public function process(array $request, string $client = null): ?string
|
||||
public function process(array $request, ?string $client = null): ?string
|
||||
{
|
||||
if (Arr::get($request, 'properties.like-of') || Arr::get($request, 'like-of')) {
|
||||
return resolve(LikeService::class)->create($request)->longurl;
|
||||
|
|
|
@ -18,7 +18,7 @@ class NoteService extends Service
|
|||
/**
|
||||
* Create a new note.
|
||||
*/
|
||||
public function create(array $request, string $client = null): Note
|
||||
public function create(array $request, ?string $client = null): Note
|
||||
{
|
||||
$note = Note::create(
|
||||
[
|
||||
|
|
|
@ -9,7 +9,7 @@ use Illuminate\Support\Arr;
|
|||
|
||||
abstract class Service
|
||||
{
|
||||
abstract public function create(array $request, string $client = null): Model;
|
||||
abstract public function create(array $request, ?string $client = null): Model;
|
||||
|
||||
protected function getDataByKey(array $request, string $key): ?string
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue