Merge pull request #157 from jonnybarnes/ide-helper

IDE Helper added
This commit is contained in:
Jonny Barnes 2020-02-22 13:27:46 +00:00 committed by GitHub
commit 4cc9b4fa30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 21237 additions and 22 deletions

1477
.phpstorm.meta.php Normal file

File diff suppressed because it is too large Load diff

18857
_ide_helper.php Normal file

File diff suppressed because it is too large Load diff

View file

@ -15,6 +15,45 @@ use League\CommonMark\Environment;
use Spatie\CommonMarkHighlighter\FencedCodeRenderer;
use Spatie\CommonMarkHighlighter\IndentedCodeRenderer;
/**
* App\Models\Article.
*
* @property int $id
* @property string $titleurl
* @property string|null $url
* @property string $title
* @property string $main
* @property int $published
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at
* @property-read string $html
* @property-read string $human_time
* @property-read string $link
* @property-read string $pubdate
* @property-read string $tooltip_time
* @property-read string $w3c_time
* @method static Builder|\App\Models\Article date($year = null, $month = null)
* @method static Builder|\App\Models\Article findSimilarSlugs($attribute, $config, $slug)
* @method static bool|null forceDelete()
* @method static Builder|\App\Models\Article newModelQuery()
* @method static Builder|\App\Models\Article newQuery()
* @method static \Illuminate\Database\Query\Builder|\App\Models\Article onlyTrashed()
* @method static Builder|\App\Models\Article query()
* @method static bool|null restore()
* @method static Builder|\App\Models\Article whereCreatedAt($value)
* @method static Builder|\App\Models\Article whereDeletedAt($value)
* @method static Builder|\App\Models\Article whereId($value)
* @method static Builder|\App\Models\Article whereMain($value)
* @method static Builder|\App\Models\Article wherePublished($value)
* @method static Builder|\App\Models\Article whereTitle($value)
* @method static Builder|\App\Models\Article whereTitleurl($value)
* @method static Builder|\App\Models\Article whereUpdatedAt($value)
* @method static Builder|\App\Models\Article whereUrl($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\Article withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\Article withoutTrashed()
* @mixin \Eloquent
*/
class Article extends Model
{
use Sluggable;
@ -123,9 +162,12 @@ class Article extends Model
/**
* Scope a query to only include articles from a particular year/month.
*
* @return \Illuminate\Database\Eloquent\Builder
* @param Builder $query
* @param int|null $year
* @param int|null $month
* @return Builder
*/
public function scopeDate($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;

View file

@ -5,7 +5,37 @@ declare(strict_types=1);
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
/**
* App\Models\Bookmark.
*
* @property int $id
* @property string $url
* @property string|null $name
* @property string|null $content
* @property string|null $screenshot
* @property string|null $archive
* @property array|null $syndicates
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read string $longurl
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Tag[] $tags
* @property-read int|null $tags_count
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Bookmark newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Bookmark newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Bookmark query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Bookmark whereArchive($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Bookmark whereContent($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Bookmark whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Bookmark whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Bookmark whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Bookmark whereScreenshot($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Bookmark whereSyndicates($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Bookmark whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Bookmark whereUrl($value)
* @mixin \Eloquent
*/
class Bookmark extends Model
{
/**
@ -27,7 +57,7 @@ class Bookmark extends Model
/**
* The tags that belong to the bookmark.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
* @return BelongsToMany
*/
public function tags()
{

View file

@ -6,6 +6,30 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* App\Models\Contact.
*
* @property int $id
* @property string $nick
* @property string $name
* @property string|null $homepage
* @property string|null $twitter
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property string|null $facebook
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Contact newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Contact newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Contact query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Contact whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Contact whereFacebook($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Contact whereHomepage($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Contact whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Contact whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Contact whereNick($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Contact whereTwitter($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Contact whereUpdatedAt($value)
* @mixin \Eloquent
*/
class Contact extends Model
{
/**

View file

@ -9,6 +9,28 @@ use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Arr;
use Mf2;
/**
* App\Models\Like.
*
* @property int $id
* @property string $url
* @property string|null $author_name
* @property string|null $author_url
* @property string|null $content
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Like newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Like newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Like query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Like whereAuthorName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Like whereAuthorUrl($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Like whereContent($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Like whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Like whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Like whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Like whereUrl($value)
* @mixin \Eloquent
*/
class Like extends Model
{
use FilterHtml;
@ -28,7 +50,7 @@ class Like extends Model
/**
* Normalize the URL of the author of the like.
*
* @param string $value The authors url
* @param string|null $value The authors url
*/
public function setAuthorUrlAttribute(?string $value)
{
@ -38,7 +60,7 @@ class Like extends Model
/**
* If the content contains HTML, filter it.
*
* @param string $value The content of the like
* @param string|null $value The content of the like
* @return string|null
*/
public function getContentAttribute(?string $value): ?string

View file

@ -8,6 +8,34 @@ use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Support\Str;
/**
* App\Models\Media.
*
* @property int $id
* @property string|null $token
* @property string $path
* @property string $type
* @property int|null $note_id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property string|null $image_widths
* @property-read string $mediumurl
* @property-read string $smallurl
* @property-read string $url
* @property-read \App\Models\Note|null $note
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Media newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Media newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Media query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Media whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Media whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Media whereImageWidths($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Media whereNoteId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Media wherePath($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Media whereToken($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Media whereType($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Media whereUpdatedAt($value)
* @mixin \Eloquent
*/
class Media extends Model
{
/**
@ -27,7 +55,7 @@ class Media extends Model
/**
* Get the note that owns this media.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
* @return BelongsTo
*/
public function note(): BelongsTo
{
@ -77,7 +105,7 @@ class Media extends Model
/**
* Give the real part of a filename, i.e. strip the file extension.
*
* @param string $path
* @param string $path
* @return string
*/
public function getBasename(string $path): string
@ -86,17 +114,16 @@ class Media extends Model
// foo.bar.png => ['foo', 'bar', 'png'] => ['foo', 'bar'] => foo.bar
$filenameParts = explode('.', $path);
array_pop($filenameParts);
$basename = ltrim(array_reduce($filenameParts, function ($carry, $item) {
return ltrim(array_reduce($filenameParts, function ($carry, $item) {
return $carry . '.' . $item;
}, ''), '.');
return $basename;
}
/**
* Get the extension from a given filename.
*
* @param string $path
* @param string $path
* @return string
*/
public function getExtension(string $path): string

View file

@ -7,6 +7,26 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* App\Models\MicropubClient.
*
* @property int $id
* @property string $client_url
* @property string $client_name
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Note[] $notes
* @property-read int|null $notes_count
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MicropubClient newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MicropubClient newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MicropubClient query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MicropubClient whereClientName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MicropubClient whereClientUrl($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MicropubClient whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MicropubClient whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MicropubClient whereUpdatedAt($value)
* @mixin \Eloquent
*/
class MicropubClient extends Model
{
/**
@ -26,7 +46,7 @@ class MicropubClient extends Model
/**
* Define the relationship with notes.
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
* @return HasMany
*/
public function notes(): HasMany
{

View file

@ -19,6 +19,71 @@ use League\CommonMark\{CommonMarkConverter, Environment};
use Normalizer;
use Spatie\CommonMarkHighlighter\{FencedCodeRenderer, IndentedCodeRenderer};
/**
* App\Models\Note.
*
* @property int $id
* @property string|null $note
* @property string|null $in_reply_to
* @property string $shorturl
* @property string|null $location
* @property int|null $photo
* @property string|null $tweet_id
* @property string|null $client_id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at
* @property int|null $place_id
* @property string|null $facebook_url
* @property string|null $searchable
* @property string|null $swarm_url
* @property string|null $instagram_url
* @property-read \App\Models\MicropubClient|null $client
* @property-read string|null $address
* @property-read string $content
* @property-read string $humandiff
* @property-read string $iso8601
* @property-read float|null $latitude
* @property-read float|null $longitude
* @property-read string $longurl
* @property-read string $nb60id
* @property-read string $pubdate
* @property-read object|null $twitter
* @property-read string $twitter_content
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Media[] $media
* @property-read int|null $media_count
* @property-read \App\Models\Place|null $place
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Tag[] $tags
* @property-read int|null $tags_count
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\WebMention[] $webmentions
* @property-read int|null $webmentions_count
* @method static bool|null forceDelete()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note nb60($nb60id)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note newQuery()
* @method static \Illuminate\Database\Query\Builder|\App\Models\Note onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note query()
* @method static bool|null restore()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note whereClientId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note whereFacebookUrl($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note whereInReplyTo($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note whereInstagramUrl($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note whereLocation($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note whereNote($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note wherePhoto($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note wherePlaceId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note whereSearchable($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note whereShorturl($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note whereSwarmUrl($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note whereTweetId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Note whereUpdatedAt($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\Note withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\Note withoutTrashed()
* @mixin \Eloquent
*/
class Note extends Model
{
use Searchable;
@ -54,8 +119,8 @@ class Note extends Model
*/
protected $table = 'notes';
/*
* Mass-assignment
/**
* Mass-assignment.
*
* @var array
*/
@ -277,9 +342,9 @@ class Note extends Model
}
if ($this->location !== null) {
$pieces = explode(':', $this->location);
$latlng = explode(',', $pieces[0]);
$latLng = explode(',', $pieces[0]);
return (float) trim($latlng[0]);
return (float) trim($latLng[0]);
}
return null;

View file

@ -12,8 +12,51 @@ use Illuminate\Support\Str;
use Phaza\LaravelPostgis\Eloquent\PostgisTrait;
use Phaza\LaravelPostgis\Geometries\Point;
// phpcs:disable Generic.Files.LineLength.TooLong
/**
* App\Models\Place.
*
* @property int $id
* @property string $name
* @property string $slug
* @property string|null $description
* @property string $location
* @property string|null $polygon
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property string|null $icon
* @property string|null $foursquare
* @property mixed|null $external_urls
* @property-read float $latitude
* @property-read float $longitude
* @property-read string $longurl
* @property-read string $shorturl
* @property-read string $uri
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Note[] $notes
* @property-read int|null $notes_count
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Place findSimilarSlugs($attribute, $config, $slug)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Place near(\Phaza\LaravelPostgis\Geometries\Point $point, $distance = 1000)
* @method static \Phaza\LaravelPostgis\Eloquent\Builder|\App\Models\Place newModelQuery()
* @method static \Phaza\LaravelPostgis\Eloquent\Builder|\App\Models\Place newQuery()
* @method static \Phaza\LaravelPostgis\Eloquent\Builder|\App\Models\Place query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Place whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Place whereDescription($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Place whereExternalURL($url)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Place whereExternalUrls($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Place whereFoursquare($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Place whereIcon($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Place whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Place whereLocation($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Place whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Place wherePolygon($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Place whereSlug($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Place whereUpdatedAt($value)
* @mixin \Eloquent
*/
class Place extends Model
{
// phpcs:enable Generic.Files.LineLength.TooLong
use Sluggable;
use PostgisTrait;

View file

@ -5,7 +5,28 @@ declare(strict_types=1);
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
/**
* App\Models\Tag.
*
* @property int $id
* @property string $tag
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Bookmark[] $bookmarks
* @property-read int|null $bookmarks_count
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Note[] $notes
* @property-read int|null $notes_count
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Tag newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Tag newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Tag query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Tag whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Tag whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Tag whereTag($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Tag whereUpdatedAt($value)
* @mixin \Eloquent
*/
class Tag extends Model
{
/**
@ -18,7 +39,7 @@ class Tag extends Model
/**
* Define the relationship with notes.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
* @return BelongsToMany
*/
public function notes()
{
@ -28,7 +49,7 @@ class Tag extends Model
/**
* The bookmarks that belong to the tag.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
* @return BelongsToMany
*/
public function bookmarks()
{
@ -38,7 +59,7 @@ class Tag extends Model
/**
* When creating a Tag model instance, invoke the nomralize method on the tag.
*
* @param string $value
* @param string $value
*/
public function setTagAttribute(string $value)
{
@ -49,7 +70,7 @@ class Tag extends Model
* This method actually normalizes a tag. That means lowercase-ing and
* removing fancy diatric characters.
*
* @param string $tag
* @param string $tag
* @return string
*/
public static function normalize(string $tag): string

View file

@ -7,8 +7,33 @@ namespace App\Models;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
// phpcs:disable Generic.Files.LineLength.TooLong
/**
* App\Models\User.
*
* @property int $id
* @property string $name
* @property string $password
* @property string|null $remember_token
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] $notifications
* @property-read int|null $notifications_count
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User wherePassword($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User whereRememberToken($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User whereUpdatedAt($value)
* @mixin \Eloquent
*/
class User extends Authenticatable
{
// phpcs:enable Generic.Files.LineLength.TooLong
use Notifiable;
/**

View file

@ -13,6 +13,42 @@ use Illuminate\Support\Facades\Cache;
use Jonnybarnes\WebmentionsParser\Authorship;
use Jonnybarnes\WebmentionsParser\Exceptions\AuthorshipParserException;
/**
* App\Models\WebMention.
*
* @property int $id
* @property string $source
* @property string $target
* @property int|null $commentable_id
* @property string|null $commentable_type
* @property string|null $type
* @property string|null $content
* @property int $verified
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property string|null $deleted_at
* @property mixed|null $mf2
* @property-read \App\Models\WebMention|null $commentable
* @property-read array $author
* @property-read string|null $published
* @property-read string|null $reply
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\WebMention newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\WebMention newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\WebMention query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\WebMention whereCommentableId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\WebMention whereCommentableType($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\WebMention whereContent($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\WebMention whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\WebMention whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\WebMention whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\WebMention whereMf2($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\WebMention whereSource($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\WebMention whereTarget($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\WebMention whereType($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\WebMention whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\WebMention whereVerified($value)
* @mixin \Eloquent
*/
class WebMention extends Model
{
use FilterHtml;
@ -106,7 +142,7 @@ class WebMention extends Model
/**
* Create the photo link.
*
* @param string
* @param string $url
* @return string
*/
public function createPhotoLink(string $url): string

View file

@ -42,6 +42,7 @@
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.0",
"barryvdh/laravel-ide-helper": "^2.6",
"beyondcode/laravel-dump-server": "^1.0",
"facade/ignition": "^1.4",
"fzaninotto/faker": "^1.9.1",

527
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "ab0e02f2dd90d748de298e6bd0929420",
"content-hash": "277e59603d9a74db6a9e6c38eb133a39",
"packages": [
{
"name": "aws/aws-sdk-php",
@ -6287,6 +6287,126 @@
],
"time": "2019-08-29T07:01:03+00:00"
},
{
"name": "barryvdh/laravel-ide-helper",
"version": "v2.6.6",
"source": {
"type": "git",
"url": "https://github.com/barryvdh/laravel-ide-helper.git",
"reference": "b91b959364d97af658f268c733c75dccdbff197e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/b91b959364d97af658f268c733c75dccdbff197e",
"reference": "b91b959364d97af658f268c733c75dccdbff197e",
"shasum": ""
},
"require": {
"barryvdh/reflection-docblock": "^2.0.6",
"composer/composer": "^1.6",
"doctrine/dbal": "~2.3",
"illuminate/console": "^5.5|^6",
"illuminate/filesystem": "^5.5|^6",
"illuminate/support": "^5.5|^6",
"php": ">=7"
},
"require-dev": {
"illuminate/config": "^5.5|^6",
"illuminate/view": "^5.5|^6",
"phpro/grumphp": "^0.14",
"phpunit/phpunit": "4.*",
"scrutinizer/ocular": "~1.1",
"squizlabs/php_codesniffer": "^3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.6-dev"
},
"laravel": {
"providers": [
"Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Barryvdh\\LaravelIdeHelper\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Barry vd. Heuvel",
"email": "barryvdh@gmail.com"
}
],
"description": "Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.",
"keywords": [
"autocomplete",
"codeintel",
"helper",
"ide",
"laravel",
"netbeans",
"phpdoc",
"phpstorm",
"sublime"
],
"time": "2019-10-30T20:53:27+00:00"
},
{
"name": "barryvdh/reflection-docblock",
"version": "v2.0.6",
"source": {
"type": "git",
"url": "https://github.com/barryvdh/ReflectionDocBlock.git",
"reference": "6b69015d83d3daf9004a71a89f26e27d27ef6a16"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/6b69015d83d3daf9004a71a89f26e27d27ef6a16",
"reference": "6b69015d83d3daf9004a71a89f26e27d27ef6a16",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"phpunit/phpunit": "~4.0,<4.5"
},
"suggest": {
"dflydev/markdown": "~1.0",
"erusev/parsedown": "~1.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-0": {
"Barryvdh": [
"src/"
]
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mike van Riel",
"email": "mike.vanriel@naenius.com"
}
],
"time": "2018-12-13T10:34:14+00:00"
},
{
"name": "beyondcode/laravel-dump-server",
"version": "1.3.0",
@ -6348,6 +6468,142 @@
],
"time": "2019-08-11T13:17:40+00:00"
},
{
"name": "composer/ca-bundle",
"version": "1.2.6",
"source": {
"type": "git",
"url": "https://github.com/composer/ca-bundle.git",
"reference": "47fe531de31fca4a1b997f87308e7d7804348f7e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/47fe531de31fca4a1b997f87308e7d7804348f7e",
"reference": "47fe531de31fca4a1b997f87308e7d7804348f7e",
"shasum": ""
},
"require": {
"ext-openssl": "*",
"ext-pcre": "*",
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8",
"psr/log": "^1.0",
"symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\CaBundle\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
"keywords": [
"cabundle",
"cacert",
"certificate",
"ssl",
"tls"
],
"time": "2020-01-13T10:02:55+00:00"
},
{
"name": "composer/composer",
"version": "1.9.3",
"source": {
"type": "git",
"url": "https://github.com/composer/composer.git",
"reference": "1291a16ce3f48bfdeca39d64fca4875098af4d7b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/composer/zipball/1291a16ce3f48bfdeca39d64fca4875098af4d7b",
"reference": "1291a16ce3f48bfdeca39d64fca4875098af4d7b",
"shasum": ""
},
"require": {
"composer/ca-bundle": "^1.0",
"composer/semver": "^1.0",
"composer/spdx-licenses": "^1.2",
"composer/xdebug-handler": "^1.1",
"justinrainbow/json-schema": "^3.0 || ^4.0 || ^5.0",
"php": "^5.3.2 || ^7.0",
"psr/log": "^1.0",
"seld/jsonlint": "^1.4",
"seld/phar-utils": "^1.0",
"symfony/console": "^2.7 || ^3.0 || ^4.0",
"symfony/filesystem": "^2.7 || ^3.0 || ^4.0",
"symfony/finder": "^2.7 || ^3.0 || ^4.0",
"symfony/process": "^2.7 || ^3.0 || ^4.0"
},
"conflict": {
"symfony/console": "2.8.38"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7",
"phpunit/phpunit-mock-objects": "^2.3 || ^3.0"
},
"suggest": {
"ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
"ext-zip": "Enabling the zip extension allows you to unzip archives",
"ext-zlib": "Allow gzip compression of HTTP requests"
},
"bin": [
"bin/composer"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.9-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\": "src/Composer"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
"homepage": "http://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.",
"homepage": "https://getcomposer.org/",
"keywords": [
"autoload",
"dependency",
"package"
],
"time": "2020-02-04T11:58:49+00:00"
},
{
"name": "composer/semver",
"version": "1.5.1",
@ -6409,6 +6665,66 @@
],
"time": "2020-01-13T12:06:48+00:00"
},
{
"name": "composer/spdx-licenses",
"version": "1.5.3",
"source": {
"type": "git",
"url": "https://github.com/composer/spdx-licenses.git",
"reference": "0c3e51e1880ca149682332770e25977c70cf9dae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/spdx-licenses/zipball/0c3e51e1880ca149682332770e25977c70cf9dae",
"reference": "0c3e51e1880ca149682332770e25977c70cf9dae",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 7"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\Spdx\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
"homepage": "http://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
},
{
"name": "Rob Bast",
"email": "rob.bast@gmail.com",
"homepage": "http://robbast.nl"
}
],
"description": "SPDX licenses list and validation library.",
"keywords": [
"license",
"spdx",
"validator"
],
"time": "2020-02-14T07:44:31+00:00"
},
{
"name": "composer/xdebug-handler",
"version": "1.4.0",
@ -6925,6 +7241,72 @@
],
"time": "2016-01-20T08:20:44+00:00"
},
{
"name": "justinrainbow/json-schema",
"version": "5.2.9",
"source": {
"type": "git",
"url": "https://github.com/justinrainbow/json-schema.git",
"reference": "44c6787311242a979fa15c704327c20e7221a0e4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/44c6787311242a979fa15c704327c20e7221a0e4",
"reference": "44c6787311242a979fa15c704327c20e7221a0e4",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1",
"json-schema/json-schema-test-suite": "1.2.0",
"phpunit/phpunit": "^4.8.35"
},
"bin": [
"bin/validate-json"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0.x-dev"
}
},
"autoload": {
"psr-4": {
"JsonSchema\\": "src/JsonSchema/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Bruno Prieto Reis",
"email": "bruno.p.reis@gmail.com"
},
{
"name": "Justin Rainbow",
"email": "justin.rainbow@gmail.com"
},
{
"name": "Igor Wiedler",
"email": "igor@wiedler.ch"
},
{
"name": "Robert Schönthal",
"email": "seroscho@googlemail.com"
}
],
"description": "A library to validate a json schema.",
"homepage": "https://github.com/justinrainbow/json-schema",
"keywords": [
"json",
"schema"
],
"time": "2019-09-25T14:49:45+00:00"
},
{
"name": "laravel/dusk",
"version": "v5.9.2",
@ -8709,6 +9091,149 @@
"homepage": "https://github.com/sebastianbergmann/version",
"time": "2016-10-03T07:35:21+00:00"
},
{
"name": "seld/jsonlint",
"version": "1.7.2",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/jsonlint.git",
"reference": "e2e5d290e4d2a4f0eb449f510071392e00e10d19"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/e2e5d290e4d2a4f0eb449f510071392e00e10d19",
"reference": "e2e5d290e4d2a4f0eb449f510071392e00e10d19",
"shasum": ""
},
"require": {
"php": "^5.3 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
},
"bin": [
"bin/jsonlint"
],
"type": "library",
"autoload": {
"psr-4": {
"Seld\\JsonLint\\": "src/Seld/JsonLint/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "JSON Linter",
"keywords": [
"json",
"linter",
"parser",
"validator"
],
"time": "2019-10-24T14:27:39+00:00"
},
{
"name": "seld/phar-utils",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/phar-utils.git",
"reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/8800503d56b9867d43d9c303b9cbcc26016e82f0",
"reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0",
"shasum": ""
},
"require": {
"php": ">=5.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Seld\\PharUtils\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be"
}
],
"description": "PHAR file format utilities, for when PHP phars you up",
"keywords": [
"phar"
],
"time": "2020-02-14T15:25:33+00:00"
},
{
"name": "symfony/filesystem",
"version": "v4.4.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "266c9540b475f26122b61ef8b23dd9198f5d1cfd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/266c9540b475f26122b61ef8b23dd9198f5d1cfd",
"reference": "266c9540b475f26122b61ef8b23dd9198f5d1cfd",
"shasum": ""
},
"require": {
"php": "^7.1.3",
"symfony/polyfill-ctype": "~1.8"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.4-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Filesystem\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
"time": "2020-01-21T08:20:44+00:00"
},
{
"name": "theseer/tokenizer",
"version": "1.1.3",