Merge pull request #151 from jonnybarnes/add-psalm

Add Psalm
This commit is contained in:
Jonny Barnes 2020-02-21 22:56:30 +00:00 committed by GitHub
commit d405f8c947
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 788 additions and 102 deletions

1
.gitignore vendored
View file

@ -10,6 +10,7 @@ Homestead.yaml
npm-debug.log
yarn-error.log
/.idea
/lsp
# Custom paths in /public
/public/coverage
/public/files

View file

@ -6,13 +6,12 @@ namespace App\Http\Controllers;
use App\Exceptions\InvalidTokenException;
use App\Jobs\ProcessMedia;
use App\Models\{Like, Media, Note, Place};
use App\Models\{Media, Place};
use App\Services\Micropub\{HCardService, HEntryService, UpdateService};
use App\Services\TokenService;
use Illuminate\Http\File;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\UploadedFile;
use Illuminate\Http\{Request, Response};
use Exception;
use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Http\{File, JsonResponse, Response, UploadedFile};
use Illuminate\Support\Facades\Storage;
use Intervention\Image\Exception\NotReadableException;
use Intervention\Image\ImageManager;
@ -42,9 +41,9 @@ class MicropubController extends Controller
/**
* This function receives an API request, verifies the authenticity
* then passes over the info to the relavent Service class.
* then passes over the info to the relevant Service class.
*
* @return \Illuminate\Http\JsonResponse
* @return JsonResponse
*/
public function post(): JsonResponse
{
@ -102,11 +101,11 @@ class MicropubController extends Controller
* Respond to a GET request to the micropub endpoint.
*
* A GET request has been made to `api/post` with an accompanying
* token, here we check wether the token is valid and respond
* token, here we check whether the token is valid and respond
* appropriately. Further if the request has the query parameter
* synidicate-to we respond with the known syndication endpoints.
* syndicate-to we respond with the known syndication endpoints.
*
* @return \Illuminate\Http\JsonResponse
* @return JsonResponse
*/
public function get(): JsonResponse
{
@ -131,7 +130,7 @@ class MicropubController extends Controller
if (request()->has('q') && substr(request()->input('q'), 0, 4) === 'geo:') {
preg_match_all(
'/([0-9\.\-]+)/',
'/([0-9.\-]+)/',
request()->input('q'),
$matches
);
@ -158,7 +157,9 @@ class MicropubController extends Controller
/**
* Process a media item posted to the media endpoint.
*
* @return Illuminate\Http\JsonResponse
* @return JsonResponse
* @throws BindingResolutionException
* @throws Exception
*/
public function media(): JsonResponse
{
@ -220,9 +221,9 @@ class MicropubController extends Controller
}
/**
* Return the relavent CORS headers to a pre-flight OPTIONS request.
* Return the relevant CORS headers to a pre-flight OPTIONS request.
*
* @return \Illuminate\Http\Response
* @return Response
*/
public function mediaOptionsResponse(): Response
{
@ -230,12 +231,12 @@ class MicropubController extends Controller
}
/**
* Get the file type from the mimetype of the uploaded file.
* Get the file type from the mime-type of the uploaded file.
*
* @param string $mimetype
* @param string $mimeType
* @return string
*/
private function getFileTypeFromMimeType(string $mimetype): string
private function getFileTypeFromMimeType(string $mimeType): string
{
//try known images
$imageMimeTypes = [
@ -246,7 +247,7 @@ class MicropubController extends Controller
'image/tiff',
'image/webp',
];
if (in_array($mimetype, $imageMimeTypes)) {
if (in_array($mimeType, $imageMimeTypes)) {
return 'image';
}
//try known video
@ -257,7 +258,7 @@ class MicropubController extends Controller
'video/quicktime',
'video/webm',
];
if (in_array($mimetype, $videoMimeTypes)) {
if (in_array($mimeType, $videoMimeTypes)) {
return 'video';
}
//try known audio types
@ -267,7 +268,7 @@ class MicropubController extends Controller
'audio/ogg',
'audio/x-m4a',
];
if (in_array($mimetype, $audioMimeTypes)) {
if (in_array($mimeType, $audioMimeTypes)) {
return 'audio';
}
@ -289,7 +290,7 @@ class MicropubController extends Controller
/**
* Save the details of the micropub request to a log file.
*
* @param array $request This is the info from request()->all()
* @param array $request This is the info from request()->all()
*/
private function logMicropubRequest(array $request)
{
@ -301,12 +302,13 @@ class MicropubController extends Controller
/**
* Save an uploaded file to the local disk.
*
* @param \Illuminate\Http\UploadedFele $file
* @return string $filename
* @param UploadedFile $file
* @return string
* @throws Exception
*/
private function saveFile(UploadedFile $file): string
{
$filename = Uuid::uuid4() . '.' . $file->extension();
$filename = Uuid::uuid4()->toString() . '.' . $file->extension();
Storage::disk('local')->putFileAs('', $file, $filename);
return $filename;
@ -315,9 +317,9 @@ class MicropubController extends Controller
/**
* Generate a response to be returned when the token has insufficient scope.
*
* @return \Illuminate\Http\JsonRepsonse
* @return JsonResponse
*/
private function insufficientScopeResponse()
private function insufficientScopeResponse(): JsonResponse
{
return response()->json([
'response' => 'error',
@ -329,9 +331,9 @@ class MicropubController extends Controller
/**
* Generate a response to be returned when the token is invalid.
*
* @return \Illuminate\Http\JsonRepsonse
* @return JsonResponse
*/
private function invalidTokenResponse()
private function invalidTokenResponse(): JsonResponse
{
return response()->json([
'response' => 'error',
@ -343,9 +345,9 @@ class MicropubController extends Controller
/**
* Generate a response to be returned when the token has no scope.
*
* @return \Illuminate\Http\JsonRepsonse
* @return JsonResponse
*/
private function tokenHasNoScopeResponse()
private function tokenHasNoScopeResponse(): JsonResponse
{
return response()->json([
'response' => 'error',

View file

@ -19,7 +19,7 @@ class WebMentionsController extends Controller
* This is probably someone looking for information about what
* webmentions are, or about my particular implementation.
*
* @return \Illuminate\View\View
* @return View
*/
public function get(): View
{
@ -29,11 +29,11 @@ class WebMentionsController extends Controller
/**
* Receive and process a webmention.
*
* @return \Illuminate\Http\Respone
* @return Response
*/
public function receive(): Response
{
//first we trivially reject requets that lack all required inputs
//first we trivially reject requests that lack all required inputs
if ((request()->has('target') !== true) || (request()->has('source') !== true)) {
return response(
'You need both the target and source parameters',

View file

@ -5,28 +5,19 @@ declare(strict_types=1);
namespace App\Models;
use App\Exceptions\TwitterContentException;
use Cache;
use Codebird\Codebird;
use Exception;
use GuzzleHttp\Client;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\MorphMany;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Relations\{BelongsTo, BelongsToMany, HasMany, MorphMany};
use Illuminate\Database\Eloquent\{Builder, Model, SoftDeletes};
use Illuminate\Support\Facades\Cache;
use Jonnybarnes\IndieWeb\Numbers;
use Laravel\Scout\Searchable;
use League\CommonMark\Block\Element\FencedCode;
use League\CommonMark\Block\Element\IndentedCode;
use League\CommonMark\CommonMarkConverter;
use League\CommonMark\Environment;
use League\CommonMark\Block\Element\{FencedCode, IndentedCode};
use League\CommonMark\Ext\Autolink\AutolinkExtension;
use League\CommonMark\{CommonMarkConverter, Environment};
use Normalizer;
use Spatie\CommonMarkHighlighter\FencedCodeRenderer;
use Spatie\CommonMarkHighlighter\IndentedCodeRenderer;
use Twitter;
use Spatie\CommonMarkHighlighter\{FencedCodeRenderer, IndentedCodeRenderer};
class Note extends Model
{
@ -146,7 +137,7 @@ class Note extends Model
/**
* Normalize the note to Unicode FORM C.
*
* @param string|null $value
* @param string|null $value
*/
public function setNoteAttribute(?string $value)
{
@ -162,7 +153,7 @@ class Note extends Model
/**
* Pre-process notes for web-view.
*
* @param string|null $value
* @param string|null $value
* @return string|null
*/
public function getNoteAttribute(?string $value): ?string
@ -178,9 +169,8 @@ class Note extends Model
$hcards = $this->makeHCards($value);
$hashtags = $this->autoLinkHashtag($hcards);
$html = $this->convertMarkdown($hashtags);
return $html;
return $this->convertMarkdown($hashtags);
}
/**
@ -266,7 +256,7 @@ class Note extends Model
}
/**
* Get the pubdate value for RSS feeds.
* Get the publish date value for RSS feeds.
*
* @return string
*/
@ -307,9 +297,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[1]);
return (float) trim($latLng[1]);
}
return null;
@ -375,6 +365,7 @@ class Note extends Model
* That is we swap the contacts names for their known Twitter handles.
*
* @return string
* @throws TwitterContentException
*/
public function getTwitterContentAttribute(): string
{
@ -416,9 +407,9 @@ class Note extends Model
/**
* Scope a query to select a note via a NewBase60 id.
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @param string $nb60id
* @return \Illuminate\Database\Eloquent\Builder
* @param Builder $query
* @param string $nb60id
* @return Builder
*/
public function scopeNb60(Builder $query, string $nb60id): Builder
{
@ -433,7 +424,7 @@ class Note extends Model
* due to lack of contact info, we assume @username is a twitter handle and link it
* as such.
*
* @param string $text
* @param string $text
* @return string
*/
private function makeHCards(string $text): string
@ -444,7 +435,7 @@ class Note extends Model
return $text;
}
$hcards = preg_replace_callback(
return preg_replace_callback(
self::USERNAMES_REGEX,
function ($matches) {
if (is_null($this->contacts[$matches[1]])) {
@ -462,24 +453,28 @@ class Note extends Model
},
$text
);
return $hcards;
}
/**
* Get the value of the `contacts` property.
*
* @return array
*/
public function getContacts()
public function getContacts(): array
{
if ($this->contacts === null) {
$this->setContacts();
}
return $this->contacts;
}
/**
* Process the note and save the contacts to the `contacts` property.
*
* @return void
*/
public function setContacts()
public function setContacts(): void
{
$contacts = [];
if ($this->getOriginal('note')) {
@ -500,7 +495,7 @@ class Note extends Model
* `#[\-_a-zA-Z0-9]+` and wraps them in an `a` element with
* `rel=tag` set and a `href` of 'section/tagged/' + tagname without the #.
*
* @param string $note
* @param string $note
* @return string
*/
public function autoLinkHashtag(string $note): string
@ -519,7 +514,7 @@ class Note extends Model
/**
* Pass a note through the commonmark library.
*
* @param string $note
* @param string $note
* @return string
*/
private function convertMarkdown(string $note): string
@ -536,15 +531,15 @@ class Note extends Model
/**
* Do a reverse geocode lookup of a `lat,lng` value.
*
* @param float $latitude
* @param float $longitude
* @param float $latitude
* @param float $longitude
* @return string
*/
public function reverseGeoCode(float $latitude, float $longitude): string
{
$latlng = $latitude . ',' . $longitude;
$latLng = $latitude . ',' . $longitude;
return Cache::get($latlng, function () use ($latlng, $latitude, $longitude) {
return Cache::get($latLng, function () use ($latLng, $latitude, $longitude) {
$guzzle = resolve(Client::class);
$response = $guzzle->request('GET', 'https://nominatim.openstreetmap.org/reverse', [
'query' => [
@ -567,7 +562,7 @@ class Note extends Model
. '</span>, <span class="p-country-name">'
. $json->address->country
. '</span>';
Cache::forever($latlng, $address);
Cache::forever($latLng, $address);
return $address;
}
@ -577,7 +572,7 @@ class Note extends Model
. '</span>, <span class="p-country-name">'
. $json->address->country
. '</span>';
Cache::forever($latlng, $address);
Cache::forever($latLng, $address);
return $address;
}
@ -587,12 +582,12 @@ class Note extends Model
. '</span>, <span class="p-country-name">'
. $json->address->country
. '</span>';
Cache::forever($latlng, $address);
Cache::forever($latLng, $address);
return $address;
}
$address = '<span class="p-country-name">' . $json->address->country . '</span>';
Cache::forever($latlng, $address);
Cache::forever($latLng, $address);
return $address;
});

View file

@ -5,8 +5,8 @@ declare(strict_types=1);
namespace App\Models;
use Cviebrock\EloquentSluggable\Sluggable;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\{Builder, Model};
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
use Phaza\LaravelPostgis\Eloquent\PostgisTrait;
@ -52,7 +52,7 @@ class Place extends Model
/**
* Define the relationship with Notes.
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
* @return HasMany
*/
public function notes()
{
@ -62,12 +62,12 @@ class Place extends Model
/**
* Select places near a given location.
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @param \Phaza\LaravelPostgis\Geometries\Point $point
* @param int $distance
* @return \Illuminate\Database\Eloquent\Builder
* @param Builder $query
* @param Point $point
* @param int $distance
* @return Builder
*/
public function scopeNear(Builder $query, Point $point, $distance = 1000): Builder
public function scopeNear(Builder $query, Point $point, int $distance = 1000): Builder
{
$field = DB::raw(
sprintf(
@ -83,9 +83,9 @@ class Place extends Model
/**
* Select places based on a URL.
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @param string $url
* @return \Illuminate\Database\Eloquent\Builder
* @param Builder $query
* @param string $url
* @return Builder
*/
public function scopeWhereExternalURL(Builder $query, string $url): Builder
{

View file

@ -15,7 +15,7 @@ class NoteService
*
* @param array $request Data from request()->all()
* @param string $client
* @return \App\Note
* @return Note
*/
public function createNote(array $request, ?string $client = null): Note
{
@ -61,7 +61,7 @@ class NoteService
/**
* Get the content from the request to create a new note.
*
* @param array $request Data from request()->all()
* @param array $request Data from request()->all()
* @return string|null
*/
private function getContent(array $request): ?string
@ -79,7 +79,7 @@ class NoteService
/**
* Get the in-reply-to from the request to create a new note.
*
* @param array $request Data from request()->all()
* @param array $request Data from request()->all()
* @return string|null
*/
private function getInReplyTo(array $request): ?string
@ -94,7 +94,7 @@ class NoteService
/**
* Get the published time from the request to create a new note.
*
* @param array $request Data from request()->all()
* @param array $request Data from request()->all()
* @return string|null
*/
private function getPublished(array $request): ?string
@ -113,7 +113,7 @@ class NoteService
/**
* Get the location data from the request to create a new note.
*
* @param array $request Data from request()->all()
* @param array $request Data from request()->all()
* @return string|null
*/
private function getLocation(array $request): ?string
@ -135,8 +135,8 @@ class NoteService
/**
* Get the checkin data from the request to create a new note. This will be a Place.
*
* @param array $request Data from request()->all()
* @return \App\Models\Place|null
* @param array $request Data from request()->all()
* @return Place|null
*/
private function getCheckin(array $request): ?Place
{
@ -181,7 +181,7 @@ class NoteService
/**
* Get the Swarm URL from the syndication data in the request to create a new note.
*
* @param array $request Data from request()->all()
* @param array $request Data from request()->all()
* @return string|null
*/
private function getSwarmUrl(array $request): ?string
@ -196,7 +196,7 @@ class NoteService
/**
* Get the syndication targets from the request to create a new note.
*
* @param array $request Data from request()->all()
* @param array $request Data from request()->all()
* @return array
*/
private function getSyndicationTargets(array $request): array
@ -225,7 +225,7 @@ class NoteService
/**
* Get the media URLs from the request to create a new note.
*
* @param array $request Data from request()->all()
* @param array $request Data from request()->all()
* @return array
*/
private function getMedia(array $request): array
@ -255,7 +255,7 @@ class NoteService
/**
* Get the Instagram photo URL from the request to create a new note.
*
* @param array $request Data from request()->all()
* @param array $request Data from request()->all()
* @return string|null
*/
private function getInstagramUrl(array $request): ?string

View file

@ -13,8 +13,8 @@ class PlaceService
/**
* Create a place.
*
* @param array $data
* @return \App\Place
* @param array $data
* @return Place
*/
public function createPlace(array $data): Place
{
@ -39,9 +39,9 @@ class PlaceService
}
/**
* Create a place from a h-card checkin, for exameple from OwnYourSwarm.
* Create a place from a h-card checkin, for example from OwnYourSwarm.
*
* @param array
* @param array
* @return Place
*/
public function createPlaceFromCheckin(array $checkin): Place

View file

@ -48,7 +48,8 @@
"laravel/dusk": "^5.0",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^8.0"
"phpunit/phpunit": "^8.0",
"vimeo/psalm": "^3.9"
},
"config": {
"optimize-autoloader": true,

665
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": "f7027161a4f7bc4bf2f2251b1b4a6454",
"content-hash": "ab0e02f2dd90d748de298e6bd0929420",
"packages": [
{
"name": "aws/aws-sdk-php",
@ -6083,6 +6083,142 @@
}
],
"packages-dev": [
{
"name": "amphp/amp",
"version": "v2.4.1",
"source": {
"type": "git",
"url": "https://github.com/amphp/amp.git",
"reference": "2ac3b550c4997f2ec304faa63c8b2885079a2dc4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/amphp/amp/zipball/2ac3b550c4997f2ec304faa63c8b2885079a2dc4",
"reference": "2ac3b550c4997f2ec304faa63c8b2885079a2dc4",
"shasum": ""
},
"require": {
"php": ">=7"
},
"require-dev": {
"amphp/php-cs-fixer-config": "dev-master",
"amphp/phpunit-util": "^1",
"ext-json": "*",
"phpstan/phpstan": "^0.8.5",
"phpunit/phpunit": "^6.0.9 | ^7",
"react/promise": "^2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Amp\\": "lib"
},
"files": [
"lib/functions.php",
"lib/Internal/functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Daniel Lowrey",
"email": "rdlowrey@php.net"
},
{
"name": "Aaron Piotrowski",
"email": "aaron@trowski.com"
},
{
"name": "Bob Weinand",
"email": "bobwei9@hotmail.com"
},
{
"name": "Niklas Keller",
"email": "me@kelunik.com"
}
],
"description": "A non-blocking concurrency framework for PHP applications.",
"homepage": "http://amphp.org/amp",
"keywords": [
"async",
"asynchronous",
"awaitable",
"concurrency",
"event",
"event-loop",
"future",
"non-blocking",
"promise"
],
"time": "2020-02-10T18:10:57+00:00"
},
{
"name": "amphp/byte-stream",
"version": "v1.7.2",
"source": {
"type": "git",
"url": "https://github.com/amphp/byte-stream.git",
"reference": "1e52f1752b2e20e2a7e464476ef887a2388e3832"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/amphp/byte-stream/zipball/1e52f1752b2e20e2a7e464476ef887a2388e3832",
"reference": "1e52f1752b2e20e2a7e464476ef887a2388e3832",
"shasum": ""
},
"require": {
"amphp/amp": "^2"
},
"require-dev": {
"amphp/php-cs-fixer-config": "dev-master",
"amphp/phpunit-util": "^1",
"friendsofphp/php-cs-fixer": "^2.3",
"infection/infection": "^0.9.3",
"phpunit/phpunit": "^6"
},
"type": "library",
"autoload": {
"psr-4": {
"Amp\\ByteStream\\": "lib"
},
"files": [
"lib/functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Aaron Piotrowski",
"email": "aaron@trowski.com"
},
{
"name": "Niklas Keller",
"email": "me@kelunik.com"
}
],
"description": "A stream abstraction to make working with non-blocking I/O simple.",
"homepage": "http://amphp.org/byte-stream",
"keywords": [
"amp",
"amphp",
"async",
"io",
"non-blocking",
"stream"
],
"time": "2020-01-29T18:22:23+00:00"
},
{
"name": "barryvdh/laravel-debugbar",
"version": "v3.2.8",
@ -6212,6 +6348,111 @@
],
"time": "2019-08-11T13:17:40+00:00"
},
{
"name": "composer/semver",
"version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/c6bea70230ef4dd483e6bbcab6005f682ed3a8de",
"reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.5 || ^5.0.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\Semver\\": "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": "Semver library that offers utilities, version constraint parsing and validation.",
"keywords": [
"semantic",
"semver",
"validation",
"versioning"
],
"time": "2020-01-13T12:06:48+00:00"
},
{
"name": "composer/xdebug-handler",
"version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
"reference": "cbe23383749496fe0f373345208b79568e4bc248"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/cbe23383749496fe0f373345208b79568e4bc248",
"reference": "cbe23383749496fe0f373345208b79568e4bc248",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0",
"psr/log": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8"
},
"type": "library",
"autoload": {
"psr-4": {
"Composer\\XdebugHandler\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "John Stevenson",
"email": "john-stevenson@blueyonder.co.uk"
}
],
"description": "Restarts a process without Xdebug.",
"keywords": [
"Xdebug",
"performance"
],
"time": "2019-11-06T16:40:04+00:00"
},
{
"name": "doctrine/instantiator",
"version": "1.3.0",
@ -6437,6 +6678,94 @@
],
"time": "2019-08-30T14:06:08+00:00"
},
{
"name": "felixfbecker/advanced-json-rpc",
"version": "v3.1.0",
"source": {
"type": "git",
"url": "https://github.com/felixfbecker/php-advanced-json-rpc.git",
"reference": "a407a6cb0325cd489c6dff57afcba6baeccc0483"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/a407a6cb0325cd489c6dff57afcba6baeccc0483",
"reference": "a407a6cb0325cd489c6dff57afcba6baeccc0483",
"shasum": ""
},
"require": {
"netresearch/jsonmapper": "^1.0",
"php": ">=7.0",
"phpdocumentor/reflection-docblock": "^4.0.0 || ^5.0.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0.0"
},
"type": "library",
"autoload": {
"psr-4": {
"AdvancedJsonRpc\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"ISC"
],
"authors": [
{
"name": "Felix Becker",
"email": "felix.b@outlook.com"
}
],
"description": "A more advanced JSONRPC implementation",
"time": "2020-02-11T20:48:40+00:00"
},
{
"name": "felixfbecker/language-server-protocol",
"version": "v1.4.0",
"source": {
"type": "git",
"url": "https://github.com/felixfbecker/php-language-server-protocol.git",
"reference": "378801f6139bb74ac215d81cca1272af61df9a9f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/378801f6139bb74ac215d81cca1272af61df9a9f",
"reference": "378801f6139bb74ac215d81cca1272af61df9a9f",
"shasum": ""
},
"require": {
"php": "^7.0"
},
"require-dev": {
"phpstan/phpstan": "*",
"phpunit/phpunit": "^6.3",
"squizlabs/php_codesniffer": "^3.1"
},
"type": "library",
"autoload": {
"psr-4": {
"LanguageServerProtocol\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"ISC"
],
"authors": [
{
"name": "Felix Becker",
"email": "felix.b@outlook.com"
}
],
"description": "PHP classes for the Language Server Protocol",
"keywords": [
"language",
"microsoft",
"php",
"server"
],
"time": "2019-06-23T21:03:50+00:00"
},
{
"name": "filp/whoops",
"version": "2.7.1",
@ -6838,6 +7167,52 @@
],
"time": "2020-01-17T21:11:47+00:00"
},
{
"name": "netresearch/jsonmapper",
"version": "v1.6.0",
"source": {
"type": "git",
"url": "https://github.com/cweiske/jsonmapper.git",
"reference": "0d4d1b48d682a93b6bfedf60b88c7750e9cb0b06"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/0d4d1b48d682a93b6bfedf60b88c7750e9cb0b06",
"reference": "0d4d1b48d682a93b6bfedf60b88c7750e9cb0b06",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-pcre": "*",
"ext-reflection": "*",
"ext-spl": "*",
"php": ">=5.6"
},
"require-dev": {
"phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4",
"squizlabs/php_codesniffer": "~1.5"
},
"type": "library",
"autoload": {
"psr-0": {
"JsonMapper": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"OSL-3.0"
],
"authors": [
{
"name": "Christian Weiske",
"email": "cweiske@cweiske.de",
"homepage": "http://github.com/cweiske/jsonmapper/",
"role": "Developer"
}
],
"description": "Map nested JSON structures onto PHP classes",
"time": "2019-08-15T19:41:25+00:00"
},
{
"name": "nunomaduro/collision",
"version": "v3.0.1",
@ -6902,6 +7277,106 @@
],
"time": "2019-03-07T21:35:13+00:00"
},
{
"name": "ocramius/package-versions",
"version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/Ocramius/PackageVersions.git",
"reference": "1d32342b8c1eb27353c8887c366147b4c2da673c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/1d32342b8c1eb27353c8887c366147b4c2da673c",
"reference": "1d32342b8c1eb27353c8887c366147b4c2da673c",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.0.0",
"php": "^7.3.0"
},
"require-dev": {
"composer/composer": "^1.8.6",
"doctrine/coding-standard": "^6.0.0",
"ext-zip": "*",
"infection/infection": "^0.13.4",
"phpunit/phpunit": "^8.2.5",
"vimeo/psalm": "^3.4.9"
},
"type": "composer-plugin",
"extra": {
"class": "PackageVersions\\Installer",
"branch-alias": {
"dev-master": "1.6.x-dev"
}
},
"autoload": {
"psr-4": {
"PackageVersions\\": "src/PackageVersions"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com"
}
],
"description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
"time": "2019-07-17T15:49:50+00:00"
},
{
"name": "openlss/lib-array2xml",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/nullivex/lib-array2xml.git",
"reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90",
"reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"type": "library",
"autoload": {
"psr-0": {
"LSS": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "Bryan Tong",
"email": "bryan@nullivex.com",
"homepage": "https://www.nullivex.com"
},
{
"name": "Tony Butler",
"email": "spudz76@gmail.com",
"homepage": "https://www.nullivex.com"
}
],
"description": "Array2XML conversion library credit to lalit.org",
"homepage": "https://www.nullivex.com",
"keywords": [
"array",
"array conversion",
"xml",
"xml conversion"
],
"time": "2019-03-29T20:06:56+00:00"
},
{
"name": "phar-io/manifest",
"version": "1.0.3",
@ -8274,6 +8749,101 @@
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"time": "2019-06-13T22:48:21+00:00"
},
{
"name": "vimeo/psalm",
"version": "3.9.3",
"source": {
"type": "git",
"url": "https://github.com/vimeo/psalm.git",
"reference": "2e4154d76e24d1b4e59e6cc2bebef7790cb9e550"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/2e4154d76e24d1b4e59e6cc2bebef7790cb9e550",
"reference": "2e4154d76e24d1b4e59e6cc2bebef7790cb9e550",
"shasum": ""
},
"require": {
"amphp/amp": "^2.1",
"amphp/byte-stream": "^1.5",
"composer/semver": "^1.4",
"composer/xdebug-handler": "^1.1",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-simplexml": "*",
"ext-tokenizer": "*",
"felixfbecker/advanced-json-rpc": "^3.0.3",
"felixfbecker/language-server-protocol": "^1.4",
"netresearch/jsonmapper": "^1.0",
"nikic/php-parser": "^4.3",
"ocramius/package-versions": "^1.2",
"openlss/lib-array2xml": "^1.0",
"php": "^7.1.3|^8",
"sebastian/diff": "^3.0 || ^4.0",
"symfony/console": "^3.4.17 || ^4.1.6 || ^5.0",
"webmozart/glob": "^4.1",
"webmozart/path-util": "^2.3"
},
"provide": {
"psalm/psalm": "self.version"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.2",
"ext-curl": "*",
"phpmyadmin/sql-parser": "5.1.0",
"phpspec/prophecy": ">=1.9.0",
"phpunit/phpunit": "^7.5.16 || ^8.0",
"psalm/plugin-phpunit": "^0.9",
"slevomat/coding-standard": "^5.0",
"squizlabs/php_codesniffer": "^3.5",
"symfony/process": "^4.3"
},
"suggest": {
"ext-igbinary": "^2.0.5"
},
"bin": [
"psalm",
"psalm-language-server",
"psalm-plugin",
"psalm-refactor",
"psalter"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev",
"dev-2.x": "2.x-dev",
"dev-1.x": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Psalm\\Plugin\\": "src/Psalm/Plugin",
"Psalm\\": "src/Psalm"
},
"files": [
"src/functions.php",
"src/spl_object_id.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Matthew Brown"
}
],
"description": "A static analysis tool for finding errors in PHP applications",
"keywords": [
"code",
"inspection",
"php"
],
"time": "2020-02-19T01:30:37+00:00"
},
{
"name": "webmozart/assert",
"version": "1.7.0",
@ -8321,6 +8891,99 @@
"validate"
],
"time": "2020-02-14T12:15:55+00:00"
},
{
"name": "webmozart/glob",
"version": "4.1.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/glob.git",
"reference": "3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/glob/zipball/3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe",
"reference": "3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe",
"shasum": ""
},
"require": {
"php": "^5.3.3|^7.0",
"webmozart/path-util": "^2.2"
},
"require-dev": {
"phpunit/phpunit": "^4.6",
"sebastian/version": "^1.0.1",
"symfony/filesystem": "^2.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.1-dev"
}
},
"autoload": {
"psr-4": {
"Webmozart\\Glob\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "A PHP implementation of Ant's glob.",
"time": "2015-12-29T11:14:33+00:00"
},
{
"name": "webmozart/path-util",
"version": "2.3.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/path-util.git",
"reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725",
"reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"webmozart/assert": "~1.0"
},
"require-dev": {
"phpunit/phpunit": "^4.6",
"sebastian/version": "^1.0.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"autoload": {
"psr-4": {
"Webmozart\\PathUtil\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.",
"time": "2015-12-17T08:42:14+00:00"
}
],
"aliases": [],

24
psalm.xml Normal file
View file

@ -0,0 +1,24 @@
<?xml version="1.0"?>
<psalm
totallyTyped="false"
errorLevel="7"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="app" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<issueHandlers>
<InvalidStaticInvocation>
<errorLevel type="suppress">
<file name="app/Providers/RouteServiceProvider.php" />
</errorLevel>
</InvalidStaticInvocation>
</issueHandlers>
</psalm>