diff --git a/.travis/deploy_script.sh b/.travis/deploy_script.sh index 97e17f2a..0cdb27c8 100755 --- a/.travis/deploy_script.sh +++ b/.travis/deploy_script.sh @@ -46,6 +46,7 @@ if [ "$TRAVIS" = "true" ]; then rm -rf .sass-cache rm -rf .idea phpvms.iml .travis .dpl rm -rf .phpstorm.meta.php _ide_helper.php phpunit.xml Procfile + rm -f phpstan.neon # remove large sized files rm -rf .git diff --git a/Makefile b/Makefile index 6aecf280..e9c06964 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ update: build @echo "Done!" .PHONY: reset -reset: clean +reset: cleanapp/Models/Traits/JournalTrait.php @php $(COMPOSER) dump-autoload @make reload-db @@ -72,6 +72,10 @@ test: #php artisan database:create --reset vendor/bin/phpunit --debug --verbose +.PHONY: +phpstan: + vendor/bin/phpstan analyse -c phpstan.neon -v --level 2 app + .PHONY: replay-acars replay-acars: #@php artisan phpvms:replay AAL10,AAL3113,BAW172,DAL988,FIN6,MSR986 --manual diff --git a/app/Interfaces/ImportExport.php b/app/Interfaces/ImportExport.php index f1961f46..e260b65f 100644 --- a/app/Interfaces/ImportExport.php +++ b/app/Interfaces/ImportExport.php @@ -24,6 +24,26 @@ class ImportExport */ public static $columns = []; + /** + * @param mixed $row + * @return array + */ + public function export($row): array + { + throw new \RuntimeException('export not implemented'); + } + + /** + * @param array $row + * @param mixed $index + * @return bool + * @throws \RuntimeException + */ + public function import(array $row, $index): bool + { + throw new \RuntimeException('import not implemented'); + } + /** * Get the airline from the ICAO. Create it if it doesn't exist * @param $code diff --git a/app/Models/Subfleet.php b/app/Models/Subfleet.php index ff254df0..a371a41a 100644 --- a/app/Models/Subfleet.php +++ b/app/Models/Subfleet.php @@ -8,13 +8,14 @@ use App\Models\Traits\ExpensableTrait; /** * Class Subfleet - * @property int id - * @property string type - * @property string name - * @property string ground_handling_multiplier - * @property Fare[] fares - * @property float cost_block_hour - * @property float cost_delay_minute + * @property int id + * @property string type + * @property string name + * @property string ground_handling_multiplier + * @property Fare[] fares + * @property float cost_block_hour + * @property float cost_delay_minute + * @property Airline airline * @package App\Models */ class Subfleet extends Model diff --git a/app/Services/ImportExport/AircraftExporter.php b/app/Services/ImportExport/AircraftExporter.php index 6a0a357f..deb55062 100644 --- a/app/Services/ImportExport/AircraftExporter.php +++ b/app/Services/ImportExport/AircraftExporter.php @@ -29,7 +29,7 @@ class AircraftExporter extends ImportExport * @param Aircraft $aircraft * @return array */ - public function export(Aircraft $aircraft): array + public function export($aircraft): array { $ret = []; foreach(self::$columns as $column) { diff --git a/app/Services/ImportExport/AirportExporter.php b/app/Services/ImportExport/AirportExporter.php index 16c185e7..0c1e9952 100644 --- a/app/Services/ImportExport/AirportExporter.php +++ b/app/Services/ImportExport/AirportExporter.php @@ -27,7 +27,7 @@ class AirportExporter extends ImportExport * @param Airport $airport * @return array */ - public function export(Airport $airport): array + public function export($airport): array { $ret = []; foreach(self::$columns as $column) { diff --git a/app/Services/ImportExport/ExpenseExporter.php b/app/Services/ImportExport/ExpenseExporter.php index 1a99e96a..f9c95f2b 100644 --- a/app/Services/ImportExport/ExpenseExporter.php +++ b/app/Services/ImportExport/ExpenseExporter.php @@ -30,7 +30,7 @@ class ExpenseExporter extends ImportExport * @param Expense $expense * @return array */ - public function export(Expense $expense): array + public function export($expense): array { $ret = []; diff --git a/app/Services/ImportExport/FareExporter.php b/app/Services/ImportExport/FareExporter.php index 903c459d..25d278d4 100644 --- a/app/Services/ImportExport/FareExporter.php +++ b/app/Services/ImportExport/FareExporter.php @@ -27,7 +27,7 @@ class FareExporter extends ImportExport * @param Fare $fare * @return array */ - public function export(Fare $fare): array + public function export($fare): array { $ret = []; foreach(self::$columns as $column) { diff --git a/app/Services/ImportExport/FlightExporter.php b/app/Services/ImportExport/FlightExporter.php index c77af21d..de53decc 100644 --- a/app/Services/ImportExport/FlightExporter.php +++ b/app/Services/ImportExport/FlightExporter.php @@ -28,7 +28,7 @@ class FlightExporter extends ImportExport * @param Flight $flight * @return array */ - public function export(Flight $flight): array + public function export($flight): array { $ret = []; foreach(self::$columns as $column) { diff --git a/app/Services/ImportExport/SubfleetExporter.php b/app/Services/ImportExport/SubfleetExporter.php index 70562667..d38d80e2 100644 --- a/app/Services/ImportExport/SubfleetExporter.php +++ b/app/Services/ImportExport/SubfleetExporter.php @@ -29,7 +29,7 @@ class SubfleetExporter extends ImportExport * @param Subfleet $subfleet * @return array */ - public function export(Subfleet $subfleet): array + public function export($subfleet): array { $ret = []; foreach(self::$columns as $column) { diff --git a/app/Support/Money.php b/app/Support/Money.php index d6dbcaba..7ac690cf 100644 --- a/app/Support/Money.php +++ b/app/Support/Money.php @@ -20,7 +20,7 @@ class Money public static $subunit_multiplier; /** - * @param $amount + * @param mixed $amount * @return MoneyBase * @throws \UnexpectedValueException * @throws \InvalidArgumentException @@ -32,7 +32,7 @@ class Money /** * Create from a dollar amount - * @param $amount + * @param mixed $amount * @return Money * @throws \UnexpectedValueException * @throws \InvalidArgumentException @@ -46,7 +46,7 @@ class Money /** * Convert a whole unit into it's subunit, e,g: dollar to cents - * @param $amount + * @param mixed $amount * @return float|int */ public static function convertToSubunit($amount) @@ -72,7 +72,7 @@ class Money /** * Money constructor. - * @param $amount + * @param mixed $amount * @throws \UnexpectedValueException * @throws \InvalidArgumentException */ @@ -143,7 +143,7 @@ class Money /** * Add an amount - * @param $amount + * @param mixed $amount * @return Money * @throws \UnexpectedValueException * @throws \InvalidArgumentException @@ -160,7 +160,7 @@ class Money } /** - * @param $percent + * @param mixed $percent * @return $this * @throws \OutOfBoundsException * @throws \InvalidArgumentException diff --git a/composer.json b/composer.json index e400949c..c333691d 100755 --- a/composer.json +++ b/composer.json @@ -48,7 +48,9 @@ "mockery/mockery": "0.9.*", "filp/whoops": "~2.0", "bpocallaghan/generators": "5.0.1", - "nunomaduro/collision": "^2.0" + "nunomaduro/collision": "^2.0", + "phpstan/phpstan": "^0.9.2", + "weebly/phpstan-laravel": "^1.1" }, "autoload": { "classmap": [ diff --git a/composer.lock b/composer.lock index c31f8766..18c12938 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "93a51bbef07bbcf94d1925c9e5958632", + "content-hash": "8723feb238185f9e5c1b09cbb0f838fb", "packages": [ { "name": "akaunting/money", @@ -2734,7 +2734,7 @@ "Prettus\\Validator\\": "src/Prettus/Validator/" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "authors": [ { "name": "Anderson Andrade", @@ -2823,7 +2823,7 @@ "Psr\\Container\\": "src/" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -3378,7 +3378,7 @@ "lib/swift_required.php" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -5258,7 +5258,7 @@ "Faker\\": "src/Faker/" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -5407,6 +5407,57 @@ ], "time": "2015-04-20T18:58:01+00:00" }, + { + "name": "jean85/pretty-package-versions", + "version": "1.1", + "source": { + "type": "git", + "url": "https://github.com/Jean85/pretty-package-versions.git", + "reference": "d457344b6a035ef99236bdda4729ad7eeb233f54" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/d457344b6a035ef99236bdda4729ad7eeb233f54", + "reference": "d457344b6a035ef99236bdda4729ad7eeb233f54", + "shasum": "" + }, + "require": { + "ocramius/package-versions": "^1.2.0", + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Jean85\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alessandro Lai", + "email": "alessandro.lai85@gmail.com" + } + ], + "description": "A wrapper for ocramius/pretty-package-versions to get pretty versions strings", + "keywords": [ + "composer", + "package", + "release", + "versions" + ], + "time": "2018-01-21T13:54:22+00:00" + }, { "name": "mockery/mockery", "version": "0.9.9", @@ -5517,6 +5568,470 @@ ], "time": "2017-10-19T19:58:43+00:00" }, + { + "name": "nette/bootstrap", + "version": "v2.4.5", + "source": { + "type": "git", + "url": "https://github.com/nette/bootstrap.git", + "reference": "804925787764d708a7782ea0d9382a310bb21968" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/bootstrap/zipball/804925787764d708a7782ea0d9382a310bb21968", + "reference": "804925787764d708a7782ea0d9382a310bb21968", + "shasum": "" + }, + "require": { + "nette/di": "~2.4.7", + "nette/utils": "~2.4", + "php": ">=5.6.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "latte/latte": "~2.2", + "nette/application": "~2.3", + "nette/caching": "~2.3", + "nette/database": "~2.3", + "nette/forms": "~2.3", + "nette/http": "~2.4.0", + "nette/mail": "~2.3", + "nette/robot-loader": "^2.4.2 || ^3.0", + "nette/safe-stream": "~2.2", + "nette/security": "~2.3", + "nette/tester": "~2.0", + "tracy/tracy": "^2.4.1" + }, + "suggest": { + "nette/robot-loader": "to use Configurator::createRobotLoader()", + "tracy/tracy": "to use Configurator::enableTracy()" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🅱 Nette Bootstrap: the simple way to configure and bootstrap your Nette application.", + "homepage": "https://nette.org", + "keywords": [ + "bootstrapping", + "configurator", + "nette" + ], + "time": "2017-08-20T17:36:59+00:00" + }, + { + "name": "nette/di", + "version": "v2.4.11", + "source": { + "type": "git", + "url": "https://github.com/nette/di.git", + "reference": "a300c8b8e8549595ab90c04d8ee21b8b2a5a88f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/di/zipball/a300c8b8e8549595ab90c04d8ee21b8b2a5a88f9", + "reference": "a300c8b8e8549595ab90c04d8ee21b8b2a5a88f9", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "nette/neon": "^2.3.3 || ~3.0.0", + "nette/php-generator": "^2.6.1 || ~3.0.0", + "nette/utils": "^2.4.3 || ~3.0.0", + "php": ">=5.6.0" + }, + "conflict": { + "nette/bootstrap": "<2.4", + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "💎 Nette Dependency Injection Container: Flexible, compiled and full-featured DIC with perfectly usable autowiring and support for all new PHP 7.1 features.", + "homepage": "https://nette.org", + "keywords": [ + "compiled", + "di", + "dic", + "factory", + "ioc", + "nette", + "static" + ], + "time": "2018-03-28T23:53:36+00:00" + }, + { + "name": "nette/finder", + "version": "v2.4.1", + "source": { + "type": "git", + "url": "https://github.com/nette/finder.git", + "reference": "4d43a66d072c57d585bf08a3ef68d3587f7e9547" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/finder/zipball/4d43a66d072c57d585bf08a3ef68d3587f7e9547", + "reference": "4d43a66d072c57d585bf08a3ef68d3587f7e9547", + "shasum": "" + }, + "require": { + "nette/utils": "^2.4 || ~3.0.0", + "php": ">=5.6.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "Nette Finder: Files Searching", + "homepage": "https://nette.org", + "time": "2017-07-10T23:47:08+00:00" + }, + { + "name": "nette/neon", + "version": "v2.4.2", + "source": { + "type": "git", + "url": "https://github.com/nette/neon.git", + "reference": "9eacd50553b26b53a3977bfb2fea2166d4331622" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/neon/zipball/9eacd50553b26b53a3977bfb2fea2166d4331622", + "reference": "9eacd50553b26b53a3977bfb2fea2166d4331622", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "ext-json": "*", + "php": ">=5.6.0" + }, + "require-dev": { + "nette/tester": "~2.0", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "Nette NEON: parser & generator for Nette Object Notation", + "homepage": "http://ne-on.org", + "time": "2017-07-11T18:29:08+00:00" + }, + { + "name": "nette/php-generator", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/nette/php-generator.git", + "reference": "18a26e9c302ce98b7a573fae8c6032a6909339e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/php-generator/zipball/18a26e9c302ce98b7a573fae8c6032a6909339e5", + "reference": "18a26e9c302ce98b7a573fae8c6032a6909339e5", + "shasum": "" + }, + "require": { + "nette/utils": "^2.4.2 || ~3.0.0", + "php": ">=7.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 7.2 features.", + "homepage": "https://nette.org", + "keywords": [ + "code", + "nette", + "php", + "scaffolding" + ], + "time": "2018-03-30T14:01:03+00:00" + }, + { + "name": "nette/robot-loader", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/nette/robot-loader.git", + "reference": "92d4b40b49d5e2d9e37fc736bbcebe6da55fa44a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/robot-loader/zipball/92d4b40b49d5e2d9e37fc736bbcebe6da55fa44a", + "reference": "92d4b40b49d5e2d9e37fc736bbcebe6da55fa44a", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "nette/finder": "^2.3 || ^3.0", + "nette/utils": "^2.4 || ^3.0", + "php": ">=5.6.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🍀 Nette RobotLoader: high performance and comfortable autoloader that will search and autoload classes within your application.", + "homepage": "https://nette.org", + "keywords": [ + "autoload", + "class", + "interface", + "nette", + "trait" + ], + "time": "2017-09-26T13:42:21+00:00" + }, + { + "name": "nette/utils", + "version": "v2.5.1", + "source": { + "type": "git", + "url": "https://github.com/nette/utils.git", + "reference": "8a85ce76298c8a8941f912b8fa3ee93ca17d2ebc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/utils/zipball/8a85ce76298c8a8941f912b8fa3ee93ca17d2ebc", + "reference": "8a85ce76298c8a8941f912b8fa3ee93ca17d2ebc", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "~2.0", + "tracy/tracy": "^2.3" + }, + "suggest": { + "ext-gd": "to use Image", + "ext-iconv": "to use Strings::webalize() and toAscii()", + "ext-intl": "for script transliteration in Strings::webalize() and toAscii()", + "ext-json": "to use Nette\\Utils\\Json", + "ext-mbstring": "to use Strings::lower() etc...", + "ext-xml": "to use Strings::length() etc. when mbstring is not available" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ], + "files": [ + "src/loader.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "homepage": "https://nette.org", + "keywords": [ + "array", + "core", + "datetime", + "images", + "json", + "nette", + "paginator", + "password", + "slugify", + "string", + "unicode", + "utf-8", + "utility", + "validation" + ], + "time": "2018-02-19T14:42:42+00:00" + }, { "name": "nunomaduro/collision", "version": "v2.0.2", @@ -5579,6 +6094,55 @@ ], "time": "2018-03-21T20:11:24+00:00" }, + { + "name": "ocramius/package-versions", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/Ocramius/PackageVersions.git", + "reference": "4489d5002c49d55576fa0ba786f42dbb009be46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/4489d5002c49d55576fa0ba786f42dbb009be46f", + "reference": "4489d5002c49d55576fa0ba786f42dbb009be46f", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0.0", + "php": "^7.1.0" + }, + "require-dev": { + "composer/composer": "^1.6.3", + "ext-zip": "*", + "infection/infection": "^0.7.1", + "phpunit/phpunit": "^7.0.0" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "2.0.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": "2018-02-05T13:05:30+00:00" + }, { "name": "phar-io/manifest", "version": "1.0.1", @@ -5610,7 +6174,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -5657,7 +6221,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -5714,7 +6278,7 @@ ] } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -5896,6 +6460,114 @@ ], "time": "2018-02-19T10:16:54+00:00" }, + { + "name": "phpstan/phpdoc-parser", + "version": "0.2", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "02f909f134fe06f0cd4790d8627ee24efbe84d6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/02f909f134fe06f0cd4790d8627ee24efbe84d6a", + "reference": "02f909f134fe06f0cd4790d8627ee24efbe84d6a", + "shasum": "" + }, + "require": { + "php": "~7.0" + }, + "require-dev": { + "consistence/coding-standard": "^2.0.0", + "jakub-onderka/php-parallel-lint": "^0.9.2", + "phing/phing": "^2.16.0", + "phpstan/phpstan": "^0.9", + "phpunit/phpunit": "^6.3", + "slevomat/coding-standard": "^3.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.1-dev" + } + }, + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "time": "2018-01-13T18:19:41+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "0.9.2", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "e59541bcc7cac9b35ca54db6365bf377baf4a488" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e59541bcc7cac9b35ca54db6365bf377baf4a488", + "reference": "e59541bcc7cac9b35ca54db6365bf377baf4a488", + "shasum": "" + }, + "require": { + "jean85/pretty-package-versions": "^1.0.3", + "nette/bootstrap": "^2.4 || ^3.0", + "nette/di": "^2.4.7 || ^3.0", + "nette/robot-loader": "^3.0.1", + "nette/utils": "^2.4.5 || ^3.0", + "nikic/php-parser": "^3.1", + "php": "~7.0", + "phpstan/phpdoc-parser": "^0.2", + "symfony/console": "~3.2 || ~4.0", + "symfony/finder": "~3.2 || ~4.0" + }, + "require-dev": { + "consistence/coding-standard": "2.2.1", + "ext-gd": "*", + "ext-intl": "*", + "ext-mysqli": "*", + "jakub-onderka/php-parallel-lint": "^0.9.2", + "phing/phing": "^2.16.0", + "phpstan/phpstan-php-parser": "^0.9", + "phpstan/phpstan-phpunit": "^0.9.3", + "phpstan/phpstan-strict-rules": "^0.9", + "phpunit/phpunit": "^6.5.4", + "slevomat/coding-standard": "4.0.0" + }, + "bin": [ + "bin/phpstan" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.9-dev" + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": [ + "src/", + "build/PHPStan" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "time": "2018-01-28T13:22:19+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "6.0.3", @@ -6477,7 +7149,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -6529,7 +7201,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -6597,7 +7269,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -6647,7 +7319,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -6692,7 +7364,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -6737,7 +7409,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -6926,7 +7598,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -6989,6 +7661,51 @@ "validate" ], "time": "2018-01-29T19:49:41+00:00" + }, + { + "name": "weebly/phpstan-laravel", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/Weebly/phpstan-laravel.git", + "reference": "ce2811ffe09103a7b37fc3de8d012e30d435ce1f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Weebly/phpstan-laravel/zipball/ce2811ffe09103a7b37fc3de8d012e30d435ce1f", + "reference": "ce2811ffe09103a7b37fc3de8d012e30d435ce1f", + "shasum": "" + }, + "require": { + "laravel/framework": "5.5.* || 5.6.*", + "phpstan/phpstan": "^0.9" + }, + "require-dev": { + "phpunit/phpunit": "^6.5.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Weebly\\PHPStan\\Laravel\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Chris Leppanen", + "email": "chris.leppanen@weebly.com" + } + ], + "description": "Laravel plugins for PHPStan", + "time": "2018-04-13T23:27:17+00:00" } ], "aliases": [], diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 00000000..b8b6788f --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,8 @@ +parameters: + autoload_files: + #- %currentWorkingDirectory%/_ide_helper.php + ignoreErrors: + - '#PHPDoc tag(.*)#' + - '#Access to an undefined property App\\Models(.*)#' +includes: + - vendor/weebly/phpstan-laravel/extension.neon