diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b25e33cd..49823b0c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,5 +30,8 @@ jobs: run: composer update --ignore-platform-req=php --no-interaction --no-progress if: "matrix.php >= 8" + - name: Check coding style + run: ./vendor/bin/php-cs-fixer fix -v --dry-run --using-cache=no --config=.php-cs-fixer.ci.php + - name: Unit Tests run: php ./vendor/bin/pest diff --git a/.php-cs-fixer.ci.php b/.php-cs-fixer.ci.php new file mode 100644 index 00000000..9409af8b --- /dev/null +++ b/.php-cs-fixer.ci.php @@ -0,0 +1,43 @@ +in(__DIR__) + ->exclude(['bootstrap', 'storage', 'vendor']) + ->name('*.php') + ->name('_ide_helper') + ->notName('*.blade.php') + ->ignoreDotFiles(true) + ->ignoreVCS(true); + +$rules = [ + '@PSR12' => true, + 'array_syntax' => ['syntax' => 'short'], + 'ordered_imports' => ['sort_algorithm' => 'alpha'], + 'concat_space' => true, + 'no_unused_imports' => true, + 'not_operator_with_successor_space' => true, + 'trailing_comma_in_multiline' => true, + 'phpdoc_scalar' => true, + 'unary_operator_spaces' => true, + 'binary_operator_spaces' => true, + 'blank_line_before_statement' => [ + 'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'], + ], + 'phpdoc_single_line_var_spacing' => true, + 'phpdoc_var_without_name' => true, + 'class_attributes_separation' => [ + 'elements' => [ + 'method' => 'one', + 'property' => 'one', + ], + ], + 'method_argument_space' => [ + 'on_multiline' => 'ensure_fully_multiline', + 'keep_multiple_spaces_after_comma' => true, + ], +]; + +return (new PhpCsFixer\Config()) + ->setUsingCache(true) + ->setRules($rules) + ->setFinder($finder); diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 00000000..0211cfee --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,43 @@ +in(__DIR__) + ->exclude(['bootstrap', 'storage', 'vendor']) + ->name('*.php') + ->name('_ide_helper') + ->notName('*.blade.php') + ->ignoreDotFiles(true) + ->ignoreVCS(true); + +$rules = [ + '@PSR12' => true, + 'array_syntax' => ['syntax' => 'short'], + 'ordered_imports' => ['sort_algorithm' => 'alpha'], + 'concat_space' => true, + 'no_unused_imports' => true, + 'not_operator_with_successor_space' => true, + 'trailing_comma_in_multiline_array' => true, + 'phpdoc_scalar' => true, + 'unary_operator_spaces' => true, + 'binary_operator_spaces' => true, + 'blank_line_before_statement' => [ + 'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'], + ], + 'phpdoc_single_line_var_spacing' => true, + 'phpdoc_var_without_name' => true, + 'class_attributes_separation' => [ + 'elements' => [ + 'method' => 'one', + 'property' => 'one', + ], + ], + 'method_argument_space' => [ + 'on_multiline' => 'ensure_fully_multiline', + 'keep_multiple_spaces_after_comma' => true, + ], +]; + +return (new PhpCsFixer\Config()) + ->setUsingCache(true) + ->setRules($rules) + ->setFinder($finder); diff --git a/_ide_helper.php b/_ide_helper.php index 68110797..7dc9a453 100644 --- a/_ide_helper.php +++ b/_ide_helper.php @@ -10,15 +10,16 @@ namespace { exit("This file should not be included, only analyzed by your IDE"); - class App extends \Illuminate\Support\Facades\App{ - + class App extends \Illuminate\Support\Facades\App + { /** * Get the version number of the application. * * @return string * @static */ - public static function version(){ + public static function version() + { return \Illuminate\Foundation\Application::version(); } @@ -29,7 +30,8 @@ namespace { * @return void * @static */ - public static function bootstrapWith($bootstrappers){ + public static function bootstrapWith($bootstrappers) + { \Illuminate\Foundation\Application::bootstrapWith($bootstrappers); } @@ -40,7 +42,8 @@ namespace { * @return void * @static */ - public static function afterLoadingEnvironment($callback){ + public static function afterLoadingEnvironment($callback) + { \Illuminate\Foundation\Application::afterLoadingEnvironment($callback); } @@ -52,7 +55,8 @@ namespace { * @return void * @static */ - public static function beforeBootstrapping($bootstrapper, $callback){ + public static function beforeBootstrapping($bootstrapper, $callback) + { \Illuminate\Foundation\Application::beforeBootstrapping($bootstrapper, $callback); } @@ -64,7 +68,8 @@ namespace { * @return void * @static */ - public static function afterBootstrapping($bootstrapper, $callback){ + public static function afterBootstrapping($bootstrapper, $callback) + { \Illuminate\Foundation\Application::afterBootstrapping($bootstrapper, $callback); } @@ -74,7 +79,8 @@ namespace { * @return bool * @static */ - public static function hasBeenBootstrapped(){ + public static function hasBeenBootstrapped() + { return \Illuminate\Foundation\Application::hasBeenBootstrapped(); } @@ -85,7 +91,8 @@ namespace { * @return $this * @static */ - public static function setBasePath($basePath){ + public static function setBasePath($basePath) + { return \Illuminate\Foundation\Application::setBasePath($basePath); } @@ -95,7 +102,8 @@ namespace { * @return string * @static */ - public static function path(){ + public static function path() + { return \Illuminate\Foundation\Application::path(); } @@ -105,7 +113,8 @@ namespace { * @return string * @static */ - public static function basePath(){ + public static function basePath() + { return \Illuminate\Foundation\Application::basePath(); } @@ -115,7 +124,8 @@ namespace { * @return string * @static */ - public static function bootstrapPath(){ + public static function bootstrapPath() + { return \Illuminate\Foundation\Application::bootstrapPath(); } @@ -125,7 +135,8 @@ namespace { * @return string * @static */ - public static function configPath(){ + public static function configPath() + { return \Illuminate\Foundation\Application::configPath(); } @@ -135,7 +146,8 @@ namespace { * @return string * @static */ - public static function databasePath(){ + public static function databasePath() + { return \Illuminate\Foundation\Application::databasePath(); } @@ -146,7 +158,8 @@ namespace { * @return $this * @static */ - public static function useDatabasePath($path){ + public static function useDatabasePath($path) + { return \Illuminate\Foundation\Application::useDatabasePath($path); } @@ -156,7 +169,8 @@ namespace { * @return string * @static */ - public static function langPath(){ + public static function langPath() + { return \Illuminate\Foundation\Application::langPath(); } @@ -166,7 +180,8 @@ namespace { * @return string * @static */ - public static function publicPath(){ + public static function publicPath() + { return \Illuminate\Foundation\Application::publicPath(); } @@ -176,7 +191,8 @@ namespace { * @return string * @static */ - public static function storagePath(){ + public static function storagePath() + { return \Illuminate\Foundation\Application::storagePath(); } @@ -187,7 +203,8 @@ namespace { * @return $this * @static */ - public static function useStoragePath($path){ + public static function useStoragePath($path) + { return \Illuminate\Foundation\Application::useStoragePath($path); } @@ -197,7 +214,8 @@ namespace { * @return string * @static */ - public static function resourcePath(){ + public static function resourcePath() + { return \Illuminate\Foundation\Application::resourcePath(); } @@ -207,7 +225,8 @@ namespace { * @return string * @static */ - public static function environmentPath(){ + public static function environmentPath() + { return \Illuminate\Foundation\Application::environmentPath(); } @@ -218,7 +237,8 @@ namespace { * @return $this * @static */ - public static function useEnvironmentPath($path){ + public static function useEnvironmentPath($path) + { return \Illuminate\Foundation\Application::useEnvironmentPath($path); } @@ -229,7 +249,8 @@ namespace { * @return $this * @static */ - public static function loadEnvironmentFrom($file){ + public static function loadEnvironmentFrom($file) + { return \Illuminate\Foundation\Application::loadEnvironmentFrom($file); } @@ -239,7 +260,8 @@ namespace { * @return string * @static */ - public static function environmentFile(){ + public static function environmentFile() + { return \Illuminate\Foundation\Application::environmentFile(); } @@ -249,7 +271,8 @@ namespace { * @return string * @static */ - public static function environmentFilePath(){ + public static function environmentFilePath() + { return \Illuminate\Foundation\Application::environmentFilePath(); } @@ -259,7 +282,8 @@ namespace { * @return string|bool * @static */ - public static function environment(){ + public static function environment() + { return \Illuminate\Foundation\Application::environment(); } @@ -269,7 +293,8 @@ namespace { * @return bool * @static */ - public static function isLocal(){ + public static function isLocal() + { return \Illuminate\Foundation\Application::isLocal(); } @@ -280,7 +305,8 @@ namespace { * @return string * @static */ - public static function detectEnvironment($callback){ + public static function detectEnvironment($callback) + { return \Illuminate\Foundation\Application::detectEnvironment($callback); } @@ -290,7 +316,8 @@ namespace { * @return bool * @static */ - public static function runningInConsole(){ + public static function runningInConsole() + { return \Illuminate\Foundation\Application::runningInConsole(); } @@ -300,7 +327,8 @@ namespace { * @return bool * @static */ - public static function runningUnitTests(){ + public static function runningUnitTests() + { return \Illuminate\Foundation\Application::runningUnitTests(); } @@ -310,7 +338,8 @@ namespace { * @return void * @static */ - public static function registerConfiguredProviders(){ + public static function registerConfiguredProviders() + { \Illuminate\Foundation\Application::registerConfiguredProviders(); } @@ -323,7 +352,8 @@ namespace { * @return \Illuminate\Support\ServiceProvider * @static */ - public static function register($provider, $options = array(), $force = false){ + public static function register($provider, $options = [], $force = false) + { return \Illuminate\Foundation\Application::register($provider, $options, $force); } @@ -334,7 +364,8 @@ namespace { * @return \Illuminate\Support\ServiceProvider|null * @static */ - public static function getProvider($provider){ + public static function getProvider($provider) + { return \Illuminate\Foundation\Application::getProvider($provider); } @@ -345,7 +376,8 @@ namespace { * @return \Illuminate\Support\ServiceProvider * @static */ - public static function resolveProvider($provider){ + public static function resolveProvider($provider) + { return \Illuminate\Foundation\Application::resolveProvider($provider); } @@ -355,7 +387,8 @@ namespace { * @return void * @static */ - public static function loadDeferredProviders(){ + public static function loadDeferredProviders() + { \Illuminate\Foundation\Application::loadDeferredProviders(); } @@ -366,7 +399,8 @@ namespace { * @return void * @static */ - public static function loadDeferredProvider($service){ + public static function loadDeferredProvider($service) + { \Illuminate\Foundation\Application::loadDeferredProvider($service); } @@ -378,7 +412,8 @@ namespace { * @return void * @static */ - public static function registerDeferredProvider($provider, $service = null){ + public static function registerDeferredProvider($provider, $service = null) + { \Illuminate\Foundation\Application::registerDeferredProvider($provider, $service); } @@ -391,7 +426,8 @@ namespace { * @return mixed * @static */ - public static function make($abstract){ + public static function make($abstract) + { return \Illuminate\Foundation\Application::make($abstract); } @@ -404,7 +440,8 @@ namespace { * @return bool * @static */ - public static function bound($abstract){ + public static function bound($abstract) + { return \Illuminate\Foundation\Application::bound($abstract); } @@ -414,7 +451,8 @@ namespace { * @return bool * @static */ - public static function isBooted(){ + public static function isBooted() + { return \Illuminate\Foundation\Application::isBooted(); } @@ -424,7 +462,8 @@ namespace { * @return void * @static */ - public static function boot(){ + public static function boot() + { \Illuminate\Foundation\Application::boot(); } @@ -435,7 +474,8 @@ namespace { * @return void * @static */ - public static function booting($callback){ + public static function booting($callback) + { \Illuminate\Foundation\Application::booting($callback); } @@ -446,7 +486,8 @@ namespace { * @return void * @static */ - public static function booted($callback){ + public static function booted($callback) + { \Illuminate\Foundation\Application::booted($callback); } @@ -455,7 +496,8 @@ namespace { * * @static */ - public static function handle($request, $type = 1, $catch = true){ + public static function handle($request, $type = 1, $catch = true) + { return \Illuminate\Foundation\Application::handle($request, $type, $catch); } @@ -465,7 +507,8 @@ namespace { * @return bool * @static */ - public static function shouldSkipMiddleware(){ + public static function shouldSkipMiddleware() + { return \Illuminate\Foundation\Application::shouldSkipMiddleware(); } @@ -475,7 +518,8 @@ namespace { * @return string * @static */ - public static function getCachedServicesPath(){ + public static function getCachedServicesPath() + { return \Illuminate\Foundation\Application::getCachedServicesPath(); } @@ -485,7 +529,8 @@ namespace { * @return bool * @static */ - public static function configurationIsCached(){ + public static function configurationIsCached() + { return \Illuminate\Foundation\Application::configurationIsCached(); } @@ -495,7 +540,8 @@ namespace { * @return string * @static */ - public static function getCachedConfigPath(){ + public static function getCachedConfigPath() + { return \Illuminate\Foundation\Application::getCachedConfigPath(); } @@ -505,7 +551,8 @@ namespace { * @return bool * @static */ - public static function routesAreCached(){ + public static function routesAreCached() + { return \Illuminate\Foundation\Application::routesAreCached(); } @@ -515,7 +562,8 @@ namespace { * @return string * @static */ - public static function getCachedRoutesPath(){ + public static function getCachedRoutesPath() + { return \Illuminate\Foundation\Application::getCachedRoutesPath(); } @@ -525,7 +573,8 @@ namespace { * @return bool * @static */ - public static function isDownForMaintenance(){ + public static function isDownForMaintenance() + { return \Illuminate\Foundation\Application::isDownForMaintenance(); } @@ -539,7 +588,8 @@ namespace { * @throws \Symfony\Component\HttpKernel\Exception\HttpException * @static */ - public static function abort($code, $message = '', $headers = array()){ + public static function abort($code, $message = '', $headers = []) + { \Illuminate\Foundation\Application::abort($code, $message, $headers); } @@ -550,7 +600,8 @@ namespace { * @return $this * @static */ - public static function terminating($callback){ + public static function terminating($callback) + { return \Illuminate\Foundation\Application::terminating($callback); } @@ -560,7 +611,8 @@ namespace { * @return void * @static */ - public static function terminate(){ + public static function terminate() + { \Illuminate\Foundation\Application::terminate(); } @@ -570,7 +622,8 @@ namespace { * @return array * @static */ - public static function getLoadedProviders(){ + public static function getLoadedProviders() + { return \Illuminate\Foundation\Application::getLoadedProviders(); } @@ -580,7 +633,8 @@ namespace { * @return array * @static */ - public static function getDeferredServices(){ + public static function getDeferredServices() + { return \Illuminate\Foundation\Application::getDeferredServices(); } @@ -591,7 +645,8 @@ namespace { * @return void * @static */ - public static function setDeferredServices($services){ + public static function setDeferredServices($services) + { \Illuminate\Foundation\Application::setDeferredServices($services); } @@ -602,7 +657,8 @@ namespace { * @return void * @static */ - public static function addDeferredServices($services){ + public static function addDeferredServices($services) + { \Illuminate\Foundation\Application::addDeferredServices($services); } @@ -613,7 +669,8 @@ namespace { * @return bool * @static */ - public static function isDeferredService($service){ + public static function isDeferredService($service) + { return \Illuminate\Foundation\Application::isDeferredService($service); } @@ -624,7 +681,8 @@ namespace { * @return void * @static */ - public static function provideFacades($namespace){ + public static function provideFacades($namespace) + { \Illuminate\Foundation\Application::provideFacades($namespace); } @@ -635,7 +693,8 @@ namespace { * @return $this * @static */ - public static function configureMonologUsing($callback){ + public static function configureMonologUsing($callback) + { return \Illuminate\Foundation\Application::configureMonologUsing($callback); } @@ -645,7 +704,8 @@ namespace { * @return bool * @static */ - public static function hasMonologConfigurator(){ + public static function hasMonologConfigurator() + { return \Illuminate\Foundation\Application::hasMonologConfigurator(); } @@ -655,7 +715,8 @@ namespace { * @return callable * @static */ - public static function getMonologConfigurator(){ + public static function getMonologConfigurator() + { return \Illuminate\Foundation\Application::getMonologConfigurator(); } @@ -665,7 +726,8 @@ namespace { * @return string * @static */ - public static function getLocale(){ + public static function getLocale() + { return \Illuminate\Foundation\Application::getLocale(); } @@ -676,7 +738,8 @@ namespace { * @return void * @static */ - public static function setLocale($locale){ + public static function setLocale($locale) + { \Illuminate\Foundation\Application::setLocale($locale); } @@ -687,7 +750,8 @@ namespace { * @return bool * @static */ - public static function isLocale($locale){ + public static function isLocale($locale) + { return \Illuminate\Foundation\Application::isLocale($locale); } @@ -697,7 +761,8 @@ namespace { * @return void * @static */ - public static function registerCoreContainerAliases(){ + public static function registerCoreContainerAliases() + { \Illuminate\Foundation\Application::registerCoreContainerAliases(); } @@ -707,7 +772,8 @@ namespace { * @return void * @static */ - public static function flush(){ + public static function flush() + { \Illuminate\Foundation\Application::flush(); } @@ -718,7 +784,8 @@ namespace { * @throws \RuntimeException * @static */ - public static function getNamespace(){ + public static function getNamespace() + { return \Illuminate\Foundation\Application::getNamespace(); } @@ -729,7 +796,8 @@ namespace { * @return \Illuminate\Contracts\Container\ContextualBindingBuilder * @static */ - public static function when($concrete){ + public static function when($concrete) + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::when($concrete); } @@ -741,7 +809,8 @@ namespace { * @return bool * @static */ - public static function resolved($abstract){ + public static function resolved($abstract) + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::resolved($abstract); } @@ -753,7 +822,8 @@ namespace { * @return bool * @static */ - public static function isShared($abstract){ + public static function isShared($abstract) + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::isShared($abstract); } @@ -765,7 +835,8 @@ namespace { * @return bool * @static */ - public static function isAlias($name){ + public static function isAlias($name) + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::isAlias($name); } @@ -779,7 +850,8 @@ namespace { * @return void * @static */ - public static function bind($abstract, $concrete = null, $shared = false){ + public static function bind($abstract, $concrete = null, $shared = false) + { //Method inherited from \Illuminate\Container\Container \Illuminate\Foundation\Application::bind($abstract, $concrete, $shared); } @@ -791,7 +863,8 @@ namespace { * @return bool * @static */ - public static function hasMethodBinding($method){ + public static function hasMethodBinding($method) + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::hasMethodBinding($method); } @@ -804,7 +877,8 @@ namespace { * @return void * @static */ - public static function bindMethod($method, $callback){ + public static function bindMethod($method, $callback) + { //Method inherited from \Illuminate\Container\Container \Illuminate\Foundation\Application::bindMethod($method, $callback); } @@ -817,7 +891,8 @@ namespace { * @return mixed * @static */ - public static function callMethodBinding($method, $instance){ + public static function callMethodBinding($method, $instance) + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::callMethodBinding($method, $instance); } @@ -831,7 +906,8 @@ namespace { * @return void * @static */ - public static function addContextualBinding($concrete, $abstract, $implementation){ + public static function addContextualBinding($concrete, $abstract, $implementation) + { //Method inherited from \Illuminate\Container\Container \Illuminate\Foundation\Application::addContextualBinding($concrete, $abstract, $implementation); } @@ -845,7 +921,8 @@ namespace { * @return void * @static */ - public static function bindIf($abstract, $concrete = null, $shared = false){ + public static function bindIf($abstract, $concrete = null, $shared = false) + { //Method inherited from \Illuminate\Container\Container \Illuminate\Foundation\Application::bindIf($abstract, $concrete, $shared); } @@ -858,7 +935,8 @@ namespace { * @return void * @static */ - public static function singleton($abstract, $concrete = null){ + public static function singleton($abstract, $concrete = null) + { //Method inherited from \Illuminate\Container\Container \Illuminate\Foundation\Application::singleton($abstract, $concrete); } @@ -872,7 +950,8 @@ namespace { * @throws \InvalidArgumentException * @static */ - public static function extend($abstract, $closure){ + public static function extend($abstract, $closure) + { //Method inherited from \Illuminate\Container\Container \Illuminate\Foundation\Application::extend($abstract, $closure); } @@ -885,7 +964,8 @@ namespace { * @return void * @static */ - public static function instance($abstract, $instance){ + public static function instance($abstract, $instance) + { //Method inherited from \Illuminate\Container\Container \Illuminate\Foundation\Application::instance($abstract, $instance); } @@ -898,7 +978,8 @@ namespace { * @return void * @static */ - public static function tag($abstracts, $tags){ + public static function tag($abstracts, $tags) + { //Method inherited from \Illuminate\Container\Container \Illuminate\Foundation\Application::tag($abstracts, $tags); } @@ -910,7 +991,8 @@ namespace { * @return array * @static */ - public static function tagged($tag){ + public static function tagged($tag) + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::tagged($tag); } @@ -923,7 +1005,8 @@ namespace { * @return void * @static */ - public static function alias($abstract, $alias){ + public static function alias($abstract, $alias) + { //Method inherited from \Illuminate\Container\Container \Illuminate\Foundation\Application::alias($abstract, $alias); } @@ -936,7 +1019,8 @@ namespace { * @return mixed * @static */ - public static function rebinding($abstract, $callback){ + public static function rebinding($abstract, $callback) + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::rebinding($abstract, $callback); } @@ -950,7 +1034,8 @@ namespace { * @return mixed * @static */ - public static function refresh($abstract, $target, $method){ + public static function refresh($abstract, $target, $method) + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::refresh($abstract, $target, $method); } @@ -963,7 +1048,8 @@ namespace { * @return \Closure * @static */ - public static function wrap($callback, $parameters = array()){ + public static function wrap($callback, $parameters = []) + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::wrap($callback, $parameters); } @@ -977,7 +1063,8 @@ namespace { * @return mixed * @static */ - public static function call($callback, $parameters = array(), $defaultMethod = null){ + public static function call($callback, $parameters = [], $defaultMethod = null) + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::call($callback, $parameters, $defaultMethod); } @@ -989,7 +1076,8 @@ namespace { * @return \Closure * @static */ - public static function factory($abstract){ + public static function factory($abstract) + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::factory($abstract); } @@ -1002,7 +1090,8 @@ namespace { * @throws \Illuminate\Contracts\Container\BindingResolutionException * @static */ - public static function build($concrete){ + public static function build($concrete) + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::build($concrete); } @@ -1015,7 +1104,8 @@ namespace { * @return void * @static */ - public static function resolving($abstract, $callback = null){ + public static function resolving($abstract, $callback = null) + { //Method inherited from \Illuminate\Container\Container \Illuminate\Foundation\Application::resolving($abstract, $callback); } @@ -1028,7 +1118,8 @@ namespace { * @return void * @static */ - public static function afterResolving($abstract, $callback = null){ + public static function afterResolving($abstract, $callback = null) + { //Method inherited from \Illuminate\Container\Container \Illuminate\Foundation\Application::afterResolving($abstract, $callback); } @@ -1039,7 +1130,8 @@ namespace { * @return array * @static */ - public static function getBindings(){ + public static function getBindings() + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::getBindings(); } @@ -1052,7 +1144,8 @@ namespace { * @throws \LogicException * @static */ - public static function getAlias($abstract){ + public static function getAlias($abstract) + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::getAlias($abstract); } @@ -1064,7 +1157,8 @@ namespace { * @return void * @static */ - public static function forgetInstance($abstract){ + public static function forgetInstance($abstract) + { //Method inherited from \Illuminate\Container\Container \Illuminate\Foundation\Application::forgetInstance($abstract); } @@ -1075,7 +1169,8 @@ namespace { * @return void * @static */ - public static function forgetInstances(){ + public static function forgetInstances() + { //Method inherited from \Illuminate\Container\Container \Illuminate\Foundation\Application::forgetInstances(); } @@ -1086,7 +1181,8 @@ namespace { * @return static * @static */ - public static function getInstance(){ + public static function getInstance() + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::getInstance(); } @@ -1098,7 +1194,8 @@ namespace { * @return static * @static */ - public static function setInstance($container = null){ + public static function setInstance($container = null) + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::setInstance($container); } @@ -1110,7 +1207,8 @@ namespace { * @return bool * @static */ - public static function offsetExists($key){ + public static function offsetExists($key) + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::offsetExists($key); } @@ -1122,7 +1220,8 @@ namespace { * @return mixed * @static */ - public static function offsetGet($key){ + public static function offsetGet($key) + { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::offsetGet($key); } @@ -1135,7 +1234,8 @@ namespace { * @return void * @static */ - public static function offsetSet($key, $value){ + public static function offsetSet($key, $value) + { //Method inherited from \Illuminate\Container\Container \Illuminate\Foundation\Application::offsetSet($key, $value); } @@ -1147,16 +1247,16 @@ namespace { * @return void * @static */ - public static function offsetUnset($key){ + public static function offsetUnset($key) + { //Method inherited from \Illuminate\Container\Container \Illuminate\Foundation\Application::offsetUnset($key); } - } - class Artisan extends \Illuminate\Support\Facades\Artisan{ - + class Artisan extends \Illuminate\Support\Facades\Artisan + { /** * Run the console application. * @@ -1165,7 +1265,8 @@ namespace { * @return int * @static */ - public static function handle($input, $output = null){ + public static function handle($input, $output = null) + { //Method inherited from \Illuminate\Foundation\Console\Kernel return \Crater\Console\Kernel::handle($input, $output); } @@ -1178,7 +1279,8 @@ namespace { * @return void * @static */ - public static function terminate($input, $status){ + public static function terminate($input, $status) + { //Method inherited from \Illuminate\Foundation\Console\Kernel \Crater\Console\Kernel::terminate($input, $status); } @@ -1191,7 +1293,8 @@ namespace { * @return \Illuminate\Foundation\Console\ClosureCommand * @static */ - public static function command($signature, $callback){ + public static function command($signature, $callback) + { //Method inherited from \Illuminate\Foundation\Console\Kernel return \Crater\Console\Kernel::command($signature, $callback); } @@ -1203,7 +1306,8 @@ namespace { * @return void * @static */ - public static function registerCommand($command){ + public static function registerCommand($command) + { //Method inherited from \Illuminate\Foundation\Console\Kernel \Crater\Console\Kernel::registerCommand($command); } @@ -1217,7 +1321,8 @@ namespace { * @return int * @static */ - public static function call($command, $parameters = array(), $outputBuffer = null){ + public static function call($command, $parameters = [], $outputBuffer = null) + { //Method inherited from \Illuminate\Foundation\Console\Kernel return \Crater\Console\Kernel::call($command, $parameters, $outputBuffer); } @@ -1230,7 +1335,8 @@ namespace { * @return void * @static */ - public static function queue($command, $parameters = array()){ + public static function queue($command, $parameters = []) + { //Method inherited from \Illuminate\Foundation\Console\Kernel \Crater\Console\Kernel::queue($command, $parameters); } @@ -1241,7 +1347,8 @@ namespace { * @return array * @static */ - public static function all(){ + public static function all() + { //Method inherited from \Illuminate\Foundation\Console\Kernel return \Crater\Console\Kernel::all(); } @@ -1252,7 +1359,8 @@ namespace { * @return string * @static */ - public static function output(){ + public static function output() + { //Method inherited from \Illuminate\Foundation\Console\Kernel return \Crater\Console\Kernel::output(); } @@ -1263,7 +1371,8 @@ namespace { * @return void * @static */ - public static function bootstrap(){ + public static function bootstrap() + { //Method inherited from \Illuminate\Foundation\Console\Kernel \Crater\Console\Kernel::bootstrap(); } @@ -1275,16 +1384,16 @@ namespace { * @return void * @static */ - public static function setArtisan($artisan){ + public static function setArtisan($artisan) + { //Method inherited from \Illuminate\Foundation\Console\Kernel \Crater\Console\Kernel::setArtisan($artisan); } - } - class Auth extends \Illuminate\Support\Facades\Auth{ - + class Auth extends \Illuminate\Support\Facades\Auth + { /** * Attempt to get the guard from the local cache. * @@ -1292,7 +1401,8 @@ namespace { * @return \Illuminate\Contracts\Auth\Guard|\Illuminate\Contracts\Auth\StatefulGuard * @static */ - public static function guard($name = null){ + public static function guard($name = null) + { return \Illuminate\Auth\AuthManager::guard($name); } @@ -1304,7 +1414,8 @@ namespace { * @return \Illuminate\Auth\SessionGuard * @static */ - public static function createSessionDriver($name, $config){ + public static function createSessionDriver($name, $config) + { return \Illuminate\Auth\AuthManager::createSessionDriver($name, $config); } @@ -1316,7 +1427,8 @@ namespace { * @return \Illuminate\Auth\TokenGuard * @static */ - public static function createTokenDriver($name, $config){ + public static function createTokenDriver($name, $config) + { return \Illuminate\Auth\AuthManager::createTokenDriver($name, $config); } @@ -1326,7 +1438,8 @@ namespace { * @return string * @static */ - public static function getDefaultDriver(){ + public static function getDefaultDriver() + { return \Illuminate\Auth\AuthManager::getDefaultDriver(); } @@ -1337,7 +1450,8 @@ namespace { * @return void * @static */ - public static function shouldUse($name){ + public static function shouldUse($name) + { \Illuminate\Auth\AuthManager::shouldUse($name); } @@ -1348,7 +1462,8 @@ namespace { * @return void * @static */ - public static function setDefaultDriver($name){ + public static function setDefaultDriver($name) + { \Illuminate\Auth\AuthManager::setDefaultDriver($name); } @@ -1360,7 +1475,8 @@ namespace { * @return $this * @static */ - public static function viaRequest($driver, $callback){ + public static function viaRequest($driver, $callback) + { return \Illuminate\Auth\AuthManager::viaRequest($driver, $callback); } @@ -1370,7 +1486,8 @@ namespace { * @return \Closure * @static */ - public static function userResolver(){ + public static function userResolver() + { return \Illuminate\Auth\AuthManager::userResolver(); } @@ -1381,7 +1498,8 @@ namespace { * @return $this * @static */ - public static function resolveUsersUsing($userResolver){ + public static function resolveUsersUsing($userResolver) + { return \Illuminate\Auth\AuthManager::resolveUsersUsing($userResolver); } @@ -1393,7 +1511,8 @@ namespace { * @return $this * @static */ - public static function extend($driver, $callback){ + public static function extend($driver, $callback) + { return \Illuminate\Auth\AuthManager::extend($driver, $callback); } @@ -1405,7 +1524,8 @@ namespace { * @return $this * @static */ - public static function provider($name, $callback){ + public static function provider($name, $callback) + { return \Illuminate\Auth\AuthManager::provider($name, $callback); } @@ -1417,7 +1537,8 @@ namespace { * @throws \InvalidArgumentException * @static */ - public static function createUserProvider($provider){ + public static function createUserProvider($provider) + { return \Illuminate\Auth\AuthManager::createUserProvider($provider); } @@ -1427,7 +1548,8 @@ namespace { * @return \Crater\User|null * @static */ - public static function user(){ + public static function user() + { return \Illuminate\Auth\SessionGuard::user(); } @@ -1437,7 +1559,8 @@ namespace { * @return int|null * @static */ - public static function id(){ + public static function id() + { return \Illuminate\Auth\SessionGuard::id(); } @@ -1448,7 +1571,8 @@ namespace { * @return bool * @static */ - public static function once($credentials = array()){ + public static function once($credentials = []) + { return \Illuminate\Auth\SessionGuard::once($credentials); } @@ -1459,7 +1583,8 @@ namespace { * @return \Crater\User|false * @static */ - public static function onceUsingId($id){ + public static function onceUsingId($id) + { return \Illuminate\Auth\SessionGuard::onceUsingId($id); } @@ -1470,7 +1595,8 @@ namespace { * @return bool * @static */ - public static function validate($credentials = array()){ + public static function validate($credentials = []) + { return \Illuminate\Auth\SessionGuard::validate($credentials); } @@ -1482,7 +1608,8 @@ namespace { * @return \Symfony\Component\HttpFoundation\Response|null * @static */ - public static function basic($field = 'email', $extraConditions = array()){ + public static function basic($field = 'email', $extraConditions = []) + { return \Illuminate\Auth\SessionGuard::basic($field, $extraConditions); } @@ -1494,7 +1621,8 @@ namespace { * @return \Symfony\Component\HttpFoundation\Response|null * @static */ - public static function onceBasic($field = 'email', $extraConditions = array()){ + public static function onceBasic($field = 'email', $extraConditions = []) + { return \Illuminate\Auth\SessionGuard::onceBasic($field, $extraConditions); } @@ -1506,7 +1634,8 @@ namespace { * @return bool * @static */ - public static function attempt($credentials = array(), $remember = false){ + public static function attempt($credentials = [], $remember = false) + { return \Illuminate\Auth\SessionGuard::attempt($credentials, $remember); } @@ -1518,7 +1647,8 @@ namespace { * @return \Crater\User|false * @static */ - public static function loginUsingId($id, $remember = false){ + public static function loginUsingId($id, $remember = false) + { return \Illuminate\Auth\SessionGuard::loginUsingId($id, $remember); } @@ -1530,7 +1660,8 @@ namespace { * @return void * @static */ - public static function login($user, $remember = false){ + public static function login($user, $remember = false) + { \Illuminate\Auth\SessionGuard::login($user, $remember); } @@ -1540,7 +1671,8 @@ namespace { * @return void * @static */ - public static function logout(){ + public static function logout() + { \Illuminate\Auth\SessionGuard::logout(); } @@ -1551,7 +1683,8 @@ namespace { * @return void * @static */ - public static function attempting($callback){ + public static function attempting($callback) + { \Illuminate\Auth\SessionGuard::attempting($callback); } @@ -1561,7 +1694,8 @@ namespace { * @return \Crater\User * @static */ - public static function getLastAttempted(){ + public static function getLastAttempted() + { return \Illuminate\Auth\SessionGuard::getLastAttempted(); } @@ -1571,7 +1705,8 @@ namespace { * @return string * @static */ - public static function getName(){ + public static function getName() + { return \Illuminate\Auth\SessionGuard::getName(); } @@ -1581,7 +1716,8 @@ namespace { * @return string * @static */ - public static function getRecallerName(){ + public static function getRecallerName() + { return \Illuminate\Auth\SessionGuard::getRecallerName(); } @@ -1591,7 +1727,8 @@ namespace { * @return bool * @static */ - public static function viaRemember(){ + public static function viaRemember() + { return \Illuminate\Auth\SessionGuard::viaRemember(); } @@ -1602,7 +1739,8 @@ namespace { * @throws \RuntimeException * @static */ - public static function getCookieJar(){ + public static function getCookieJar() + { return \Illuminate\Auth\SessionGuard::getCookieJar(); } @@ -1613,7 +1751,8 @@ namespace { * @return void * @static */ - public static function setCookieJar($cookie){ + public static function setCookieJar($cookie) + { \Illuminate\Auth\SessionGuard::setCookieJar($cookie); } @@ -1623,7 +1762,8 @@ namespace { * @return \Illuminate\Contracts\Events\Dispatcher * @static */ - public static function getDispatcher(){ + public static function getDispatcher() + { return \Illuminate\Auth\SessionGuard::getDispatcher(); } @@ -1634,7 +1774,8 @@ namespace { * @return void * @static */ - public static function setDispatcher($events){ + public static function setDispatcher($events) + { \Illuminate\Auth\SessionGuard::setDispatcher($events); } @@ -1644,7 +1785,8 @@ namespace { * @return \Illuminate\Session\Store * @static */ - public static function getSession(){ + public static function getSession() + { return \Illuminate\Auth\SessionGuard::getSession(); } @@ -1654,7 +1796,8 @@ namespace { * @return \Illuminate\Contracts\Auth\UserProvider * @static */ - public static function getProvider(){ + public static function getProvider() + { return \Illuminate\Auth\SessionGuard::getProvider(); } @@ -1665,7 +1808,8 @@ namespace { * @return void * @static */ - public static function setProvider($provider){ + public static function setProvider($provider) + { \Illuminate\Auth\SessionGuard::setProvider($provider); } @@ -1675,7 +1819,8 @@ namespace { * @return \Crater\User|null * @static */ - public static function getUser(){ + public static function getUser() + { return \Illuminate\Auth\SessionGuard::getUser(); } @@ -1686,7 +1831,8 @@ namespace { * @return $this * @static */ - public static function setUser($user){ + public static function setUser($user) + { return \Illuminate\Auth\SessionGuard::setUser($user); } @@ -1696,7 +1842,8 @@ namespace { * @return \Symfony\Component\HttpFoundation\Request * @static */ - public static function getRequest(){ + public static function getRequest() + { return \Illuminate\Auth\SessionGuard::getRequest(); } @@ -1707,7 +1854,8 @@ namespace { * @return $this * @static */ - public static function setRequest($request){ + public static function setRequest($request) + { return \Illuminate\Auth\SessionGuard::setRequest($request); } @@ -1718,7 +1866,8 @@ namespace { * @throws \Illuminate\Auth\AuthenticationException * @static */ - public static function authenticate(){ + public static function authenticate() + { return \Illuminate\Auth\SessionGuard::authenticate(); } @@ -1728,7 +1877,8 @@ namespace { * @return bool * @static */ - public static function check(){ + public static function check() + { return \Illuminate\Auth\SessionGuard::check(); } @@ -1738,15 +1888,15 @@ namespace { * @return bool * @static */ - public static function guest(){ + public static function guest() + { return \Illuminate\Auth\SessionGuard::guest(); } - } - class Blade extends \Illuminate\Support\Facades\Blade{ - + class Blade extends \Illuminate\Support\Facades\Blade + { /** * Compile the view at the given path. * @@ -1754,7 +1904,8 @@ namespace { * @return void * @static */ - public static function compile($path = null){ + public static function compile($path = null) + { \Illuminate\View\Compilers\BladeCompiler::compile($path); } @@ -1764,7 +1915,8 @@ namespace { * @return string * @static */ - public static function getPath(){ + public static function getPath() + { return \Illuminate\View\Compilers\BladeCompiler::getPath(); } @@ -1775,7 +1927,8 @@ namespace { * @return void * @static */ - public static function setPath($path){ + public static function setPath($path) + { \Illuminate\View\Compilers\BladeCompiler::setPath($path); } @@ -1786,7 +1939,8 @@ namespace { * @return string * @static */ - public static function compileString($value){ + public static function compileString($value) + { return \Illuminate\View\Compilers\BladeCompiler::compileString($value); } @@ -1797,7 +1951,8 @@ namespace { * @return string * @static */ - public static function stripParentheses($expression){ + public static function stripParentheses($expression) + { return \Illuminate\View\Compilers\BladeCompiler::stripParentheses($expression); } @@ -1808,7 +1963,8 @@ namespace { * @return void * @static */ - public static function extend($compiler){ + public static function extend($compiler) + { \Illuminate\View\Compilers\BladeCompiler::extend($compiler); } @@ -1818,7 +1974,8 @@ namespace { * @return array * @static */ - public static function getExtensions(){ + public static function getExtensions() + { return \Illuminate\View\Compilers\BladeCompiler::getExtensions(); } @@ -1830,7 +1987,8 @@ namespace { * @return void * @static */ - public static function directive($name, $handler){ + public static function directive($name, $handler) + { \Illuminate\View\Compilers\BladeCompiler::directive($name, $handler); } @@ -1840,7 +1998,8 @@ namespace { * @return array * @static */ - public static function getCustomDirectives(){ + public static function getCustomDirectives() + { return \Illuminate\View\Compilers\BladeCompiler::getCustomDirectives(); } @@ -1851,7 +2010,8 @@ namespace { * @return void * @static */ - public static function setEchoFormat($format){ + public static function setEchoFormat($format) + { \Illuminate\View\Compilers\BladeCompiler::setEchoFormat($format); } @@ -1862,7 +2022,8 @@ namespace { * @return string * @static */ - public static function getCompiledPath($path){ + public static function getCompiledPath($path) + { //Method inherited from \Illuminate\View\Compilers\Compiler return \Illuminate\View\Compilers\BladeCompiler::getCompiledPath($path); } @@ -1874,7 +2035,8 @@ namespace { * @return bool * @static */ - public static function isExpired($path){ + public static function isExpired($path) + { //Method inherited from \Illuminate\View\Compilers\Compiler return \Illuminate\View\Compilers\BladeCompiler::isExpired($path); } @@ -1886,15 +2048,15 @@ namespace { * @return string * @static */ - public static function compileEchoDefaults($value){ + public static function compileEchoDefaults($value) + { return \Illuminate\View\Compilers\BladeCompiler::compileEchoDefaults($value); } - } - class Bus extends \Illuminate\Support\Facades\Bus{ - + class Bus extends \Illuminate\Support\Facades\Bus + { /** * Dispatch a command to its appropriate handler. * @@ -1902,7 +2064,8 @@ namespace { * @return mixed * @static */ - public static function dispatch($command){ + public static function dispatch($command) + { return \Illuminate\Bus\Dispatcher::dispatch($command); } @@ -1914,7 +2077,8 @@ namespace { * @return mixed * @static */ - public static function dispatchNow($command, $handler = null){ + public static function dispatchNow($command, $handler = null) + { return \Illuminate\Bus\Dispatcher::dispatchNow($command, $handler); } @@ -1925,7 +2089,8 @@ namespace { * @return bool * @static */ - public static function hasCommandHandler($command){ + public static function hasCommandHandler($command) + { return \Illuminate\Bus\Dispatcher::hasCommandHandler($command); } @@ -1936,7 +2101,8 @@ namespace { * @return bool|mixed * @static */ - public static function getCommandHandler($command){ + public static function getCommandHandler($command) + { return \Illuminate\Bus\Dispatcher::getCommandHandler($command); } @@ -1948,7 +2114,8 @@ namespace { * @throws \RuntimeException * @static */ - public static function dispatchToQueue($command){ + public static function dispatchToQueue($command) + { return \Illuminate\Bus\Dispatcher::dispatchToQueue($command); } @@ -1959,7 +2126,8 @@ namespace { * @return $this * @static */ - public static function pipeThrough($pipes){ + public static function pipeThrough($pipes) + { return \Illuminate\Bus\Dispatcher::pipeThrough($pipes); } @@ -1970,15 +2138,15 @@ namespace { * @return $this * @static */ - public static function map($map){ + public static function map($map) + { return \Illuminate\Bus\Dispatcher::map($map); } - } - class Cache extends \Illuminate\Support\Facades\Cache{ - + class Cache extends \Illuminate\Support\Facades\Cache + { /** * Get a cache store instance by name. * @@ -1986,7 +2154,8 @@ namespace { * @return mixed * @static */ - public static function store($name = null){ + public static function store($name = null) + { return \Illuminate\Cache\CacheManager::store($name); } @@ -1997,7 +2166,8 @@ namespace { * @return mixed * @static */ - public static function driver($driver = null){ + public static function driver($driver = null) + { return \Illuminate\Cache\CacheManager::driver($driver); } @@ -2008,7 +2178,8 @@ namespace { * @return \Illuminate\Cache\Repository * @static */ - public static function repository($store){ + public static function repository($store) + { return \Illuminate\Cache\CacheManager::repository($store); } @@ -2018,7 +2189,8 @@ namespace { * @return string * @static */ - public static function getDefaultDriver(){ + public static function getDefaultDriver() + { return \Illuminate\Cache\CacheManager::getDefaultDriver(); } @@ -2029,7 +2201,8 @@ namespace { * @return void * @static */ - public static function setDefaultDriver($name){ + public static function setDefaultDriver($name) + { \Illuminate\Cache\CacheManager::setDefaultDriver($name); } @@ -2041,7 +2214,8 @@ namespace { * @return $this * @static */ - public static function extend($driver, $callback){ + public static function extend($driver, $callback) + { return \Illuminate\Cache\CacheManager::extend($driver, $callback); } @@ -2052,7 +2226,8 @@ namespace { * @return bool * @static */ - public static function has($key){ + public static function has($key) + { return \Illuminate\Cache\Repository::has($key); } @@ -2064,7 +2239,8 @@ namespace { * @return mixed * @static */ - public static function get($key, $default = null){ + public static function get($key, $default = null) + { return \Illuminate\Cache\Repository::get($key, $default); } @@ -2077,7 +2253,8 @@ namespace { * @return array * @static */ - public static function many($keys){ + public static function many($keys) + { return \Illuminate\Cache\Repository::many($keys); } @@ -2089,7 +2266,8 @@ namespace { * @return mixed * @static */ - public static function pull($key, $default = null){ + public static function pull($key, $default = null) + { return \Illuminate\Cache\Repository::pull($key, $default); } @@ -2102,7 +2280,8 @@ namespace { * @return void * @static */ - public static function put($key, $value, $minutes = null){ + public static function put($key, $value, $minutes = null) + { \Illuminate\Cache\Repository::put($key, $value, $minutes); } @@ -2114,7 +2293,8 @@ namespace { * @return void * @static */ - public static function putMany($values, $minutes){ + public static function putMany($values, $minutes) + { \Illuminate\Cache\Repository::putMany($values, $minutes); } @@ -2127,7 +2307,8 @@ namespace { * @return bool * @static */ - public static function add($key, $value, $minutes){ + public static function add($key, $value, $minutes) + { return \Illuminate\Cache\Repository::add($key, $value, $minutes); } @@ -2139,7 +2320,8 @@ namespace { * @return int|bool * @static */ - public static function increment($key, $value = 1){ + public static function increment($key, $value = 1) + { return \Illuminate\Cache\Repository::increment($key, $value); } @@ -2151,7 +2333,8 @@ namespace { * @return int|bool * @static */ - public static function decrement($key, $value = 1){ + public static function decrement($key, $value = 1) + { return \Illuminate\Cache\Repository::decrement($key, $value); } @@ -2163,7 +2346,8 @@ namespace { * @return void * @static */ - public static function forever($key, $value){ + public static function forever($key, $value) + { \Illuminate\Cache\Repository::forever($key, $value); } @@ -2176,7 +2360,8 @@ namespace { * @return mixed * @static */ - public static function remember($key, $minutes, $callback){ + public static function remember($key, $minutes, $callback) + { return \Illuminate\Cache\Repository::remember($key, $minutes, $callback); } @@ -2188,7 +2373,8 @@ namespace { * @return mixed * @static */ - public static function sear($key, $callback){ + public static function sear($key, $callback) + { return \Illuminate\Cache\Repository::sear($key, $callback); } @@ -2200,7 +2386,8 @@ namespace { * @return mixed * @static */ - public static function rememberForever($key, $callback){ + public static function rememberForever($key, $callback) + { return \Illuminate\Cache\Repository::rememberForever($key, $callback); } @@ -2211,7 +2398,8 @@ namespace { * @return bool * @static */ - public static function forget($key){ + public static function forget($key) + { return \Illuminate\Cache\Repository::forget($key); } @@ -2223,7 +2411,8 @@ namespace { * @throws \BadMethodCallException * @static */ - public static function tags($names){ + public static function tags($names) + { return \Illuminate\Cache\Repository::tags($names); } @@ -2233,7 +2422,8 @@ namespace { * @return float|int * @static */ - public static function getDefaultCacheTime(){ + public static function getDefaultCacheTime() + { return \Illuminate\Cache\Repository::getDefaultCacheTime(); } @@ -2244,7 +2434,8 @@ namespace { * @return $this * @static */ - public static function setDefaultCacheTime($minutes){ + public static function setDefaultCacheTime($minutes) + { return \Illuminate\Cache\Repository::setDefaultCacheTime($minutes); } @@ -2254,7 +2445,8 @@ namespace { * @return \Illuminate\Contracts\Cache\Store * @static */ - public static function getStore(){ + public static function getStore() + { return \Illuminate\Cache\Repository::getStore(); } @@ -2265,7 +2457,8 @@ namespace { * @return void * @static */ - public static function setEventDispatcher($events){ + public static function setEventDispatcher($events) + { \Illuminate\Cache\Repository::setEventDispatcher($events); } @@ -2276,7 +2469,8 @@ namespace { * @return bool * @static */ - public static function offsetExists($key){ + public static function offsetExists($key) + { return \Illuminate\Cache\Repository::offsetExists($key); } @@ -2287,7 +2481,8 @@ namespace { * @return mixed * @static */ - public static function offsetGet($key){ + public static function offsetGet($key) + { return \Illuminate\Cache\Repository::offsetGet($key); } @@ -2299,7 +2494,8 @@ namespace { * @return void * @static */ - public static function offsetSet($key, $value){ + public static function offsetSet($key, $value) + { \Illuminate\Cache\Repository::offsetSet($key, $value); } @@ -2310,7 +2506,8 @@ namespace { * @return void * @static */ - public static function offsetUnset($key){ + public static function offsetUnset($key) + { \Illuminate\Cache\Repository::offsetUnset($key); } @@ -2322,7 +2519,8 @@ namespace { * @return void * @static */ - public static function macro($name, $macro){ + public static function macro($name, $macro) + { \Illuminate\Cache\Repository::macro($name, $macro); } @@ -2333,7 +2531,8 @@ namespace { * @return bool * @static */ - public static function hasMacro($name){ + public static function hasMacro($name) + { return \Illuminate\Cache\Repository::hasMacro($name); } @@ -2346,7 +2545,8 @@ namespace { * @throws \BadMethodCallException * @static */ - public static function macroCall($method, $parameters){ + public static function macroCall($method, $parameters) + { return \Illuminate\Cache\Repository::macroCall($method, $parameters); } @@ -2356,7 +2556,8 @@ namespace { * @return bool * @static */ - public static function flush(){ + public static function flush() + { return \Illuminate\Cache\FileStore::flush(); } @@ -2366,7 +2567,8 @@ namespace { * @return \Illuminate\Filesystem\Filesystem * @static */ - public static function getFilesystem(){ + public static function getFilesystem() + { return \Illuminate\Cache\FileStore::getFilesystem(); } @@ -2376,7 +2578,8 @@ namespace { * @return string * @static */ - public static function getDirectory(){ + public static function getDirectory() + { return \Illuminate\Cache\FileStore::getDirectory(); } @@ -2386,15 +2589,15 @@ namespace { * @return string * @static */ - public static function getPrefix(){ + public static function getPrefix() + { return \Illuminate\Cache\FileStore::getPrefix(); } - } - class Config extends \Illuminate\Support\Facades\Config{ - + class Config extends \Illuminate\Support\Facades\Config + { /** * Determine if the given configuration value exists. * @@ -2402,7 +2605,8 @@ namespace { * @return bool * @static */ - public static function has($key){ + public static function has($key) + { return \Illuminate\Config\Repository::has($key); } @@ -2414,7 +2618,8 @@ namespace { * @return mixed * @static */ - public static function get($key, $default = null){ + public static function get($key, $default = null) + { return \Illuminate\Config\Repository::get($key, $default); } @@ -2426,7 +2631,8 @@ namespace { * @return void * @static */ - public static function set($key, $value = null){ + public static function set($key, $value = null) + { \Illuminate\Config\Repository::set($key, $value); } @@ -2438,7 +2644,8 @@ namespace { * @return void * @static */ - public static function prepend($key, $value){ + public static function prepend($key, $value) + { \Illuminate\Config\Repository::prepend($key, $value); } @@ -2450,7 +2657,8 @@ namespace { * @return void * @static */ - public static function push($key, $value){ + public static function push($key, $value) + { \Illuminate\Config\Repository::push($key, $value); } @@ -2460,7 +2668,8 @@ namespace { * @return array * @static */ - public static function all(){ + public static function all() + { return \Illuminate\Config\Repository::all(); } @@ -2471,7 +2680,8 @@ namespace { * @return bool * @static */ - public static function offsetExists($key){ + public static function offsetExists($key) + { return \Illuminate\Config\Repository::offsetExists($key); } @@ -2482,7 +2692,8 @@ namespace { * @return mixed * @static */ - public static function offsetGet($key){ + public static function offsetGet($key) + { return \Illuminate\Config\Repository::offsetGet($key); } @@ -2494,7 +2705,8 @@ namespace { * @return void * @static */ - public static function offsetSet($key, $value){ + public static function offsetSet($key, $value) + { \Illuminate\Config\Repository::offsetSet($key, $value); } @@ -2505,15 +2717,15 @@ namespace { * @return void * @static */ - public static function offsetUnset($key){ + public static function offsetUnset($key) + { \Illuminate\Config\Repository::offsetUnset($key); } - } - class Cookie extends \Illuminate\Support\Facades\Cookie{ - + class Cookie extends \Illuminate\Support\Facades\Cookie + { /** * Create a new cookie instance. * @@ -2527,7 +2739,8 @@ namespace { * @return \Symfony\Component\HttpFoundation\Cookie * @static */ - public static function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = false, $httpOnly = true){ + public static function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = false, $httpOnly = true) + { return \Illuminate\Cookie\CookieJar::make($name, $value, $minutes, $path, $domain, $secure, $httpOnly); } @@ -2543,7 +2756,8 @@ namespace { * @return \Symfony\Component\HttpFoundation\Cookie * @static */ - public static function forever($name, $value, $path = null, $domain = null, $secure = false, $httpOnly = true){ + public static function forever($name, $value, $path = null, $domain = null, $secure = false, $httpOnly = true) + { return \Illuminate\Cookie\CookieJar::forever($name, $value, $path, $domain, $secure, $httpOnly); } @@ -2556,7 +2770,8 @@ namespace { * @return \Symfony\Component\HttpFoundation\Cookie * @static */ - public static function forget($name, $path = null, $domain = null){ + public static function forget($name, $path = null, $domain = null) + { return \Illuminate\Cookie\CookieJar::forget($name, $path, $domain); } @@ -2567,7 +2782,8 @@ namespace { * @return bool * @static */ - public static function hasQueued($key){ + public static function hasQueued($key) + { return \Illuminate\Cookie\CookieJar::hasQueued($key); } @@ -2579,7 +2795,8 @@ namespace { * @return \Symfony\Component\HttpFoundation\Cookie * @static */ - public static function queued($key, $default = null){ + public static function queued($key, $default = null) + { return \Illuminate\Cookie\CookieJar::queued($key, $default); } @@ -2590,7 +2807,8 @@ namespace { * @return void * @static */ - public static function queue($parameters = null){ + public static function queue($parameters = null) + { \Illuminate\Cookie\CookieJar::queue($parameters); } @@ -2601,7 +2819,8 @@ namespace { * @return void * @static */ - public static function unqueue($name){ + public static function unqueue($name) + { \Illuminate\Cookie\CookieJar::unqueue($name); } @@ -2614,7 +2833,8 @@ namespace { * @return $this * @static */ - public static function setDefaultPathAndDomain($path, $domain, $secure = false){ + public static function setDefaultPathAndDomain($path, $domain, $secure = false) + { return \Illuminate\Cookie\CookieJar::setDefaultPathAndDomain($path, $domain, $secure); } @@ -2624,15 +2844,15 @@ namespace { * @return array * @static */ - public static function getQueuedCookies(){ + public static function getQueuedCookies() + { return \Illuminate\Cookie\CookieJar::getQueuedCookies(); } - } - class Crypt extends \Illuminate\Support\Facades\Crypt{ - + class Crypt extends \Illuminate\Support\Facades\Crypt + { /** * Determine if the given key and cipher combination is valid. * @@ -2641,7 +2861,8 @@ namespace { * @return bool * @static */ - public static function supported($key, $cipher){ + public static function supported($key, $cipher) + { return \Illuminate\Encryption\Encrypter::supported($key, $cipher); } @@ -2654,7 +2875,8 @@ namespace { * @throws \Illuminate\Contracts\Encryption\EncryptException * @static */ - public static function encrypt($value, $serialize = true){ + public static function encrypt($value, $serialize = true) + { return \Illuminate\Encryption\Encrypter::encrypt($value, $serialize); } @@ -2665,7 +2887,8 @@ namespace { * @return string * @static */ - public static function encryptString($value){ + public static function encryptString($value) + { return \Illuminate\Encryption\Encrypter::encryptString($value); } @@ -2678,7 +2901,8 @@ namespace { * @throws \Illuminate\Contracts\Encryption\DecryptException * @static */ - public static function decrypt($payload, $unserialize = true){ + public static function decrypt($payload, $unserialize = true) + { return \Illuminate\Encryption\Encrypter::decrypt($payload, $unserialize); } @@ -2689,7 +2913,8 @@ namespace { * @return string * @static */ - public static function decryptString($payload){ + public static function decryptString($payload) + { return \Illuminate\Encryption\Encrypter::decryptString($payload); } @@ -2699,15 +2924,15 @@ namespace { * @return string * @static */ - public static function getKey(){ + public static function getKey() + { return \Illuminate\Encryption\Encrypter::getKey(); } - } - class DB extends \Illuminate\Support\Facades\DB{ - + class DB extends \Illuminate\Support\Facades\DB + { /** * Get a database connection instance. * @@ -2715,7 +2940,8 @@ namespace { * @return \Illuminate\Database\Connection * @static */ - public static function connection($name = null){ + public static function connection($name = null) + { return \Illuminate\Database\DatabaseManager::connection($name); } @@ -2726,7 +2952,8 @@ namespace { * @return void * @static */ - public static function purge($name = null){ + public static function purge($name = null) + { \Illuminate\Database\DatabaseManager::purge($name); } @@ -2737,7 +2964,8 @@ namespace { * @return void * @static */ - public static function disconnect($name = null){ + public static function disconnect($name = null) + { \Illuminate\Database\DatabaseManager::disconnect($name); } @@ -2748,7 +2976,8 @@ namespace { * @return \Illuminate\Database\Connection * @static */ - public static function reconnect($name = null){ + public static function reconnect($name = null) + { return \Illuminate\Database\DatabaseManager::reconnect($name); } @@ -2758,7 +2987,8 @@ namespace { * @return string * @static */ - public static function getDefaultConnection(){ + public static function getDefaultConnection() + { return \Illuminate\Database\DatabaseManager::getDefaultConnection(); } @@ -2769,7 +2999,8 @@ namespace { * @return void * @static */ - public static function setDefaultConnection($name){ + public static function setDefaultConnection($name) + { \Illuminate\Database\DatabaseManager::setDefaultConnection($name); } @@ -2779,7 +3010,8 @@ namespace { * @return array * @static */ - public static function supportedDrivers(){ + public static function supportedDrivers() + { return \Illuminate\Database\DatabaseManager::supportedDrivers(); } @@ -2789,7 +3021,8 @@ namespace { * @return array * @static */ - public static function availableDrivers(){ + public static function availableDrivers() + { return \Illuminate\Database\DatabaseManager::availableDrivers(); } @@ -2801,7 +3034,8 @@ namespace { * @return void * @static */ - public static function extend($name, $resolver){ + public static function extend($name, $resolver) + { \Illuminate\Database\DatabaseManager::extend($name, $resolver); } @@ -2811,7 +3045,8 @@ namespace { * @return array * @static */ - public static function getConnections(){ + public static function getConnections() + { return \Illuminate\Database\DatabaseManager::getConnections(); } @@ -2821,7 +3056,8 @@ namespace { * @return \Illuminate\Database\Schema\MySqlBuilder * @static */ - public static function getSchemaBuilder(){ + public static function getSchemaBuilder() + { return \Illuminate\Database\MySqlConnection::getSchemaBuilder(); } @@ -2833,7 +3069,8 @@ namespace { * @return void * @static */ - public static function bindValues($statement, $bindings){ + public static function bindValues($statement, $bindings) + { \Illuminate\Database\MySqlConnection::bindValues($statement, $bindings); } @@ -2843,7 +3080,8 @@ namespace { * @return void * @static */ - public static function useDefaultQueryGrammar(){ + public static function useDefaultQueryGrammar() + { //Method inherited from \Illuminate\Database\Connection \Illuminate\Database\MySqlConnection::useDefaultQueryGrammar(); } @@ -2854,7 +3092,8 @@ namespace { * @return void * @static */ - public static function useDefaultSchemaGrammar(){ + public static function useDefaultSchemaGrammar() + { //Method inherited from \Illuminate\Database\Connection \Illuminate\Database\MySqlConnection::useDefaultSchemaGrammar(); } @@ -2865,7 +3104,8 @@ namespace { * @return void * @static */ - public static function useDefaultPostProcessor(){ + public static function useDefaultPostProcessor() + { //Method inherited from \Illuminate\Database\Connection \Illuminate\Database\MySqlConnection::useDefaultPostProcessor(); } @@ -2877,7 +3117,8 @@ namespace { * @return \Illuminate\Database\Query\Builder * @static */ - public static function table($table){ + public static function table($table) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::table($table); } @@ -2888,7 +3129,8 @@ namespace { * @return \Illuminate\Database\Query\Builder * @static */ - public static function query(){ + public static function query() + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::query(); } @@ -2902,7 +3144,8 @@ namespace { * @return mixed * @static */ - public static function selectOne($query, $bindings = array(), $useReadPdo = true){ + public static function selectOne($query, $bindings = [], $useReadPdo = true) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::selectOne($query, $bindings, $useReadPdo); } @@ -2915,7 +3158,8 @@ namespace { * @return array * @static */ - public static function selectFromWriteConnection($query, $bindings = array()){ + public static function selectFromWriteConnection($query, $bindings = []) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::selectFromWriteConnection($query, $bindings); } @@ -2929,7 +3173,8 @@ namespace { * @return array * @static */ - public static function select($query, $bindings = array(), $useReadPdo = true){ + public static function select($query, $bindings = [], $useReadPdo = true) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::select($query, $bindings, $useReadPdo); } @@ -2943,7 +3188,8 @@ namespace { * @return \Generator * @static */ - public static function cursor($query, $bindings = array(), $useReadPdo = true){ + public static function cursor($query, $bindings = [], $useReadPdo = true) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::cursor($query, $bindings, $useReadPdo); } @@ -2956,7 +3202,8 @@ namespace { * @return bool * @static */ - public static function insert($query, $bindings = array()){ + public static function insert($query, $bindings = []) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::insert($query, $bindings); } @@ -2969,7 +3216,8 @@ namespace { * @return int * @static */ - public static function update($query, $bindings = array()){ + public static function update($query, $bindings = []) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::update($query, $bindings); } @@ -2982,7 +3230,8 @@ namespace { * @return int * @static */ - public static function delete($query, $bindings = array()){ + public static function delete($query, $bindings = []) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::delete($query, $bindings); } @@ -2995,7 +3244,8 @@ namespace { * @return bool * @static */ - public static function statement($query, $bindings = array()){ + public static function statement($query, $bindings = []) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::statement($query, $bindings); } @@ -3008,7 +3258,8 @@ namespace { * @return int * @static */ - public static function affectingStatement($query, $bindings = array()){ + public static function affectingStatement($query, $bindings = []) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::affectingStatement($query, $bindings); } @@ -3020,7 +3271,8 @@ namespace { * @return bool * @static */ - public static function unprepared($query){ + public static function unprepared($query) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::unprepared($query); } @@ -3032,7 +3284,8 @@ namespace { * @return array * @static */ - public static function pretend($callback){ + public static function pretend($callback) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::pretend($callback); } @@ -3044,7 +3297,8 @@ namespace { * @return array * @static */ - public static function prepareBindings($bindings){ + public static function prepareBindings($bindings) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::prepareBindings($bindings); } @@ -3058,7 +3312,8 @@ namespace { * @return void * @static */ - public static function logQuery($query, $bindings, $time = null){ + public static function logQuery($query, $bindings, $time = null) + { //Method inherited from \Illuminate\Database\Connection \Illuminate\Database\MySqlConnection::logQuery($query, $bindings, $time); } @@ -3070,7 +3325,8 @@ namespace { * @return void * @static */ - public static function listen($callback){ + public static function listen($callback) + { //Method inherited from \Illuminate\Database\Connection \Illuminate\Database\MySqlConnection::listen($callback); } @@ -3082,7 +3338,8 @@ namespace { * @return \Illuminate\Database\Query\Expression * @static */ - public static function raw($value){ + public static function raw($value) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::raw($value); } @@ -3093,7 +3350,8 @@ namespace { * @return bool * @static */ - public static function isDoctrineAvailable(){ + public static function isDoctrineAvailable() + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::isDoctrineAvailable(); } @@ -3106,7 +3364,8 @@ namespace { * @return \Doctrine\DBAL\Schema\Column * @static */ - public static function getDoctrineColumn($table, $column){ + public static function getDoctrineColumn($table, $column) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::getDoctrineColumn($table, $column); } @@ -3117,7 +3376,8 @@ namespace { * @return \Doctrine\DBAL\Schema\AbstractSchemaManager * @static */ - public static function getDoctrineSchemaManager(){ + public static function getDoctrineSchemaManager() + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::getDoctrineSchemaManager(); } @@ -3128,7 +3388,8 @@ namespace { * @return \Doctrine\DBAL\Connection * @static */ - public static function getDoctrineConnection(){ + public static function getDoctrineConnection() + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::getDoctrineConnection(); } @@ -3139,7 +3400,8 @@ namespace { * @return \PDO * @static */ - public static function getPdo(){ + public static function getPdo() + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::getPdo(); } @@ -3150,7 +3412,8 @@ namespace { * @return \PDO * @static */ - public static function getReadPdo(){ + public static function getReadPdo() + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::getReadPdo(); } @@ -3162,7 +3425,8 @@ namespace { * @return $this * @static */ - public static function setPdo($pdo){ + public static function setPdo($pdo) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::setPdo($pdo); } @@ -3174,7 +3438,8 @@ namespace { * @return $this * @static */ - public static function setReadPdo($pdo){ + public static function setReadPdo($pdo) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::setReadPdo($pdo); } @@ -3186,7 +3451,8 @@ namespace { * @return $this * @static */ - public static function setReconnector($reconnector){ + public static function setReconnector($reconnector) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::setReconnector($reconnector); } @@ -3197,7 +3463,8 @@ namespace { * @return string|null * @static */ - public static function getName(){ + public static function getName() + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::getName(); } @@ -3209,7 +3476,8 @@ namespace { * @return mixed * @static */ - public static function getConfig($option){ + public static function getConfig($option) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::getConfig($option); } @@ -3220,7 +3488,8 @@ namespace { * @return string * @static */ - public static function getDriverName(){ + public static function getDriverName() + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::getDriverName(); } @@ -3231,7 +3500,8 @@ namespace { * @return \Illuminate\Database\Query\Grammars\Grammar * @static */ - public static function getQueryGrammar(){ + public static function getQueryGrammar() + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::getQueryGrammar(); } @@ -3243,7 +3513,8 @@ namespace { * @return void * @static */ - public static function setQueryGrammar($grammar){ + public static function setQueryGrammar($grammar) + { //Method inherited from \Illuminate\Database\Connection \Illuminate\Database\MySqlConnection::setQueryGrammar($grammar); } @@ -3254,7 +3525,8 @@ namespace { * @return \Illuminate\Database\Schema\Grammars\Grammar * @static */ - public static function getSchemaGrammar(){ + public static function getSchemaGrammar() + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::getSchemaGrammar(); } @@ -3266,7 +3538,8 @@ namespace { * @return void * @static */ - public static function setSchemaGrammar($grammar){ + public static function setSchemaGrammar($grammar) + { //Method inherited from \Illuminate\Database\Connection \Illuminate\Database\MySqlConnection::setSchemaGrammar($grammar); } @@ -3277,7 +3550,8 @@ namespace { * @return \Illuminate\Database\Query\Processors\Processor * @static */ - public static function getPostProcessor(){ + public static function getPostProcessor() + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::getPostProcessor(); } @@ -3289,7 +3563,8 @@ namespace { * @return void * @static */ - public static function setPostProcessor($processor){ + public static function setPostProcessor($processor) + { //Method inherited from \Illuminate\Database\Connection \Illuminate\Database\MySqlConnection::setPostProcessor($processor); } @@ -3300,7 +3575,8 @@ namespace { * @return \Illuminate\Contracts\Events\Dispatcher * @static */ - public static function getEventDispatcher(){ + public static function getEventDispatcher() + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::getEventDispatcher(); } @@ -3312,7 +3588,8 @@ namespace { * @return void * @static */ - public static function setEventDispatcher($events){ + public static function setEventDispatcher($events) + { //Method inherited from \Illuminate\Database\Connection \Illuminate\Database\MySqlConnection::setEventDispatcher($events); } @@ -3323,7 +3600,8 @@ namespace { * @return bool * @static */ - public static function pretending(){ + public static function pretending() + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::pretending(); } @@ -3334,7 +3612,8 @@ namespace { * @return array * @static */ - public static function getQueryLog(){ + public static function getQueryLog() + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::getQueryLog(); } @@ -3345,7 +3624,8 @@ namespace { * @return void * @static */ - public static function flushQueryLog(){ + public static function flushQueryLog() + { //Method inherited from \Illuminate\Database\Connection \Illuminate\Database\MySqlConnection::flushQueryLog(); } @@ -3356,7 +3636,8 @@ namespace { * @return void * @static */ - public static function enableQueryLog(){ + public static function enableQueryLog() + { //Method inherited from \Illuminate\Database\Connection \Illuminate\Database\MySqlConnection::enableQueryLog(); } @@ -3367,7 +3648,8 @@ namespace { * @return void * @static */ - public static function disableQueryLog(){ + public static function disableQueryLog() + { //Method inherited from \Illuminate\Database\Connection \Illuminate\Database\MySqlConnection::disableQueryLog(); } @@ -3378,7 +3660,8 @@ namespace { * @return bool * @static */ - public static function logging(){ + public static function logging() + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::logging(); } @@ -3389,7 +3672,8 @@ namespace { * @return string * @static */ - public static function getDatabaseName(){ + public static function getDatabaseName() + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::getDatabaseName(); } @@ -3401,7 +3685,8 @@ namespace { * @return string * @static */ - public static function setDatabaseName($database){ + public static function setDatabaseName($database) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::setDatabaseName($database); } @@ -3412,7 +3697,8 @@ namespace { * @return string * @static */ - public static function getTablePrefix(){ + public static function getTablePrefix() + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::getTablePrefix(); } @@ -3424,7 +3710,8 @@ namespace { * @return void * @static */ - public static function setTablePrefix($prefix){ + public static function setTablePrefix($prefix) + { //Method inherited from \Illuminate\Database\Connection \Illuminate\Database\MySqlConnection::setTablePrefix($prefix); } @@ -3436,7 +3723,8 @@ namespace { * @return \Illuminate\Database\Grammar * @static */ - public static function withTablePrefix($grammar){ + public static function withTablePrefix($grammar) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::withTablePrefix($grammar); } @@ -3449,7 +3737,8 @@ namespace { * @return void * @static */ - public static function resolverFor($driver, $callback){ + public static function resolverFor($driver, $callback) + { //Method inherited from \Illuminate\Database\Connection \Illuminate\Database\MySqlConnection::resolverFor($driver, $callback); } @@ -3461,7 +3750,8 @@ namespace { * @return mixed * @static */ - public static function getResolver($driver){ + public static function getResolver($driver) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::getResolver($driver); } @@ -3475,7 +3765,8 @@ namespace { * @throws \Exception|\Throwable * @static */ - public static function transaction($callback, $attempts = 1){ + public static function transaction($callback, $attempts = 1) + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::transaction($callback, $attempts); } @@ -3487,7 +3778,8 @@ namespace { * @throws \Exception * @static */ - public static function beginTransaction(){ + public static function beginTransaction() + { //Method inherited from \Illuminate\Database\Connection \Illuminate\Database\MySqlConnection::beginTransaction(); } @@ -3498,7 +3790,8 @@ namespace { * @return void * @static */ - public static function commit(){ + public static function commit() + { //Method inherited from \Illuminate\Database\Connection \Illuminate\Database\MySqlConnection::commit(); } @@ -3510,7 +3803,8 @@ namespace { * @return void * @static */ - public static function rollBack($toLevel = null){ + public static function rollBack($toLevel = null) + { //Method inherited from \Illuminate\Database\Connection \Illuminate\Database\MySqlConnection::rollBack($toLevel); } @@ -3521,16 +3815,16 @@ namespace { * @return int * @static */ - public static function transactionLevel(){ + public static function transactionLevel() + { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\MySqlConnection::transactionLevel(); } - } - class Eloquent extends \Illuminate\Database\Eloquent\Model{ - + class Eloquent extends \Illuminate\Database\Eloquent\Model + { /** * Register a new global scope. * @@ -3539,7 +3833,8 @@ namespace { * @return $this * @static */ - public static function withGlobalScope($identifier, $scope){ + public static function withGlobalScope($identifier, $scope) + { return \Illuminate\Database\Eloquent\Builder::withGlobalScope($identifier, $scope); } @@ -3550,7 +3845,8 @@ namespace { * @return $this * @static */ - public static function withoutGlobalScope($scope){ + public static function withoutGlobalScope($scope) + { return \Illuminate\Database\Eloquent\Builder::withoutGlobalScope($scope); } @@ -3561,7 +3857,8 @@ namespace { * @return $this * @static */ - public static function withoutGlobalScopes($scopes = null){ + public static function withoutGlobalScopes($scopes = null) + { return \Illuminate\Database\Eloquent\Builder::withoutGlobalScopes($scopes); } @@ -3571,7 +3868,8 @@ namespace { * @return array * @static */ - public static function removedScopes(){ + public static function removedScopes() + { return \Illuminate\Database\Eloquent\Builder::removedScopes(); } @@ -3584,7 +3882,8 @@ namespace { * @return $this * @static */ - public static function when($value, $callback, $default = null){ + public static function when($value, $callback, $default = null) + { return \Illuminate\Database\Eloquent\Builder::when($value, $callback, $default); } @@ -3595,7 +3894,8 @@ namespace { * @return $this * @static */ - public static function whereKey($id){ + public static function whereKey($id) + { return \Illuminate\Database\Eloquent\Builder::whereKey($id); } @@ -3609,7 +3909,8 @@ namespace { * @return $this * @static */ - public static function where($column, $operator = null, $value = null, $boolean = 'and'){ + public static function where($column, $operator = null, $value = null, $boolean = 'and') + { return \Illuminate\Database\Eloquent\Builder::where($column, $operator, $value, $boolean); } @@ -3622,7 +3923,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Builder|static * @static */ - public static function orWhere($column, $operator = null, $value = null){ + public static function orWhere($column, $operator = null, $value = null) + { return \Illuminate\Database\Eloquent\Builder::orWhere($column, $operator, $value); } @@ -3633,7 +3935,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Collection * @static */ - public static function hydrate($items){ + public static function hydrate($items) + { return \Illuminate\Database\Eloquent\Builder::hydrate($items); } @@ -3645,7 +3948,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Collection * @static */ - public static function fromQuery($query, $bindings = array()){ + public static function fromQuery($query, $bindings = []) + { return \Illuminate\Database\Eloquent\Builder::fromQuery($query, $bindings); } @@ -3657,7 +3961,8 @@ namespace { * @return mixed * @static */ - public static function find($id, $columns = array()){ + public static function find($id, $columns = []) + { return \Illuminate\Database\Eloquent\Builder::find($id, $columns); } @@ -3669,7 +3974,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Collection * @static */ - public static function findMany($ids, $columns = array()){ + public static function findMany($ids, $columns = []) + { return \Illuminate\Database\Eloquent\Builder::findMany($ids, $columns); } @@ -3682,7 +3988,8 @@ namespace { * @throws \Illuminate\Database\Eloquent\ModelNotFoundException * @static */ - public static function findOrFail($id, $columns = array()){ + public static function findOrFail($id, $columns = []) + { return \Illuminate\Database\Eloquent\Builder::findOrFail($id, $columns); } @@ -3694,7 +4001,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Model * @static */ - public static function findOrNew($id, $columns = array()){ + public static function findOrNew($id, $columns = []) + { return \Illuminate\Database\Eloquent\Builder::findOrNew($id, $columns); } @@ -3706,7 +4014,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Model * @static */ - public static function firstOrNew($attributes, $values = array()){ + public static function firstOrNew($attributes, $values = []) + { return \Illuminate\Database\Eloquent\Builder::firstOrNew($attributes, $values); } @@ -3718,7 +4027,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Model * @static */ - public static function firstOrCreate($attributes, $values = array()){ + public static function firstOrCreate($attributes, $values = []) + { return \Illuminate\Database\Eloquent\Builder::firstOrCreate($attributes, $values); } @@ -3730,7 +4040,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Model * @static */ - public static function updateOrCreate($attributes, $values = array()){ + public static function updateOrCreate($attributes, $values = []) + { return \Illuminate\Database\Eloquent\Builder::updateOrCreate($attributes, $values); } @@ -3741,7 +4052,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Model|static|null * @static */ - public static function first($columns = array()){ + public static function first($columns = []) + { return \Illuminate\Database\Eloquent\Builder::first($columns); } @@ -3753,7 +4065,8 @@ namespace { * @throws \Illuminate\Database\Eloquent\ModelNotFoundException * @static */ - public static function firstOrFail($columns = array()){ + public static function firstOrFail($columns = []) + { return \Illuminate\Database\Eloquent\Builder::firstOrFail($columns); } @@ -3765,7 +4078,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Model|static|mixed * @static */ - public static function firstOr($columns = array(), $callback = null){ + public static function firstOr($columns = [], $callback = null) + { return \Illuminate\Database\Eloquent\Builder::firstOr($columns, $callback); } @@ -3776,7 +4090,8 @@ namespace { * @return mixed * @static */ - public static function value($column){ + public static function value($column) + { return \Illuminate\Database\Eloquent\Builder::value($column); } @@ -3787,7 +4102,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Collection|static[] * @static */ - public static function get($columns = array()){ + public static function get($columns = []) + { return \Illuminate\Database\Eloquent\Builder::get($columns); } @@ -3798,7 +4114,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Model[] * @static */ - public static function getModels($columns = array()){ + public static function getModels($columns = []) + { return \Illuminate\Database\Eloquent\Builder::getModels($columns); } @@ -3809,7 +4126,8 @@ namespace { * @return array * @static */ - public static function eagerLoadRelations($models){ + public static function eagerLoadRelations($models) + { return \Illuminate\Database\Eloquent\Builder::eagerLoadRelations($models); } @@ -3819,7 +4137,8 @@ namespace { * @return \Generator * @static */ - public static function cursor(){ + public static function cursor() + { return \Illuminate\Database\Eloquent\Builder::cursor(); } @@ -3831,7 +4150,8 @@ namespace { * @return bool * @static */ - public static function chunk($count, $callback){ + public static function chunk($count, $callback) + { return \Illuminate\Database\Eloquent\Builder::chunk($count, $callback); } @@ -3845,7 +4165,8 @@ namespace { * @return bool * @static */ - public static function chunkById($count, $callback, $column = null, $alias = null){ + public static function chunkById($count, $callback, $column = null, $alias = null) + { return \Illuminate\Database\Eloquent\Builder::chunkById($count, $callback, $column, $alias); } @@ -3857,7 +4178,8 @@ namespace { * @return bool * @static */ - public static function each($callback, $count = 1000){ + public static function each($callback, $count = 1000) + { return \Illuminate\Database\Eloquent\Builder::each($callback, $count); } @@ -3869,7 +4191,8 @@ namespace { * @return \Illuminate\Support\Collection * @static */ - public static function pluck($column, $key = null){ + public static function pluck($column, $key = null) + { return \Illuminate\Database\Eloquent\Builder::pluck($column, $key); } @@ -3884,7 +4207,8 @@ namespace { * @throws \InvalidArgumentException * @static */ - public static function paginate($perPage = null, $columns = array(), $pageName = 'page', $page = null){ + public static function paginate($perPage = null, $columns = [], $pageName = 'page', $page = null) + { return \Illuminate\Database\Eloquent\Builder::paginate($perPage, $columns, $pageName, $page); } @@ -3898,7 +4222,8 @@ namespace { * @return \Illuminate\Contracts\Pagination\Paginator * @static */ - public static function simplePaginate($perPage = null, $columns = array(), $pageName = 'page', $page = null){ + public static function simplePaginate($perPage = null, $columns = [], $pageName = 'page', $page = null) + { return \Illuminate\Database\Eloquent\Builder::simplePaginate($perPage, $columns, $pageName, $page); } @@ -3909,7 +4234,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Model * @static */ - public static function create($attributes = array()){ + public static function create($attributes = []) + { return \Illuminate\Database\Eloquent\Builder::create($attributes); } @@ -3920,7 +4246,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Model * @static */ - public static function forceCreate($attributes){ + public static function forceCreate($attributes) + { return \Illuminate\Database\Eloquent\Builder::forceCreate($attributes); } @@ -3931,7 +4258,8 @@ namespace { * @return void * @static */ - public static function onDelete($callback){ + public static function onDelete($callback) + { \Illuminate\Database\Eloquent\Builder::onDelete($callback); } @@ -3942,7 +4270,8 @@ namespace { * @return mixed * @static */ - public static function scopes($scopes){ + public static function scopes($scopes) + { return \Illuminate\Database\Eloquent\Builder::scopes($scopes); } @@ -3952,7 +4281,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Builder|static * @static */ - public static function applyScopes(){ + public static function applyScopes() + { return \Illuminate\Database\Eloquent\Builder::applyScopes(); } @@ -3963,7 +4293,8 @@ namespace { * @return $this * @static */ - public static function without($relations){ + public static function without($relations) + { return \Illuminate\Database\Eloquent\Builder::without($relations); } @@ -3973,7 +4304,8 @@ namespace { * @return \Illuminate\Database\Query\Builder * @static */ - public static function getQuery(){ + public static function getQuery() + { return \Illuminate\Database\Eloquent\Builder::getQuery(); } @@ -3984,7 +4316,8 @@ namespace { * @return $this * @static */ - public static function setQuery($query){ + public static function setQuery($query) + { return \Illuminate\Database\Eloquent\Builder::setQuery($query); } @@ -3994,7 +4327,8 @@ namespace { * @return \Illuminate\Database\Query\Builder * @static */ - public static function toBase(){ + public static function toBase() + { return \Illuminate\Database\Eloquent\Builder::toBase(); } @@ -4004,7 +4338,8 @@ namespace { * @return array * @static */ - public static function getEagerLoads(){ + public static function getEagerLoads() + { return \Illuminate\Database\Eloquent\Builder::getEagerLoads(); } @@ -4015,7 +4350,8 @@ namespace { * @return $this * @static */ - public static function setEagerLoads($eagerLoad){ + public static function setEagerLoads($eagerLoad) + { return \Illuminate\Database\Eloquent\Builder::setEagerLoads($eagerLoad); } @@ -4025,7 +4361,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Model * @static */ - public static function getModel(){ + public static function getModel() + { return \Illuminate\Database\Eloquent\Builder::getModel(); } @@ -4036,7 +4373,8 @@ namespace { * @return $this * @static */ - public static function setModel($model){ + public static function setModel($model) + { return \Illuminate\Database\Eloquent\Builder::setModel($model); } @@ -4048,7 +4386,8 @@ namespace { * @return void * @static */ - public static function macro($name, $callback){ + public static function macro($name, $callback) + { \Illuminate\Database\Eloquent\Builder::macro($name, $callback); } @@ -4059,7 +4398,8 @@ namespace { * @return \Closure * @static */ - public static function getMacro($name){ + public static function getMacro($name) + { return \Illuminate\Database\Eloquent\Builder::getMacro($name); } @@ -4074,7 +4414,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Builder|static * @static */ - public static function has($relation, $operator = '>=', $count = 1, $boolean = 'and', $callback = null){ + public static function has($relation, $operator = '>=', $count = 1, $boolean = 'and', $callback = null) + { return \Illuminate\Database\Eloquent\Builder::has($relation, $operator, $count, $boolean, $callback); } @@ -4087,7 +4428,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Builder|static * @static */ - public static function orHas($relation, $operator = '>=', $count = 1){ + public static function orHas($relation, $operator = '>=', $count = 1) + { return \Illuminate\Database\Eloquent\Builder::orHas($relation, $operator, $count); } @@ -4100,7 +4442,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Builder|static * @static */ - public static function doesntHave($relation, $boolean = 'and', $callback = null){ + public static function doesntHave($relation, $boolean = 'and', $callback = null) + { return \Illuminate\Database\Eloquent\Builder::doesntHave($relation, $boolean, $callback); } @@ -4114,7 +4457,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Builder|static * @static */ - public static function whereHas($relation, $callback = null, $operator = '>=', $count = 1){ + public static function whereHas($relation, $callback = null, $operator = '>=', $count = 1) + { return \Illuminate\Database\Eloquent\Builder::whereHas($relation, $callback, $operator, $count); } @@ -4128,7 +4472,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Builder|static * @static */ - public static function orWhereHas($relation, $callback, $operator = '>=', $count = 1){ + public static function orWhereHas($relation, $callback, $operator = '>=', $count = 1) + { return \Illuminate\Database\Eloquent\Builder::orWhereHas($relation, $callback, $operator, $count); } @@ -4140,7 +4485,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Builder|static * @static */ - public static function whereDoesntHave($relation, $callback = null){ + public static function whereDoesntHave($relation, $callback = null) + { return \Illuminate\Database\Eloquent\Builder::whereDoesntHave($relation, $callback); } @@ -4151,7 +4497,8 @@ namespace { * @return $this * @static */ - public static function withCount($relations){ + public static function withCount($relations) + { return \Illuminate\Database\Eloquent\Builder::withCount($relations); } @@ -4162,7 +4509,8 @@ namespace { * @return \Illuminate\Database\Eloquent\Builder|static * @static */ - public static function mergeConstraintsFrom($from){ + public static function mergeConstraintsFrom($from) + { return \Illuminate\Database\Eloquent\Builder::mergeConstraintsFrom($from); } @@ -4173,7 +4521,8 @@ namespace { * @return $this * @static */ - public static function select($columns = array()){ + public static function select($columns = []) + { return \Illuminate\Database\Query\Builder::select($columns); } @@ -4185,7 +4534,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function selectRaw($expression, $bindings = array()){ + public static function selectRaw($expression, $bindings = []) + { return \Illuminate\Database\Query\Builder::selectRaw($expression, $bindings); } @@ -4198,7 +4548,8 @@ namespace { * @throws \InvalidArgumentException * @static */ - public static function selectSub($query, $as){ + public static function selectSub($query, $as) + { return \Illuminate\Database\Query\Builder::selectSub($query, $as); } @@ -4209,7 +4560,8 @@ namespace { * @return $this * @static */ - public static function addSelect($column){ + public static function addSelect($column) + { return \Illuminate\Database\Query\Builder::addSelect($column); } @@ -4219,7 +4571,8 @@ namespace { * @return $this * @static */ - public static function distinct(){ + public static function distinct() + { return \Illuminate\Database\Query\Builder::distinct(); } @@ -4230,7 +4583,8 @@ namespace { * @return $this * @static */ - public static function from($table){ + public static function from($table) + { return \Illuminate\Database\Query\Builder::from($table); } @@ -4246,7 +4600,8 @@ namespace { * @return $this * @static */ - public static function join($table, $first, $operator = null, $second = null, $type = 'inner', $where = false){ + public static function join($table, $first, $operator = null, $second = null, $type = 'inner', $where = false) + { return \Illuminate\Database\Query\Builder::join($table, $first, $operator, $second, $type, $where); } @@ -4261,7 +4616,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function joinWhere($table, $first, $operator, $second, $type = 'inner'){ + public static function joinWhere($table, $first, $operator, $second, $type = 'inner') + { return \Illuminate\Database\Query\Builder::joinWhere($table, $first, $operator, $second, $type); } @@ -4275,7 +4631,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function leftJoin($table, $first, $operator = null, $second = null){ + public static function leftJoin($table, $first, $operator = null, $second = null) + { return \Illuminate\Database\Query\Builder::leftJoin($table, $first, $operator, $second); } @@ -4289,7 +4646,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function leftJoinWhere($table, $first, $operator, $second){ + public static function leftJoinWhere($table, $first, $operator, $second) + { return \Illuminate\Database\Query\Builder::leftJoinWhere($table, $first, $operator, $second); } @@ -4303,7 +4661,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function rightJoin($table, $first, $operator = null, $second = null){ + public static function rightJoin($table, $first, $operator = null, $second = null) + { return \Illuminate\Database\Query\Builder::rightJoin($table, $first, $operator, $second); } @@ -4317,7 +4676,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function rightJoinWhere($table, $first, $operator, $second){ + public static function rightJoinWhere($table, $first, $operator, $second) + { return \Illuminate\Database\Query\Builder::rightJoinWhere($table, $first, $operator, $second); } @@ -4331,7 +4691,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function crossJoin($table, $first = null, $operator = null, $second = null){ + public static function crossJoin($table, $first = null, $operator = null, $second = null) + { return \Illuminate\Database\Query\Builder::crossJoin($table, $first, $operator, $second); } @@ -4343,7 +4704,8 @@ namespace { * @return void * @static */ - public static function mergeWheres($wheres, $bindings){ + public static function mergeWheres($wheres, $bindings) + { \Illuminate\Database\Query\Builder::mergeWheres($wheres, $bindings); } @@ -4357,7 +4719,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function whereColumn($first, $operator = null, $second = null, $boolean = 'and'){ + public static function whereColumn($first, $operator = null, $second = null, $boolean = 'and') + { return \Illuminate\Database\Query\Builder::whereColumn($first, $operator, $second, $boolean); } @@ -4370,7 +4733,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function orWhereColumn($first, $operator = null, $second = null){ + public static function orWhereColumn($first, $operator = null, $second = null) + { return \Illuminate\Database\Query\Builder::orWhereColumn($first, $operator, $second); } @@ -4383,7 +4747,8 @@ namespace { * @return $this * @static */ - public static function whereRaw($sql, $bindings = array(), $boolean = 'and'){ + public static function whereRaw($sql, $bindings = [], $boolean = 'and') + { return \Illuminate\Database\Query\Builder::whereRaw($sql, $bindings, $boolean); } @@ -4395,7 +4760,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function orWhereRaw($sql, $bindings = array()){ + public static function orWhereRaw($sql, $bindings = []) + { return \Illuminate\Database\Query\Builder::orWhereRaw($sql, $bindings); } @@ -4409,7 +4775,8 @@ namespace { * @return $this * @static */ - public static function whereIn($column, $values, $boolean = 'and', $not = false){ + public static function whereIn($column, $values, $boolean = 'and', $not = false) + { return \Illuminate\Database\Query\Builder::whereIn($column, $values, $boolean, $not); } @@ -4421,7 +4788,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function orWhereIn($column, $values){ + public static function orWhereIn($column, $values) + { return \Illuminate\Database\Query\Builder::orWhereIn($column, $values); } @@ -4434,7 +4802,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function whereNotIn($column, $values, $boolean = 'and'){ + public static function whereNotIn($column, $values, $boolean = 'and') + { return \Illuminate\Database\Query\Builder::whereNotIn($column, $values, $boolean); } @@ -4446,7 +4815,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function orWhereNotIn($column, $values){ + public static function orWhereNotIn($column, $values) + { return \Illuminate\Database\Query\Builder::orWhereNotIn($column, $values); } @@ -4459,7 +4829,8 @@ namespace { * @return $this * @static */ - public static function whereNull($column, $boolean = 'and', $not = false){ + public static function whereNull($column, $boolean = 'and', $not = false) + { return \Illuminate\Database\Query\Builder::whereNull($column, $boolean, $not); } @@ -4470,7 +4841,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function orWhereNull($column){ + public static function orWhereNull($column) + { return \Illuminate\Database\Query\Builder::orWhereNull($column); } @@ -4482,7 +4854,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function whereNotNull($column, $boolean = 'and'){ + public static function whereNotNull($column, $boolean = 'and') + { return \Illuminate\Database\Query\Builder::whereNotNull($column, $boolean); } @@ -4496,7 +4869,8 @@ namespace { * @return $this * @static */ - public static function whereBetween($column, $values, $boolean = 'and', $not = false){ + public static function whereBetween($column, $values, $boolean = 'and', $not = false) + { return \Illuminate\Database\Query\Builder::whereBetween($column, $values, $boolean, $not); } @@ -4508,7 +4882,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function orWhereBetween($column, $values){ + public static function orWhereBetween($column, $values) + { return \Illuminate\Database\Query\Builder::orWhereBetween($column, $values); } @@ -4521,7 +4896,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function whereNotBetween($column, $values, $boolean = 'and'){ + public static function whereNotBetween($column, $values, $boolean = 'and') + { return \Illuminate\Database\Query\Builder::whereNotBetween($column, $values, $boolean); } @@ -4533,7 +4909,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function orWhereNotBetween($column, $values){ + public static function orWhereNotBetween($column, $values) + { return \Illuminate\Database\Query\Builder::orWhereNotBetween($column, $values); } @@ -4544,7 +4921,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function orWhereNotNull($column){ + public static function orWhereNotNull($column) + { return \Illuminate\Database\Query\Builder::orWhereNotNull($column); } @@ -4558,7 +4936,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function whereDate($column, $operator, $value = null, $boolean = 'and'){ + public static function whereDate($column, $operator, $value = null, $boolean = 'and') + { return \Illuminate\Database\Query\Builder::whereDate($column, $operator, $value, $boolean); } @@ -4571,7 +4950,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function orWhereDate($column, $operator, $value){ + public static function orWhereDate($column, $operator, $value) + { return \Illuminate\Database\Query\Builder::orWhereDate($column, $operator, $value); } @@ -4585,7 +4965,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function whereTime($column, $operator, $value, $boolean = 'and'){ + public static function whereTime($column, $operator, $value, $boolean = 'and') + { return \Illuminate\Database\Query\Builder::whereTime($column, $operator, $value, $boolean); } @@ -4598,7 +4979,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function orWhereTime($column, $operator, $value){ + public static function orWhereTime($column, $operator, $value) + { return \Illuminate\Database\Query\Builder::orWhereTime($column, $operator, $value); } @@ -4612,7 +4994,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function whereDay($column, $operator, $value = null, $boolean = 'and'){ + public static function whereDay($column, $operator, $value = null, $boolean = 'and') + { return \Illuminate\Database\Query\Builder::whereDay($column, $operator, $value, $boolean); } @@ -4626,7 +5009,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function whereMonth($column, $operator, $value = null, $boolean = 'and'){ + public static function whereMonth($column, $operator, $value = null, $boolean = 'and') + { return \Illuminate\Database\Query\Builder::whereMonth($column, $operator, $value, $boolean); } @@ -4640,7 +5024,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function whereYear($column, $operator, $value = null, $boolean = 'and'){ + public static function whereYear($column, $operator, $value = null, $boolean = 'and') + { return \Illuminate\Database\Query\Builder::whereYear($column, $operator, $value, $boolean); } @@ -4652,7 +5037,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function whereNested($callback, $boolean = 'and'){ + public static function whereNested($callback, $boolean = 'and') + { return \Illuminate\Database\Query\Builder::whereNested($callback, $boolean); } @@ -4662,7 +5048,8 @@ namespace { * @return \Illuminate\Database\Query\Builder * @static */ - public static function forNestedWhere(){ + public static function forNestedWhere() + { return \Illuminate\Database\Query\Builder::forNestedWhere(); } @@ -4674,7 +5061,8 @@ namespace { * @return $this * @static */ - public static function addNestedWhereQuery($query, $boolean = 'and'){ + public static function addNestedWhereQuery($query, $boolean = 'and') + { return \Illuminate\Database\Query\Builder::addNestedWhereQuery($query, $boolean); } @@ -4687,7 +5075,8 @@ namespace { * @return $this * @static */ - public static function whereExists($callback, $boolean = 'and', $not = false){ + public static function whereExists($callback, $boolean = 'and', $not = false) + { return \Illuminate\Database\Query\Builder::whereExists($callback, $boolean, $not); } @@ -4699,7 +5088,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function orWhereExists($callback, $not = false){ + public static function orWhereExists($callback, $not = false) + { return \Illuminate\Database\Query\Builder::orWhereExists($callback, $not); } @@ -4711,7 +5101,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function whereNotExists($callback, $boolean = 'and'){ + public static function whereNotExists($callback, $boolean = 'and') + { return \Illuminate\Database\Query\Builder::whereNotExists($callback, $boolean); } @@ -4722,7 +5113,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function orWhereNotExists($callback){ + public static function orWhereNotExists($callback) + { return \Illuminate\Database\Query\Builder::orWhereNotExists($callback); } @@ -4735,7 +5127,8 @@ namespace { * @return $this * @static */ - public static function addWhereExistsQuery($query, $boolean = 'and', $not = false){ + public static function addWhereExistsQuery($query, $boolean = 'and', $not = false) + { return \Illuminate\Database\Query\Builder::addWhereExistsQuery($query, $boolean, $not); } @@ -4747,7 +5140,8 @@ namespace { * @return $this * @static */ - public static function dynamicWhere($method, $parameters){ + public static function dynamicWhere($method, $parameters) + { return \Illuminate\Database\Query\Builder::dynamicWhere($method, $parameters); } @@ -4758,7 +5152,8 @@ namespace { * @return $this * @static */ - public static function groupBy($groups = null){ + public static function groupBy($groups = null) + { return \Illuminate\Database\Query\Builder::groupBy($groups); } @@ -4772,7 +5167,8 @@ namespace { * @return $this * @static */ - public static function having($column, $operator = null, $value = null, $boolean = 'and'){ + public static function having($column, $operator = null, $value = null, $boolean = 'and') + { return \Illuminate\Database\Query\Builder::having($column, $operator, $value, $boolean); } @@ -4785,7 +5181,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function orHaving($column, $operator = null, $value = null){ + public static function orHaving($column, $operator = null, $value = null) + { return \Illuminate\Database\Query\Builder::orHaving($column, $operator, $value); } @@ -4798,7 +5195,8 @@ namespace { * @return $this * @static */ - public static function havingRaw($sql, $bindings = array(), $boolean = 'and'){ + public static function havingRaw($sql, $bindings = [], $boolean = 'and') + { return \Illuminate\Database\Query\Builder::havingRaw($sql, $bindings, $boolean); } @@ -4810,7 +5208,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function orHavingRaw($sql, $bindings = array()){ + public static function orHavingRaw($sql, $bindings = []) + { return \Illuminate\Database\Query\Builder::orHavingRaw($sql, $bindings); } @@ -4822,7 +5221,8 @@ namespace { * @return $this * @static */ - public static function orderBy($column, $direction = 'asc'){ + public static function orderBy($column, $direction = 'asc') + { return \Illuminate\Database\Query\Builder::orderBy($column, $direction); } @@ -4833,7 +5233,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function latest($column = 'created_at'){ + public static function latest($column = 'created_at') + { return \Illuminate\Database\Query\Builder::latest($column); } @@ -4844,7 +5245,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function oldest($column = 'created_at'){ + public static function oldest($column = 'created_at') + { return \Illuminate\Database\Query\Builder::oldest($column); } @@ -4855,7 +5257,8 @@ namespace { * @return $this * @static */ - public static function inRandomOrder($seed = ''){ + public static function inRandomOrder($seed = '') + { return \Illuminate\Database\Query\Builder::inRandomOrder($seed); } @@ -4867,7 +5270,8 @@ namespace { * @return $this * @static */ - public static function orderByRaw($sql, $bindings = array()){ + public static function orderByRaw($sql, $bindings = []) + { return \Illuminate\Database\Query\Builder::orderByRaw($sql, $bindings); } @@ -4878,7 +5282,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function skip($value){ + public static function skip($value) + { return \Illuminate\Database\Query\Builder::skip($value); } @@ -4889,7 +5294,8 @@ namespace { * @return $this * @static */ - public static function offset($value){ + public static function offset($value) + { return \Illuminate\Database\Query\Builder::offset($value); } @@ -4900,7 +5306,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function take($value){ + public static function take($value) + { return \Illuminate\Database\Query\Builder::take($value); } @@ -4911,7 +5318,8 @@ namespace { * @return $this * @static */ - public static function limit($value){ + public static function limit($value) + { return \Illuminate\Database\Query\Builder::limit($value); } @@ -4923,7 +5331,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function forPage($page, $perPage = 15){ + public static function forPage($page, $perPage = 15) + { return \Illuminate\Database\Query\Builder::forPage($page, $perPage); } @@ -4936,7 +5345,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function forPageAfterId($perPage = 15, $lastId = 0, $column = 'id'){ + public static function forPageAfterId($perPage = 15, $lastId = 0, $column = 'id') + { return \Illuminate\Database\Query\Builder::forPageAfterId($perPage, $lastId, $column); } @@ -4948,7 +5358,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function union($query, $all = false){ + public static function union($query, $all = false) + { return \Illuminate\Database\Query\Builder::union($query, $all); } @@ -4959,7 +5370,8 @@ namespace { * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function unionAll($query){ + public static function unionAll($query) + { return \Illuminate\Database\Query\Builder::unionAll($query); } @@ -4970,7 +5382,8 @@ namespace { * @return $this * @static */ - public static function lock($value = true){ + public static function lock($value = true) + { return \Illuminate\Database\Query\Builder::lock($value); } @@ -4980,7 +5393,8 @@ namespace { * @return \Illuminate\Database\Query\Builder * @static */ - public static function lockForUpdate(){ + public static function lockForUpdate() + { return \Illuminate\Database\Query\Builder::lockForUpdate(); } @@ -4990,7 +5404,8 @@ namespace { * @return \Illuminate\Database\Query\Builder * @static */ - public static function sharedLock(){ + public static function sharedLock() + { return \Illuminate\Database\Query\Builder::sharedLock(); } @@ -5000,7 +5415,8 @@ namespace { * @return string * @static */ - public static function toSql(){ + public static function toSql() + { return \Illuminate\Database\Query\Builder::toSql(); } @@ -5011,7 +5427,8 @@ namespace { * @return int * @static */ - public static function getCountForPagination($columns = array()){ + public static function getCountForPagination($columns = []) + { return \Illuminate\Database\Query\Builder::getCountForPagination($columns); } @@ -5023,7 +5440,8 @@ namespace { * @return string * @static */ - public static function implode($column, $glue = ''){ + public static function implode($column, $glue = '') + { return \Illuminate\Database\Query\Builder::implode($column, $glue); } @@ -5033,7 +5451,8 @@ namespace { * @return bool * @static */ - public static function exists(){ + public static function exists() + { return \Illuminate\Database\Query\Builder::exists(); } @@ -5044,7 +5463,8 @@ namespace { * @return int * @static */ - public static function count($columns = '*'){ + public static function count($columns = '*') + { return \Illuminate\Database\Query\Builder::count($columns); } @@ -5055,7 +5475,8 @@ namespace { * @return mixed * @static */ - public static function min($column){ + public static function min($column) + { return \Illuminate\Database\Query\Builder::min($column); } @@ -5066,7 +5487,8 @@ namespace { * @return mixed * @static */ - public static function max($column){ + public static function max($column) + { return \Illuminate\Database\Query\Builder::max($column); } @@ -5077,7 +5499,8 @@ namespace { * @return mixed * @static */ - public static function sum($column){ + public static function sum($column) + { return \Illuminate\Database\Query\Builder::sum($column); } @@ -5088,7 +5511,8 @@ namespace { * @return mixed * @static */ - public static function avg($column){ + public static function avg($column) + { return \Illuminate\Database\Query\Builder::avg($column); } @@ -5099,7 +5523,8 @@ namespace { * @return mixed * @static */ - public static function average($column){ + public static function average($column) + { return \Illuminate\Database\Query\Builder::average($column); } @@ -5111,7 +5536,8 @@ namespace { * @return mixed * @static */ - public static function aggregate($function, $columns = array()){ + public static function aggregate($function, $columns = []) + { return \Illuminate\Database\Query\Builder::aggregate($function, $columns); } @@ -5123,7 +5549,8 @@ namespace { * @return float|int * @static */ - public static function numericAggregate($function, $columns = array()){ + public static function numericAggregate($function, $columns = []) + { return \Illuminate\Database\Query\Builder::numericAggregate($function, $columns); } @@ -5134,7 +5561,8 @@ namespace { * @return bool * @static */ - public static function insert($values){ + public static function insert($values) + { return \Illuminate\Database\Query\Builder::insert($values); } @@ -5146,7 +5574,8 @@ namespace { * @return int * @static */ - public static function insertGetId($values, $sequence = null){ + public static function insertGetId($values, $sequence = null) + { return \Illuminate\Database\Query\Builder::insertGetId($values, $sequence); } @@ -5158,7 +5587,8 @@ namespace { * @return bool * @static */ - public static function updateOrInsert($attributes, $values = array()){ + public static function updateOrInsert($attributes, $values = []) + { return \Illuminate\Database\Query\Builder::updateOrInsert($attributes, $values); } @@ -5168,7 +5598,8 @@ namespace { * @return void * @static */ - public static function truncate(){ + public static function truncate() + { \Illuminate\Database\Query\Builder::truncate(); } @@ -5179,7 +5610,8 @@ namespace { * @return \Illuminate\Database\Query\Expression * @static */ - public static function raw($value){ + public static function raw($value) + { return \Illuminate\Database\Query\Builder::raw($value); } @@ -5189,7 +5621,8 @@ namespace { * @return array * @static */ - public static function getBindings(){ + public static function getBindings() + { return \Illuminate\Database\Query\Builder::getBindings(); } @@ -5199,7 +5632,8 @@ namespace { * @return array * @static */ - public static function getRawBindings(){ + public static function getRawBindings() + { return \Illuminate\Database\Query\Builder::getRawBindings(); } @@ -5212,7 +5646,8 @@ namespace { * @throws \InvalidArgumentException * @static */ - public static function setBindings($bindings, $type = 'where'){ + public static function setBindings($bindings, $type = 'where') + { return \Illuminate\Database\Query\Builder::setBindings($bindings, $type); } @@ -5225,7 +5660,8 @@ namespace { * @throws \InvalidArgumentException * @static */ - public static function addBinding($value, $type = 'where'){ + public static function addBinding($value, $type = 'where') + { return \Illuminate\Database\Query\Builder::addBinding($value, $type); } @@ -5236,7 +5672,8 @@ namespace { * @return $this * @static */ - public static function mergeBindings($query){ + public static function mergeBindings($query) + { return \Illuminate\Database\Query\Builder::mergeBindings($query); } @@ -5246,7 +5683,8 @@ namespace { * @return \Illuminate\Database\Query\Processors\Processor * @static */ - public static function getProcessor(){ + public static function getProcessor() + { return \Illuminate\Database\Query\Builder::getProcessor(); } @@ -5256,7 +5694,8 @@ namespace { * @return \Illuminate\Database\Query\Grammars\Grammar * @static */ - public static function getGrammar(){ + public static function getGrammar() + { return \Illuminate\Database\Query\Builder::getGrammar(); } @@ -5266,7 +5705,8 @@ namespace { * @return $this * @static */ - public static function useWritePdo(){ + public static function useWritePdo() + { return \Illuminate\Database\Query\Builder::useWritePdo(); } @@ -5277,7 +5717,8 @@ namespace { * @return static * @static */ - public static function cloneWithout($except){ + public static function cloneWithout($except) + { return \Illuminate\Database\Query\Builder::cloneWithout($except); } @@ -5288,7 +5729,8 @@ namespace { * @return static * @static */ - public static function cloneWithoutBindings($except){ + public static function cloneWithoutBindings($except) + { return \Illuminate\Database\Query\Builder::cloneWithoutBindings($except); } @@ -5299,7 +5741,8 @@ namespace { * @return bool * @static */ - public static function hasMacro($name){ + public static function hasMacro($name) + { return \Illuminate\Database\Query\Builder::hasMacro($name); } @@ -5312,15 +5755,15 @@ namespace { * @throws \BadMethodCallException * @static */ - public static function macroCall($method, $parameters){ + public static function macroCall($method, $parameters) + { return \Illuminate\Database\Query\Builder::macroCall($method, $parameters); } - } - class Event extends \Illuminate\Support\Facades\Event{ - + class Event extends \Illuminate\Support\Facades\Event + { /** * Register an event listener with the dispatcher. * @@ -5329,7 +5772,8 @@ namespace { * @return void * @static */ - public static function listen($events, $listener){ + public static function listen($events, $listener) + { \Illuminate\Events\Dispatcher::listen($events, $listener); } @@ -5340,7 +5784,8 @@ namespace { * @return bool * @static */ - public static function hasListeners($eventName){ + public static function hasListeners($eventName) + { return \Illuminate\Events\Dispatcher::hasListeners($eventName); } @@ -5352,7 +5797,8 @@ namespace { * @return void * @static */ - public static function push($event, $payload = array()){ + public static function push($event, $payload = []) + { \Illuminate\Events\Dispatcher::push($event, $payload); } @@ -5363,7 +5809,8 @@ namespace { * @return void * @static */ - public static function flush($event){ + public static function flush($event) + { \Illuminate\Events\Dispatcher::flush($event); } @@ -5374,7 +5821,8 @@ namespace { * @return void * @static */ - public static function subscribe($subscriber){ + public static function subscribe($subscriber) + { \Illuminate\Events\Dispatcher::subscribe($subscriber); } @@ -5386,7 +5834,8 @@ namespace { * @return array|null * @static */ - public static function until($event, $payload = array()){ + public static function until($event, $payload = []) + { return \Illuminate\Events\Dispatcher::until($event, $payload); } @@ -5399,7 +5848,8 @@ namespace { * @return array|null * @static */ - public static function fire($event, $payload = array(), $halt = false){ + public static function fire($event, $payload = [], $halt = false) + { return \Illuminate\Events\Dispatcher::fire($event, $payload, $halt); } @@ -5412,7 +5862,8 @@ namespace { * @return array|null * @static */ - public static function dispatch($event, $payload = array(), $halt = false){ + public static function dispatch($event, $payload = [], $halt = false) + { return \Illuminate\Events\Dispatcher::dispatch($event, $payload, $halt); } @@ -5423,7 +5874,8 @@ namespace { * @return array * @static */ - public static function getListeners($eventName){ + public static function getListeners($eventName) + { return \Illuminate\Events\Dispatcher::getListeners($eventName); } @@ -5435,7 +5887,8 @@ namespace { * @return mixed * @static */ - public static function makeListener($listener, $wildcard = false){ + public static function makeListener($listener, $wildcard = false) + { return \Illuminate\Events\Dispatcher::makeListener($listener, $wildcard); } @@ -5447,7 +5900,8 @@ namespace { * @return \Closure * @static */ - public static function createClassListener($listener, $wildcard = false){ + public static function createClassListener($listener, $wildcard = false) + { return \Illuminate\Events\Dispatcher::createClassListener($listener, $wildcard); } @@ -5458,7 +5912,8 @@ namespace { * @return void * @static */ - public static function forget($event){ + public static function forget($event) + { \Illuminate\Events\Dispatcher::forget($event); } @@ -5468,7 +5923,8 @@ namespace { * @return void * @static */ - public static function forgetPushed(){ + public static function forgetPushed() + { \Illuminate\Events\Dispatcher::forgetPushed(); } @@ -5479,15 +5935,15 @@ namespace { * @return $this * @static */ - public static function setQueueResolver($resolver){ + public static function setQueueResolver($resolver) + { return \Illuminate\Events\Dispatcher::setQueueResolver($resolver); } - } - class File extends \Illuminate\Support\Facades\File{ - + class File extends \Illuminate\Support\Facades\File + { /** * Determine if a file or directory exists. * @@ -5495,7 +5951,8 @@ namespace { * @return bool * @static */ - public static function exists($path){ + public static function exists($path) + { return \Illuminate\Filesystem\Filesystem::exists($path); } @@ -5508,7 +5965,8 @@ namespace { * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException * @static */ - public static function get($path, $lock = false){ + public static function get($path, $lock = false) + { return \Illuminate\Filesystem\Filesystem::get($path, $lock); } @@ -5519,7 +5977,8 @@ namespace { * @return string * @static */ - public static function sharedGet($path){ + public static function sharedGet($path) + { return \Illuminate\Filesystem\Filesystem::sharedGet($path); } @@ -5531,7 +5990,8 @@ namespace { * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException * @static */ - public static function getRequire($path){ + public static function getRequire($path) + { return \Illuminate\Filesystem\Filesystem::getRequire($path); } @@ -5542,7 +6002,8 @@ namespace { * @return mixed * @static */ - public static function requireOnce($file){ + public static function requireOnce($file) + { return \Illuminate\Filesystem\Filesystem::requireOnce($file); } @@ -5555,7 +6016,8 @@ namespace { * @return int * @static */ - public static function put($path, $contents, $lock = false){ + public static function put($path, $contents, $lock = false) + { return \Illuminate\Filesystem\Filesystem::put($path, $contents, $lock); } @@ -5567,7 +6029,8 @@ namespace { * @return int * @static */ - public static function prepend($path, $data){ + public static function prepend($path, $data) + { return \Illuminate\Filesystem\Filesystem::prepend($path, $data); } @@ -5579,7 +6042,8 @@ namespace { * @return int * @static */ - public static function append($path, $data){ + public static function append($path, $data) + { return \Illuminate\Filesystem\Filesystem::append($path, $data); } @@ -5591,7 +6055,8 @@ namespace { * @return mixed * @static */ - public static function chmod($path, $mode = null){ + public static function chmod($path, $mode = null) + { return \Illuminate\Filesystem\Filesystem::chmod($path, $mode); } @@ -5602,7 +6067,8 @@ namespace { * @return bool * @static */ - public static function delete($paths){ + public static function delete($paths) + { return \Illuminate\Filesystem\Filesystem::delete($paths); } @@ -5614,7 +6080,8 @@ namespace { * @return bool * @static */ - public static function move($path, $target){ + public static function move($path, $target) + { return \Illuminate\Filesystem\Filesystem::move($path, $target); } @@ -5626,7 +6093,8 @@ namespace { * @return bool * @static */ - public static function copy($path, $target){ + public static function copy($path, $target) + { return \Illuminate\Filesystem\Filesystem::copy($path, $target); } @@ -5638,7 +6106,8 @@ namespace { * @return void * @static */ - public static function link($target, $link){ + public static function link($target, $link) + { \Illuminate\Filesystem\Filesystem::link($target, $link); } @@ -5649,7 +6118,8 @@ namespace { * @return string * @static */ - public static function name($path){ + public static function name($path) + { return \Illuminate\Filesystem\Filesystem::name($path); } @@ -5660,7 +6130,8 @@ namespace { * @return string * @static */ - public static function basename($path){ + public static function basename($path) + { return \Illuminate\Filesystem\Filesystem::basename($path); } @@ -5671,7 +6142,8 @@ namespace { * @return string * @static */ - public static function dirname($path){ + public static function dirname($path) + { return \Illuminate\Filesystem\Filesystem::dirname($path); } @@ -5682,7 +6154,8 @@ namespace { * @return string * @static */ - public static function extension($path){ + public static function extension($path) + { return \Illuminate\Filesystem\Filesystem::extension($path); } @@ -5693,7 +6166,8 @@ namespace { * @return string * @static */ - public static function type($path){ + public static function type($path) + { return \Illuminate\Filesystem\Filesystem::type($path); } @@ -5704,7 +6178,8 @@ namespace { * @return string|false * @static */ - public static function mimeType($path){ + public static function mimeType($path) + { return \Illuminate\Filesystem\Filesystem::mimeType($path); } @@ -5715,7 +6190,8 @@ namespace { * @return int * @static */ - public static function size($path){ + public static function size($path) + { return \Illuminate\Filesystem\Filesystem::size($path); } @@ -5726,7 +6202,8 @@ namespace { * @return int * @static */ - public static function lastModified($path){ + public static function lastModified($path) + { return \Illuminate\Filesystem\Filesystem::lastModified($path); } @@ -5737,7 +6214,8 @@ namespace { * @return bool * @static */ - public static function isDirectory($directory){ + public static function isDirectory($directory) + { return \Illuminate\Filesystem\Filesystem::isDirectory($directory); } @@ -5748,7 +6226,8 @@ namespace { * @return bool * @static */ - public static function isReadable($path){ + public static function isReadable($path) + { return \Illuminate\Filesystem\Filesystem::isReadable($path); } @@ -5759,7 +6238,8 @@ namespace { * @return bool * @static */ - public static function isWritable($path){ + public static function isWritable($path) + { return \Illuminate\Filesystem\Filesystem::isWritable($path); } @@ -5770,7 +6250,8 @@ namespace { * @return bool * @static */ - public static function isFile($file){ + public static function isFile($file) + { return \Illuminate\Filesystem\Filesystem::isFile($file); } @@ -5782,7 +6263,8 @@ namespace { * @return array * @static */ - public static function glob($pattern, $flags = 0){ + public static function glob($pattern, $flags = 0) + { return \Illuminate\Filesystem\Filesystem::glob($pattern, $flags); } @@ -5793,7 +6275,8 @@ namespace { * @return array * @static */ - public static function files($directory){ + public static function files($directory) + { return \Illuminate\Filesystem\Filesystem::files($directory); } @@ -5805,7 +6288,8 @@ namespace { * @return array * @static */ - public static function allFiles($directory, $hidden = false){ + public static function allFiles($directory, $hidden = false) + { return \Illuminate\Filesystem\Filesystem::allFiles($directory, $hidden); } @@ -5816,7 +6300,8 @@ namespace { * @return array * @static */ - public static function directories($directory){ + public static function directories($directory) + { return \Illuminate\Filesystem\Filesystem::directories($directory); } @@ -5830,7 +6315,8 @@ namespace { * @return bool * @static */ - public static function makeDirectory($path, $mode = 493, $recursive = false, $force = false){ + public static function makeDirectory($path, $mode = 493, $recursive = false, $force = false) + { return \Illuminate\Filesystem\Filesystem::makeDirectory($path, $mode, $recursive, $force); } @@ -5843,7 +6329,8 @@ namespace { * @return bool * @static */ - public static function moveDirectory($from, $to, $overwrite = false){ + public static function moveDirectory($from, $to, $overwrite = false) + { return \Illuminate\Filesystem\Filesystem::moveDirectory($from, $to, $overwrite); } @@ -5856,7 +6343,8 @@ namespace { * @return bool * @static */ - public static function copyDirectory($directory, $destination, $options = null){ + public static function copyDirectory($directory, $destination, $options = null) + { return \Illuminate\Filesystem\Filesystem::copyDirectory($directory, $destination, $options); } @@ -5870,7 +6358,8 @@ namespace { * @return bool * @static */ - public static function deleteDirectory($directory, $preserve = false){ + public static function deleteDirectory($directory, $preserve = false) + { return \Illuminate\Filesystem\Filesystem::deleteDirectory($directory, $preserve); } @@ -5881,7 +6370,8 @@ namespace { * @return bool * @static */ - public static function cleanDirectory($directory){ + public static function cleanDirectory($directory) + { return \Illuminate\Filesystem\Filesystem::cleanDirectory($directory); } @@ -5893,7 +6383,8 @@ namespace { * @return void * @static */ - public static function macro($name, $macro){ + public static function macro($name, $macro) + { \Illuminate\Filesystem\Filesystem::macro($name, $macro); } @@ -5904,15 +6395,15 @@ namespace { * @return bool * @static */ - public static function hasMacro($name){ + public static function hasMacro($name) + { return \Illuminate\Filesystem\Filesystem::hasMacro($name); } - } - class Gate extends \Illuminate\Support\Facades\Gate{ - + class Gate extends \Illuminate\Support\Facades\Gate + { /** * Determine if a given ability has been defined. * @@ -5920,7 +6411,8 @@ namespace { * @return bool * @static */ - public static function has($ability){ + public static function has($ability) + { return \Illuminate\Auth\Access\Gate::has($ability); } @@ -5933,7 +6425,8 @@ namespace { * @throws \InvalidArgumentException * @static */ - public static function define($ability, $callback){ + public static function define($ability, $callback) + { return \Illuminate\Auth\Access\Gate::define($ability, $callback); } @@ -5945,7 +6438,8 @@ namespace { * @return $this * @static */ - public static function policy($class, $policy){ + public static function policy($class, $policy) + { return \Illuminate\Auth\Access\Gate::policy($class, $policy); } @@ -5956,7 +6450,8 @@ namespace { * @return $this * @static */ - public static function before($callback){ + public static function before($callback) + { return \Illuminate\Auth\Access\Gate::before($callback); } @@ -5967,7 +6462,8 @@ namespace { * @return $this * @static */ - public static function after($callback){ + public static function after($callback) + { return \Illuminate\Auth\Access\Gate::after($callback); } @@ -5979,7 +6475,8 @@ namespace { * @return bool * @static */ - public static function allows($ability, $arguments = array()){ + public static function allows($ability, $arguments = []) + { return \Illuminate\Auth\Access\Gate::allows($ability, $arguments); } @@ -5991,7 +6488,8 @@ namespace { * @return bool * @static */ - public static function denies($ability, $arguments = array()){ + public static function denies($ability, $arguments = []) + { return \Illuminate\Auth\Access\Gate::denies($ability, $arguments); } @@ -6003,7 +6501,8 @@ namespace { * @return bool * @static */ - public static function check($ability, $arguments = array()){ + public static function check($ability, $arguments = []) + { return \Illuminate\Auth\Access\Gate::check($ability, $arguments); } @@ -6016,7 +6515,8 @@ namespace { * @throws \Illuminate\Auth\Access\AuthorizationException * @static */ - public static function authorize($ability, $arguments = array()){ + public static function authorize($ability, $arguments = []) + { return \Illuminate\Auth\Access\Gate::authorize($ability, $arguments); } @@ -6027,7 +6527,8 @@ namespace { * @return mixed * @static */ - public static function getPolicyFor($class){ + public static function getPolicyFor($class) + { return \Illuminate\Auth\Access\Gate::getPolicyFor($class); } @@ -6038,7 +6539,8 @@ namespace { * @return mixed * @static */ - public static function resolvePolicy($class){ + public static function resolvePolicy($class) + { return \Illuminate\Auth\Access\Gate::resolvePolicy($class); } @@ -6049,15 +6551,15 @@ namespace { * @return static * @static */ - public static function forUser($user){ + public static function forUser($user) + { return \Illuminate\Auth\Access\Gate::forUser($user); } - } - class Hash extends \Illuminate\Support\Facades\Hash{ - + class Hash extends \Illuminate\Support\Facades\Hash + { /** * Hash the given value. * @@ -6067,7 +6569,8 @@ namespace { * @throws \RuntimeException * @static */ - public static function make($value, $options = array()){ + public static function make($value, $options = []) + { return \Illuminate\Hashing\BcryptHasher::make($value, $options); } @@ -6080,7 +6583,8 @@ namespace { * @return bool * @static */ - public static function check($value, $hashedValue, $options = array()){ + public static function check($value, $hashedValue, $options = []) + { return \Illuminate\Hashing\BcryptHasher::check($value, $hashedValue, $options); } @@ -6092,7 +6596,8 @@ namespace { * @return bool * @static */ - public static function needsRehash($hashedValue, $options = array()){ + public static function needsRehash($hashedValue, $options = []) + { return \Illuminate\Hashing\BcryptHasher::needsRehash($hashedValue, $options); } @@ -6103,15 +6608,15 @@ namespace { * @return $this * @static */ - public static function setRounds($rounds){ + public static function setRounds($rounds) + { return \Illuminate\Hashing\BcryptHasher::setRounds($rounds); } - } - class Lang extends \Illuminate\Support\Facades\Lang{ - + class Lang extends \Illuminate\Support\Facades\Lang + { /** * Determine if a translation exists for a given locale. * @@ -6120,7 +6625,8 @@ namespace { * @return bool * @static */ - public static function hasForLocale($key, $locale = null){ + public static function hasForLocale($key, $locale = null) + { return \Illuminate\Translation\Translator::hasForLocale($key, $locale); } @@ -6133,7 +6639,8 @@ namespace { * @return bool * @static */ - public static function has($key, $locale = null, $fallback = true){ + public static function has($key, $locale = null, $fallback = true) + { return \Illuminate\Translation\Translator::has($key, $locale, $fallback); } @@ -6146,7 +6653,8 @@ namespace { * @return string|array|null * @static */ - public static function trans($key, $replace = array(), $locale = null){ + public static function trans($key, $replace = [], $locale = null) + { return \Illuminate\Translation\Translator::trans($key, $replace, $locale); } @@ -6160,7 +6668,8 @@ namespace { * @return string|array|null * @static */ - public static function get($key, $replace = array(), $locale = null, $fallback = true){ + public static function get($key, $replace = [], $locale = null, $fallback = true) + { return \Illuminate\Translation\Translator::get($key, $replace, $locale, $fallback); } @@ -6173,7 +6682,8 @@ namespace { * @return string * @static */ - public static function getFromJson($key, $replace = array(), $locale = null){ + public static function getFromJson($key, $replace = [], $locale = null) + { return \Illuminate\Translation\Translator::getFromJson($key, $replace, $locale); } @@ -6187,7 +6697,8 @@ namespace { * @return string * @static */ - public static function transChoice($key, $number, $replace = array(), $locale = null){ + public static function transChoice($key, $number, $replace = [], $locale = null) + { return \Illuminate\Translation\Translator::transChoice($key, $number, $replace, $locale); } @@ -6201,7 +6712,8 @@ namespace { * @return string * @static */ - public static function choice($key, $number, $replace = array(), $locale = null){ + public static function choice($key, $number, $replace = [], $locale = null) + { return \Illuminate\Translation\Translator::choice($key, $number, $replace, $locale); } @@ -6214,7 +6726,8 @@ namespace { * @return void * @static */ - public static function addLines($lines, $locale, $namespace = '*'){ + public static function addLines($lines, $locale, $namespace = '*') + { \Illuminate\Translation\Translator::addLines($lines, $locale, $namespace); } @@ -6227,7 +6740,8 @@ namespace { * @return void * @static */ - public static function load($namespace, $group, $locale){ + public static function load($namespace, $group, $locale) + { \Illuminate\Translation\Translator::load($namespace, $group, $locale); } @@ -6239,7 +6753,8 @@ namespace { * @return void * @static */ - public static function addNamespace($namespace, $hint){ + public static function addNamespace($namespace, $hint) + { \Illuminate\Translation\Translator::addNamespace($namespace, $hint); } @@ -6250,7 +6765,8 @@ namespace { * @return array * @static */ - public static function parseKey($key){ + public static function parseKey($key) + { return \Illuminate\Translation\Translator::parseKey($key); } @@ -6260,7 +6776,8 @@ namespace { * @return \Illuminate\Translation\MessageSelector * @static */ - public static function getSelector(){ + public static function getSelector() + { return \Illuminate\Translation\Translator::getSelector(); } @@ -6271,7 +6788,8 @@ namespace { * @return void * @static */ - public static function setSelector($selector){ + public static function setSelector($selector) + { \Illuminate\Translation\Translator::setSelector($selector); } @@ -6281,7 +6799,8 @@ namespace { * @return \Illuminate\Translation\LoaderInterface * @static */ - public static function getLoader(){ + public static function getLoader() + { return \Illuminate\Translation\Translator::getLoader(); } @@ -6291,7 +6810,8 @@ namespace { * @return string * @static */ - public static function locale(){ + public static function locale() + { return \Illuminate\Translation\Translator::locale(); } @@ -6301,7 +6821,8 @@ namespace { * @return string * @static */ - public static function getLocale(){ + public static function getLocale() + { return \Illuminate\Translation\Translator::getLocale(); } @@ -6312,7 +6833,8 @@ namespace { * @return void * @static */ - public static function setLocale($locale){ + public static function setLocale($locale) + { \Illuminate\Translation\Translator::setLocale($locale); } @@ -6322,7 +6844,8 @@ namespace { * @return string * @static */ - public static function getFallback(){ + public static function getFallback() + { return \Illuminate\Translation\Translator::getFallback(); } @@ -6333,7 +6856,8 @@ namespace { * @return void * @static */ - public static function setFallback($fallback){ + public static function setFallback($fallback) + { \Illuminate\Translation\Translator::setFallback($fallback); } @@ -6345,7 +6869,8 @@ namespace { * @return void * @static */ - public static function setParsedKey($key, $parsed){ + public static function setParsedKey($key, $parsed) + { //Method inherited from \Illuminate\Support\NamespacedItemResolver \Illuminate\Translation\Translator::setParsedKey($key, $parsed); } @@ -6358,7 +6883,8 @@ namespace { * @return void * @static */ - public static function macro($name, $macro){ + public static function macro($name, $macro) + { \Illuminate\Translation\Translator::macro($name, $macro); } @@ -6369,15 +6895,15 @@ namespace { * @return bool * @static */ - public static function hasMacro($name){ + public static function hasMacro($name) + { return \Illuminate\Translation\Translator::hasMacro($name); } - } - class Log extends \Illuminate\Support\Facades\Log{ - + class Log extends \Illuminate\Support\Facades\Log + { /** * Adds a log record at the DEBUG level. * @@ -6386,7 +6912,8 @@ namespace { * @return Boolean Whether the record has been processed * @static */ - public static function debug($message, $context = array()){ + public static function debug($message, $context = []) + { return \Monolog\Logger::debug($message, $context); } @@ -6398,7 +6925,8 @@ namespace { * @return Boolean Whether the record has been processed * @static */ - public static function info($message, $context = array()){ + public static function info($message, $context = []) + { return \Monolog\Logger::info($message, $context); } @@ -6410,7 +6938,8 @@ namespace { * @return Boolean Whether the record has been processed * @static */ - public static function notice($message, $context = array()){ + public static function notice($message, $context = []) + { return \Monolog\Logger::notice($message, $context); } @@ -6422,7 +6951,8 @@ namespace { * @return Boolean Whether the record has been processed * @static */ - public static function warning($message, $context = array()){ + public static function warning($message, $context = []) + { return \Monolog\Logger::warning($message, $context); } @@ -6434,7 +6964,8 @@ namespace { * @return Boolean Whether the record has been processed * @static */ - public static function error($message, $context = array()){ + public static function error($message, $context = []) + { return \Monolog\Logger::error($message, $context); } @@ -6446,7 +6977,8 @@ namespace { * @return Boolean Whether the record has been processed * @static */ - public static function critical($message, $context = array()){ + public static function critical($message, $context = []) + { return \Monolog\Logger::critical($message, $context); } @@ -6458,7 +6990,8 @@ namespace { * @return Boolean Whether the record has been processed * @static */ - public static function alert($message, $context = array()){ + public static function alert($message, $context = []) + { return \Monolog\Logger::alert($message, $context); } @@ -6470,7 +7003,8 @@ namespace { * @return Boolean Whether the record has been processed * @static */ - public static function emergency($message, $context = array()){ + public static function emergency($message, $context = []) + { return \Monolog\Logger::emergency($message, $context); } @@ -6483,7 +7017,8 @@ namespace { * @return void * @static */ - public static function log($level, $message, $context = array()){ + public static function log($level, $message, $context = []) + { \Illuminate\Log\Writer::log($level, $message, $context); } @@ -6496,7 +7031,8 @@ namespace { * @return void * @static */ - public static function write($level, $message, $context = array()){ + public static function write($level, $message, $context = []) + { \Illuminate\Log\Writer::write($level, $message, $context); } @@ -6508,7 +7044,8 @@ namespace { * @return void * @static */ - public static function useFiles($path, $level = 'debug'){ + public static function useFiles($path, $level = 'debug') + { \Illuminate\Log\Writer::useFiles($path, $level); } @@ -6521,7 +7058,8 @@ namespace { * @return void * @static */ - public static function useDailyFiles($path, $days = 0, $level = 'debug'){ + public static function useDailyFiles($path, $days = 0, $level = 'debug') + { \Illuminate\Log\Writer::useDailyFiles($path, $days, $level); } @@ -6533,7 +7071,8 @@ namespace { * @return \Psr\Log\LoggerInterface * @static */ - public static function useSyslog($name = 'laravel', $level = 'debug'){ + public static function useSyslog($name = 'laravel', $level = 'debug') + { return \Illuminate\Log\Writer::useSyslog($name, $level); } @@ -6545,7 +7084,8 @@ namespace { * @return void * @static */ - public static function useErrorLog($level = 'debug', $messageType = 0){ + public static function useErrorLog($level = 'debug', $messageType = 0) + { \Illuminate\Log\Writer::useErrorLog($level, $messageType); } @@ -6557,7 +7097,8 @@ namespace { * @throws \RuntimeException * @static */ - public static function listen($callback){ + public static function listen($callback) + { \Illuminate\Log\Writer::listen($callback); } @@ -6567,7 +7108,8 @@ namespace { * @return \Monolog\Logger * @static */ - public static function getMonolog(){ + public static function getMonolog() + { return \Illuminate\Log\Writer::getMonolog(); } @@ -6577,7 +7119,8 @@ namespace { * @return \Illuminate\Contracts\Events\Dispatcher * @static */ - public static function getEventDispatcher(){ + public static function getEventDispatcher() + { return \Illuminate\Log\Writer::getEventDispatcher(); } @@ -6588,15 +7131,15 @@ namespace { * @return void * @static */ - public static function setEventDispatcher($dispatcher){ + public static function setEventDispatcher($dispatcher) + { \Illuminate\Log\Writer::setEventDispatcher($dispatcher); } - } - class Mail extends \Illuminate\Support\Facades\Mail{ - + class Mail extends \Illuminate\Support\Facades\Mail + { /** * Set the global from address and name. * @@ -6605,7 +7148,8 @@ namespace { * @return void * @static */ - public static function alwaysFrom($address, $name = null){ + public static function alwaysFrom($address, $name = null) + { \Illuminate\Mail\Mailer::alwaysFrom($address, $name); } @@ -6617,7 +7161,8 @@ namespace { * @return void * @static */ - public static function alwaysReplyTo($address, $name = null){ + public static function alwaysReplyTo($address, $name = null) + { \Illuminate\Mail\Mailer::alwaysReplyTo($address, $name); } @@ -6629,7 +7174,8 @@ namespace { * @return void * @static */ - public static function alwaysTo($address, $name = null){ + public static function alwaysTo($address, $name = null) + { \Illuminate\Mail\Mailer::alwaysTo($address, $name); } @@ -6640,7 +7186,8 @@ namespace { * @return \Illuminate\Mail\PendingMail * @static */ - public static function to($users){ + public static function to($users) + { return \Illuminate\Mail\Mailer::to($users); } @@ -6651,7 +7198,8 @@ namespace { * @return \Illuminate\Mail\PendingMail * @static */ - public static function bcc($users){ + public static function bcc($users) + { return \Illuminate\Mail\Mailer::bcc($users); } @@ -6663,7 +7211,8 @@ namespace { * @return void * @static */ - public static function raw($text, $callback){ + public static function raw($text, $callback) + { \Illuminate\Mail\Mailer::raw($text, $callback); } @@ -6676,7 +7225,8 @@ namespace { * @return void * @static */ - public static function plain($view, $data, $callback){ + public static function plain($view, $data, $callback) + { \Illuminate\Mail\Mailer::plain($view, $data, $callback); } @@ -6689,7 +7239,8 @@ namespace { * @return void * @static */ - public static function send($view, $data = array(), $callback = null){ + public static function send($view, $data = [], $callback = null) + { \Illuminate\Mail\Mailer::send($view, $data, $callback); } @@ -6703,7 +7254,8 @@ namespace { * @return mixed * @static */ - public static function queue($view, $data = array(), $callback = null, $queue = null){ + public static function queue($view, $data = [], $callback = null, $queue = null) + { return \Illuminate\Mail\Mailer::queue($view, $data, $callback, $queue); } @@ -6717,7 +7269,8 @@ namespace { * @return mixed * @static */ - public static function onQueue($queue, $view, $data, $callback){ + public static function onQueue($queue, $view, $data, $callback) + { return \Illuminate\Mail\Mailer::onQueue($queue, $view, $data, $callback); } @@ -6733,7 +7286,8 @@ namespace { * @return mixed * @static */ - public static function queueOn($queue, $view, $data, $callback){ + public static function queueOn($queue, $view, $data, $callback) + { return \Illuminate\Mail\Mailer::queueOn($queue, $view, $data, $callback); } @@ -6748,7 +7302,8 @@ namespace { * @return mixed * @static */ - public static function later($delay, $view, $data = array(), $callback = null, $queue = null){ + public static function later($delay, $view, $data = [], $callback = null, $queue = null) + { return \Illuminate\Mail\Mailer::later($delay, $view, $data, $callback, $queue); } @@ -6763,7 +7318,8 @@ namespace { * @return mixed * @static */ - public static function laterOn($queue, $delay, $view, $data, $callback){ + public static function laterOn($queue, $delay, $view, $data, $callback) + { return \Illuminate\Mail\Mailer::laterOn($queue, $delay, $view, $data, $callback); } @@ -6773,7 +7329,8 @@ namespace { * @return \Illuminate\Contracts\View\Factory * @static */ - public static function getViewFactory(){ + public static function getViewFactory() + { return \Illuminate\Mail\Mailer::getViewFactory(); } @@ -6783,7 +7340,8 @@ namespace { * @return \Swift_Mailer * @static */ - public static function getSwiftMailer(){ + public static function getSwiftMailer() + { return \Illuminate\Mail\Mailer::getSwiftMailer(); } @@ -6793,7 +7351,8 @@ namespace { * @return array * @static */ - public static function failures(){ + public static function failures() + { return \Illuminate\Mail\Mailer::failures(); } @@ -6804,7 +7363,8 @@ namespace { * @return void * @static */ - public static function setSwiftMailer($swift){ + public static function setSwiftMailer($swift) + { \Illuminate\Mail\Mailer::setSwiftMailer($swift); } @@ -6815,15 +7375,15 @@ namespace { * @return $this * @static */ - public static function setQueue($queue){ + public static function setQueue($queue) + { return \Illuminate\Mail\Mailer::setQueue($queue); } - } - class Notification extends \Illuminate\Support\Facades\Notification{ - + class Notification extends \Illuminate\Support\Facades\Notification + { /** * Send the given notification to the given notifiable entities. * @@ -6832,7 +7392,8 @@ namespace { * @return void * @static */ - public static function send($notifiables, $notification){ + public static function send($notifiables, $notification) + { \Illuminate\Notifications\ChannelManager::send($notifiables, $notification); } @@ -6845,7 +7406,8 @@ namespace { * @return void * @static */ - public static function sendNow($notifiables, $notification, $channels = null){ + public static function sendNow($notifiables, $notification, $channels = null) + { \Illuminate\Notifications\ChannelManager::sendNow($notifiables, $notification, $channels); } @@ -6856,7 +7418,8 @@ namespace { * @return mixed * @static */ - public static function channel($name = null){ + public static function channel($name = null) + { return \Illuminate\Notifications\ChannelManager::channel($name); } @@ -6866,7 +7429,8 @@ namespace { * @return string * @static */ - public static function getDefaultDriver(){ + public static function getDefaultDriver() + { return \Illuminate\Notifications\ChannelManager::getDefaultDriver(); } @@ -6876,7 +7440,8 @@ namespace { * @return string * @static */ - public static function deliversVia(){ + public static function deliversVia() + { return \Illuminate\Notifications\ChannelManager::deliversVia(); } @@ -6887,7 +7452,8 @@ namespace { * @return void * @static */ - public static function deliverVia($channel){ + public static function deliverVia($channel) + { \Illuminate\Notifications\ChannelManager::deliverVia($channel); } @@ -6898,7 +7464,8 @@ namespace { * @return mixed * @static */ - public static function driver($driver = null){ + public static function driver($driver = null) + { //Method inherited from \Illuminate\Support\Manager return \Illuminate\Notifications\ChannelManager::driver($driver); } @@ -6911,7 +7478,8 @@ namespace { * @return $this * @static */ - public static function extend($driver, $callback){ + public static function extend($driver, $callback) + { //Method inherited from \Illuminate\Support\Manager return \Illuminate\Notifications\ChannelManager::extend($driver, $callback); } @@ -6922,16 +7490,16 @@ namespace { * @return array * @static */ - public static function getDrivers(){ + public static function getDrivers() + { //Method inherited from \Illuminate\Support\Manager return \Illuminate\Notifications\ChannelManager::getDrivers(); } - } - class Password extends \Illuminate\Support\Facades\Password{ - + class Password extends \Illuminate\Support\Facades\Password + { /** * Attempt to get the broker from the local cache. * @@ -6939,7 +7507,8 @@ namespace { * @return \Illuminate\Contracts\Auth\PasswordBroker * @static */ - public static function broker($name = null){ + public static function broker($name = null) + { return \Illuminate\Auth\Passwords\PasswordBrokerManager::broker($name); } @@ -6949,7 +7518,8 @@ namespace { * @return string * @static */ - public static function getDefaultDriver(){ + public static function getDefaultDriver() + { return \Illuminate\Auth\Passwords\PasswordBrokerManager::getDefaultDriver(); } @@ -6960,15 +7530,15 @@ namespace { * @return void * @static */ - public static function setDefaultDriver($name){ + public static function setDefaultDriver($name) + { \Illuminate\Auth\Passwords\PasswordBrokerManager::setDefaultDriver($name); } - } - class Queue extends \Illuminate\Support\Facades\Queue{ - + class Queue extends \Illuminate\Support\Facades\Queue + { /** * Register an event listener for the before job event. * @@ -6976,7 +7546,8 @@ namespace { * @return void * @static */ - public static function before($callback){ + public static function before($callback) + { \Illuminate\Queue\QueueManager::before($callback); } @@ -6987,7 +7558,8 @@ namespace { * @return void * @static */ - public static function after($callback){ + public static function after($callback) + { \Illuminate\Queue\QueueManager::after($callback); } @@ -6998,7 +7570,8 @@ namespace { * @return void * @static */ - public static function exceptionOccurred($callback){ + public static function exceptionOccurred($callback) + { \Illuminate\Queue\QueueManager::exceptionOccurred($callback); } @@ -7009,7 +7582,8 @@ namespace { * @return void * @static */ - public static function looping($callback){ + public static function looping($callback) + { \Illuminate\Queue\QueueManager::looping($callback); } @@ -7020,7 +7594,8 @@ namespace { * @return void * @static */ - public static function failing($callback){ + public static function failing($callback) + { \Illuminate\Queue\QueueManager::failing($callback); } @@ -7031,7 +7606,8 @@ namespace { * @return void * @static */ - public static function stopping($callback){ + public static function stopping($callback) + { \Illuminate\Queue\QueueManager::stopping($callback); } @@ -7042,7 +7618,8 @@ namespace { * @return bool * @static */ - public static function connected($name = null){ + public static function connected($name = null) + { return \Illuminate\Queue\QueueManager::connected($name); } @@ -7053,7 +7630,8 @@ namespace { * @return \Illuminate\Contracts\Queue\Queue * @static */ - public static function connection($name = null){ + public static function connection($name = null) + { return \Illuminate\Queue\QueueManager::connection($name); } @@ -7065,7 +7643,8 @@ namespace { * @return void * @static */ - public static function extend($driver, $resolver){ + public static function extend($driver, $resolver) + { \Illuminate\Queue\QueueManager::extend($driver, $resolver); } @@ -7077,7 +7656,8 @@ namespace { * @return void * @static */ - public static function addConnector($driver, $resolver){ + public static function addConnector($driver, $resolver) + { \Illuminate\Queue\QueueManager::addConnector($driver, $resolver); } @@ -7087,7 +7667,8 @@ namespace { * @return string * @static */ - public static function getDefaultDriver(){ + public static function getDefaultDriver() + { return \Illuminate\Queue\QueueManager::getDefaultDriver(); } @@ -7098,7 +7679,8 @@ namespace { * @return void * @static */ - public static function setDefaultDriver($name){ + public static function setDefaultDriver($name) + { \Illuminate\Queue\QueueManager::setDefaultDriver($name); } @@ -7109,7 +7691,8 @@ namespace { * @return string * @static */ - public static function getName($connection = null){ + public static function getName($connection = null) + { return \Illuminate\Queue\QueueManager::getName($connection); } @@ -7119,7 +7702,8 @@ namespace { * @return bool * @static */ - public static function isDownForMaintenance(){ + public static function isDownForMaintenance() + { return \Illuminate\Queue\QueueManager::isDownForMaintenance(); } @@ -7130,7 +7714,8 @@ namespace { * @return int * @static */ - public static function size($queue = null){ + public static function size($queue = null) + { return \Illuminate\Queue\SyncQueue::size($queue); } @@ -7144,7 +7729,8 @@ namespace { * @throws \Exception|\Throwable * @static */ - public static function push($job, $data = '', $queue = null){ + public static function push($job, $data = '', $queue = null) + { return \Illuminate\Queue\SyncQueue::push($job, $data, $queue); } @@ -7157,7 +7743,8 @@ namespace { * @return mixed * @static */ - public static function pushRaw($payload, $queue = null, $options = array()){ + public static function pushRaw($payload, $queue = null, $options = []) + { return \Illuminate\Queue\SyncQueue::pushRaw($payload, $queue, $options); } @@ -7171,7 +7758,8 @@ namespace { * @return mixed * @static */ - public static function later($delay, $job, $data = '', $queue = null){ + public static function later($delay, $job, $data = '', $queue = null) + { return \Illuminate\Queue\SyncQueue::later($delay, $job, $data, $queue); } @@ -7182,7 +7770,8 @@ namespace { * @return \Illuminate\Contracts\Queue\Job|null * @static */ - public static function pop($queue = null){ + public static function pop($queue = null) + { return \Illuminate\Queue\SyncQueue::pop($queue); } @@ -7195,7 +7784,8 @@ namespace { * @return mixed * @static */ - public static function pushOn($queue, $job, $data = ''){ + public static function pushOn($queue, $job, $data = '') + { //Method inherited from \Illuminate\Queue\Queue return \Illuminate\Queue\SyncQueue::pushOn($queue, $job, $data); } @@ -7210,7 +7800,8 @@ namespace { * @return mixed * @static */ - public static function laterOn($queue, $delay, $job, $data = ''){ + public static function laterOn($queue, $delay, $job, $data = '') + { //Method inherited from \Illuminate\Queue\Queue return \Illuminate\Queue\SyncQueue::laterOn($queue, $delay, $job, $data); } @@ -7224,7 +7815,8 @@ namespace { * @return mixed * @static */ - public static function bulk($jobs, $data = '', $queue = null){ + public static function bulk($jobs, $data = '', $queue = null) + { //Method inherited from \Illuminate\Queue\Queue return \Illuminate\Queue\SyncQueue::bulk($jobs, $data, $queue); } @@ -7235,7 +7827,8 @@ namespace { * @return string * @static */ - public static function getConnectionName(){ + public static function getConnectionName() + { //Method inherited from \Illuminate\Queue\Queue return \Illuminate\Queue\SyncQueue::getConnectionName(); } @@ -7247,7 +7840,8 @@ namespace { * @return $this * @static */ - public static function setConnectionName($name){ + public static function setConnectionName($name) + { //Method inherited from \Illuminate\Queue\Queue return \Illuminate\Queue\SyncQueue::setConnectionName($name); } @@ -7259,16 +7853,16 @@ namespace { * @return void * @static */ - public static function setContainer($container){ + public static function setContainer($container) + { //Method inherited from \Illuminate\Queue\Queue \Illuminate\Queue\SyncQueue::setContainer($container); } - } - class Redirect extends \Illuminate\Support\Facades\Redirect{ - + class Redirect extends \Illuminate\Support\Facades\Redirect + { /** * Create a new redirect response to the "home" route. * @@ -7276,7 +7870,8 @@ namespace { * @return \Illuminate\Http\RedirectResponse * @static */ - public static function home($status = 302){ + public static function home($status = 302) + { return \Illuminate\Routing\Redirector::home($status); } @@ -7289,7 +7884,8 @@ namespace { * @return \Illuminate\Http\RedirectResponse * @static */ - public static function back($status = 302, $headers = array(), $fallback = false){ + public static function back($status = 302, $headers = [], $fallback = false) + { return \Illuminate\Routing\Redirector::back($status, $headers, $fallback); } @@ -7301,7 +7897,8 @@ namespace { * @return \Illuminate\Http\RedirectResponse * @static */ - public static function refresh($status = 302, $headers = array()){ + public static function refresh($status = 302, $headers = []) + { return \Illuminate\Routing\Redirector::refresh($status, $headers); } @@ -7315,7 +7912,8 @@ namespace { * @return \Illuminate\Http\RedirectResponse * @static */ - public static function guest($path, $status = 302, $headers = array(), $secure = null){ + public static function guest($path, $status = 302, $headers = [], $secure = null) + { return \Illuminate\Routing\Redirector::guest($path, $status, $headers, $secure); } @@ -7329,7 +7927,8 @@ namespace { * @return \Illuminate\Http\RedirectResponse * @static */ - public static function intended($default = '/', $status = 302, $headers = array(), $secure = null){ + public static function intended($default = '/', $status = 302, $headers = [], $secure = null) + { return \Illuminate\Routing\Redirector::intended($default, $status, $headers, $secure); } @@ -7343,7 +7942,8 @@ namespace { * @return \Illuminate\Http\RedirectResponse * @static */ - public static function to($path, $status = 302, $headers = array(), $secure = null){ + public static function to($path, $status = 302, $headers = [], $secure = null) + { return \Illuminate\Routing\Redirector::to($path, $status, $headers, $secure); } @@ -7356,7 +7956,8 @@ namespace { * @return \Illuminate\Http\RedirectResponse * @static */ - public static function away($path, $status = 302, $headers = array()){ + public static function away($path, $status = 302, $headers = []) + { return \Illuminate\Routing\Redirector::away($path, $status, $headers); } @@ -7369,7 +7970,8 @@ namespace { * @return \Illuminate\Http\RedirectResponse * @static */ - public static function secure($path, $status = 302, $headers = array()){ + public static function secure($path, $status = 302, $headers = []) + { return \Illuminate\Routing\Redirector::secure($path, $status, $headers); } @@ -7383,7 +7985,8 @@ namespace { * @return \Illuminate\Http\RedirectResponse * @static */ - public static function route($route, $parameters = array(), $status = 302, $headers = array()){ + public static function route($route, $parameters = [], $status = 302, $headers = []) + { return \Illuminate\Routing\Redirector::route($route, $parameters, $status, $headers); } @@ -7397,7 +8000,8 @@ namespace { * @return \Illuminate\Http\RedirectResponse * @static */ - public static function action($action, $parameters = array(), $status = 302, $headers = array()){ + public static function action($action, $parameters = [], $status = 302, $headers = []) + { return \Illuminate\Routing\Redirector::action($action, $parameters, $status, $headers); } @@ -7407,7 +8011,8 @@ namespace { * @return \Illuminate\Routing\UrlGenerator * @static */ - public static function getUrlGenerator(){ + public static function getUrlGenerator() + { return \Illuminate\Routing\Redirector::getUrlGenerator(); } @@ -7418,22 +8023,23 @@ namespace { * @return void * @static */ - public static function setSession($session){ + public static function setSession($session) + { \Illuminate\Routing\Redirector::setSession($session); } - } - class Request extends \Illuminate\Support\Facades\Request{ - + class Request extends \Illuminate\Support\Facades\Request + { /** * Create a new Illuminate HTTP request from server variables. * * @return static * @static */ - public static function capture(){ + public static function capture() + { return \Illuminate\Http\Request::capture(); } @@ -7443,7 +8049,8 @@ namespace { * @return $this * @static */ - public static function instance(){ + public static function instance() + { return \Illuminate\Http\Request::instance(); } @@ -7453,7 +8060,8 @@ namespace { * @return string * @static */ - public static function method(){ + public static function method() + { return \Illuminate\Http\Request::method(); } @@ -7463,7 +8071,8 @@ namespace { * @return string * @static */ - public static function root(){ + public static function root() + { return \Illuminate\Http\Request::root(); } @@ -7473,7 +8082,8 @@ namespace { * @return string * @static */ - public static function url(){ + public static function url() + { return \Illuminate\Http\Request::url(); } @@ -7483,7 +8093,8 @@ namespace { * @return string * @static */ - public static function fullUrl(){ + public static function fullUrl() + { return \Illuminate\Http\Request::fullUrl(); } @@ -7494,7 +8105,8 @@ namespace { * @return string * @static */ - public static function fullUrlWithQuery($query){ + public static function fullUrlWithQuery($query) + { return \Illuminate\Http\Request::fullUrlWithQuery($query); } @@ -7504,7 +8116,8 @@ namespace { * @return string * @static */ - public static function path(){ + public static function path() + { return \Illuminate\Http\Request::path(); } @@ -7514,7 +8127,8 @@ namespace { * @return string * @static */ - public static function decodedPath(){ + public static function decodedPath() + { return \Illuminate\Http\Request::decodedPath(); } @@ -7526,7 +8140,8 @@ namespace { * @return string|null * @static */ - public static function segment($index, $default = null){ + public static function segment($index, $default = null) + { return \Illuminate\Http\Request::segment($index, $default); } @@ -7536,7 +8151,8 @@ namespace { * @return array * @static */ - public static function segments(){ + public static function segments() + { return \Illuminate\Http\Request::segments(); } @@ -7546,7 +8162,8 @@ namespace { * @return bool * @static */ - public static function is(){ + public static function is() + { return \Illuminate\Http\Request::is(); } @@ -7556,7 +8173,8 @@ namespace { * @return bool * @static */ - public static function fullUrlIs(){ + public static function fullUrlIs() + { return \Illuminate\Http\Request::fullUrlIs(); } @@ -7566,7 +8184,8 @@ namespace { * @return bool * @static */ - public static function ajax(){ + public static function ajax() + { return \Illuminate\Http\Request::ajax(); } @@ -7576,7 +8195,8 @@ namespace { * @return bool * @static */ - public static function pjax(){ + public static function pjax() + { return \Illuminate\Http\Request::pjax(); } @@ -7586,7 +8206,8 @@ namespace { * @return bool * @static */ - public static function secure(){ + public static function secure() + { return \Illuminate\Http\Request::secure(); } @@ -7596,7 +8217,8 @@ namespace { * @return string * @static */ - public static function ip(){ + public static function ip() + { return \Illuminate\Http\Request::ip(); } @@ -7606,7 +8228,8 @@ namespace { * @return array * @static */ - public static function ips(){ + public static function ips() + { return \Illuminate\Http\Request::ips(); } @@ -7617,7 +8240,8 @@ namespace { * @return void * @static */ - public static function merge($input){ + public static function merge($input) + { \Illuminate\Http\Request::merge($input); } @@ -7628,7 +8252,8 @@ namespace { * @return void * @static */ - public static function replace($input){ + public static function replace($input) + { \Illuminate\Http\Request::replace($input); } @@ -7640,7 +8265,8 @@ namespace { * @return mixed * @static */ - public static function json($key = null, $default = null){ + public static function json($key = null, $default = null) + { return \Illuminate\Http\Request::json($key, $default); } @@ -7651,7 +8277,8 @@ namespace { * @return \Illuminate\Http\Request * @static */ - public static function createFromBase($request){ + public static function createFromBase($request) + { return \Illuminate\Http\Request::createFromBase($request); } @@ -7667,7 +8294,8 @@ namespace { * @return static * @static */ - public static function duplicate($query = null, $request = null, $attributes = null, $cookies = null, $files = null, $server = null){ + public static function duplicate($query = null, $request = null, $attributes = null, $cookies = null, $files = null, $server = null) + { return \Illuminate\Http\Request::duplicate($query, $request, $attributes, $cookies, $files, $server); } @@ -7678,7 +8306,8 @@ namespace { * @throws \RuntimeException * @static */ - public static function session(){ + public static function session() + { return \Illuminate\Http\Request::session(); } @@ -7689,7 +8318,8 @@ namespace { * @return void * @static */ - public static function setLaravelSession($session){ + public static function setLaravelSession($session) + { \Illuminate\Http\Request::setLaravelSession($session); } @@ -7700,7 +8330,8 @@ namespace { * @return mixed * @static */ - public static function user($guard = null){ + public static function user($guard = null) + { return \Illuminate\Http\Request::user($guard); } @@ -7711,7 +8342,8 @@ namespace { * @return \Illuminate\Routing\Route|object|string * @static */ - public static function route($param = null){ + public static function route($param = null) + { return \Illuminate\Http\Request::route($param); } @@ -7722,7 +8354,8 @@ namespace { * @throws \RuntimeException * @static */ - public static function fingerprint(){ + public static function fingerprint() + { return \Illuminate\Http\Request::fingerprint(); } @@ -7732,7 +8365,8 @@ namespace { * @return \Closure * @static */ - public static function getUserResolver(){ + public static function getUserResolver() + { return \Illuminate\Http\Request::getUserResolver(); } @@ -7743,7 +8377,8 @@ namespace { * @return $this * @static */ - public static function setUserResolver($callback){ + public static function setUserResolver($callback) + { return \Illuminate\Http\Request::setUserResolver($callback); } @@ -7753,7 +8388,8 @@ namespace { * @return \Closure * @static */ - public static function getRouteResolver(){ + public static function getRouteResolver() + { return \Illuminate\Http\Request::getRouteResolver(); } @@ -7764,7 +8400,8 @@ namespace { * @return $this * @static */ - public static function setRouteResolver($callback){ + public static function setRouteResolver($callback) + { return \Illuminate\Http\Request::setRouteResolver($callback); } @@ -7774,7 +8411,8 @@ namespace { * @return array * @static */ - public static function toArray(){ + public static function toArray() + { return \Illuminate\Http\Request::toArray(); } @@ -7785,7 +8423,8 @@ namespace { * @return bool * @static */ - public static function offsetExists($offset){ + public static function offsetExists($offset) + { return \Illuminate\Http\Request::offsetExists($offset); } @@ -7796,7 +8435,8 @@ namespace { * @return mixed * @static */ - public static function offsetGet($offset){ + public static function offsetGet($offset) + { return \Illuminate\Http\Request::offsetGet($offset); } @@ -7808,7 +8448,8 @@ namespace { * @return void * @static */ - public static function offsetSet($offset, $value){ + public static function offsetSet($offset, $value) + { \Illuminate\Http\Request::offsetSet($offset, $value); } @@ -7819,7 +8460,8 @@ namespace { * @return void * @static */ - public static function offsetUnset($offset){ + public static function offsetUnset($offset) + { \Illuminate\Http\Request::offsetUnset($offset); } @@ -7837,7 +8479,8 @@ namespace { * @param string|resource $content The raw body data * @static */ - public static function initialize($query = array(), $request = array(), $attributes = array(), $cookies = array(), $files = array(), $server = array(), $content = null){ + public static function initialize($query = [], $request = [], $attributes = [], $cookies = [], $files = [], $server = [], $content = null) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::initialize($query, $request, $attributes, $cookies, $files, $server, $content); } @@ -7848,7 +8491,8 @@ namespace { * @return static * @static */ - public static function createFromGlobals(){ + public static function createFromGlobals() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::createFromGlobals(); } @@ -7869,7 +8513,8 @@ namespace { * @return static * @static */ - public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null){ + public static function create($uri, $method = 'GET', $parameters = [], $cookies = [], $files = [], $server = [], $content = null) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::create($uri, $method, $parameters, $cookies, $files, $server, $content); } @@ -7884,7 +8529,8 @@ namespace { * @param callable|null $callable A PHP callable * @static */ - public static function setFactory($callable){ + public static function setFactory($callable) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::setFactory($callable); } @@ -7897,7 +8543,8 @@ namespace { * * @static */ - public static function overrideGlobals(){ + public static function overrideGlobals() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::overrideGlobals(); } @@ -7910,7 +8557,8 @@ namespace { * @param array $proxies A list of trusted proxies * @static */ - public static function setTrustedProxies($proxies){ + public static function setTrustedProxies($proxies) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::setTrustedProxies($proxies); } @@ -7921,7 +8569,8 @@ namespace { * @return array An array of trusted proxies * @static */ - public static function getTrustedProxies(){ + public static function getTrustedProxies() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getTrustedProxies(); } @@ -7934,7 +8583,8 @@ namespace { * @param array $hostPatterns A list of trusted host patterns * @static */ - public static function setTrustedHosts($hostPatterns){ + public static function setTrustedHosts($hostPatterns) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::setTrustedHosts($hostPatterns); } @@ -7945,7 +8595,8 @@ namespace { * @return array An array of trusted host patterns * @static */ - public static function getTrustedHosts(){ + public static function getTrustedHosts() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getTrustedHosts(); } @@ -7967,7 +8618,8 @@ namespace { * @throws \InvalidArgumentException * @static */ - public static function setTrustedHeaderName($key, $value){ + public static function setTrustedHeaderName($key, $value) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::setTrustedHeaderName($key, $value); } @@ -7980,7 +8632,8 @@ namespace { * @throws \InvalidArgumentException * @static */ - public static function getTrustedHeaderName($key){ + public static function getTrustedHeaderName($key) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getTrustedHeaderName($key); } @@ -7995,7 +8648,8 @@ namespace { * @return string A normalized query string for the Request * @static */ - public static function normalizeQueryString($qs){ + public static function normalizeQueryString($qs) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::normalizeQueryString($qs); } @@ -8013,7 +8667,8 @@ namespace { * * @static */ - public static function enableHttpMethodParameterOverride(){ + public static function enableHttpMethodParameterOverride() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::enableHttpMethodParameterOverride(); } @@ -8024,7 +8679,8 @@ namespace { * @return bool True when the _method request parameter is enabled, false otherwise * @static */ - public static function getHttpMethodParameterOverride(){ + public static function getHttpMethodParameterOverride() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getHttpMethodParameterOverride(); } @@ -8043,7 +8699,8 @@ namespace { * @return mixed * @static */ - public static function get($key, $default = null){ + public static function get($key, $default = null) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::get($key, $default); } @@ -8054,7 +8711,8 @@ namespace { * @return \Symfony\Component\HttpFoundation\SessionInterface|null The session * @static */ - public static function getSession(){ + public static function getSession() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getSession(); } @@ -8066,7 +8724,8 @@ namespace { * @return bool * @static */ - public static function hasPreviousSession(){ + public static function hasPreviousSession() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::hasPreviousSession(); } @@ -8081,7 +8740,8 @@ namespace { * @return bool true when the Request contains a Session object, false otherwise * @static */ - public static function hasSession(){ + public static function hasSession() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::hasSession(); } @@ -8092,7 +8752,8 @@ namespace { * @param \Symfony\Component\HttpFoundation\SessionInterface $session The Session * @static */ - public static function setSession($session){ + public static function setSession($session) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::setSession($session); } @@ -8110,7 +8771,8 @@ namespace { * @see getClientIp() * @static */ - public static function getClientIps(){ + public static function getClientIps() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getClientIps(); } @@ -8133,7 +8795,8 @@ namespace { * @see http://en.wikipedia.org/wiki/X-Forwarded-For * @static */ - public static function getClientIp(){ + public static function getClientIp() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getClientIp(); } @@ -8144,7 +8807,8 @@ namespace { * @return string * @static */ - public static function getScriptName(){ + public static function getScriptName() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getScriptName(); } @@ -8164,7 +8828,8 @@ namespace { * @return string The raw path (i.e. not urldecoded) * @static */ - public static function getPathInfo(){ + public static function getPathInfo() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getPathInfo(); } @@ -8182,7 +8847,8 @@ namespace { * @return string The raw path (i.e. not urldecoded) * @static */ - public static function getBasePath(){ + public static function getBasePath() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getBasePath(); } @@ -8198,7 +8864,8 @@ namespace { * @return string The raw URL (i.e. not urldecoded) * @static */ - public static function getBaseUrl(){ + public static function getBaseUrl() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getBaseUrl(); } @@ -8209,7 +8876,8 @@ namespace { * @return string * @static */ - public static function getScheme(){ + public static function getScheme() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getScheme(); } @@ -8228,7 +8896,8 @@ namespace { * @return string * @static */ - public static function getPort(){ + public static function getPort() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getPort(); } @@ -8239,7 +8908,8 @@ namespace { * @return string|null * @static */ - public static function getUser(){ + public static function getUser() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getUser(); } @@ -8250,7 +8920,8 @@ namespace { * @return string|null * @static */ - public static function getPassword(){ + public static function getPassword() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getPassword(); } @@ -8261,7 +8932,8 @@ namespace { * @return string A user name and, optionally, scheme-specific information about how to gain authorization to access the server * @static */ - public static function getUserInfo(){ + public static function getUserInfo() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getUserInfo(); } @@ -8274,7 +8946,8 @@ namespace { * @return string * @static */ - public static function getHttpHost(){ + public static function getHttpHost() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getHttpHost(); } @@ -8285,7 +8958,8 @@ namespace { * @return string The raw URI (i.e. not URI decoded) * @static */ - public static function getRequestUri(){ + public static function getRequestUri() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getRequestUri(); } @@ -8299,7 +8973,8 @@ namespace { * @return string The scheme and HTTP host * @static */ - public static function getSchemeAndHttpHost(){ + public static function getSchemeAndHttpHost() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getSchemeAndHttpHost(); } @@ -8311,7 +8986,8 @@ namespace { * @see getQueryString() * @static */ - public static function getUri(){ + public static function getUri() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getUri(); } @@ -8323,7 +8999,8 @@ namespace { * @return string The normalized URI for the path * @static */ - public static function getUriForPath($path){ + public static function getUriForPath($path) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getUriForPath($path); } @@ -8347,7 +9024,8 @@ namespace { * @return string The relative target path * @static */ - public static function getRelativeUriForPath($path){ + public static function getRelativeUriForPath($path) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getRelativeUriForPath($path); } @@ -8361,7 +9039,8 @@ namespace { * @return string|null A normalized query string for the Request * @static */ - public static function getQueryString(){ + public static function getQueryString() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getQueryString(); } @@ -8381,7 +9060,8 @@ namespace { * @return bool * @static */ - public static function isSecure(){ + public static function isSecure() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::isSecure(); } @@ -8401,7 +9081,8 @@ namespace { * @throws \UnexpectedValueException when the host name is invalid * @static */ - public static function getHost(){ + public static function getHost() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getHost(); } @@ -8412,7 +9093,8 @@ namespace { * @param string $method * @static */ - public static function setMethod($method){ + public static function setMethod($method) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::setMethod($method); } @@ -8432,7 +9114,8 @@ namespace { * @see getRealMethod() * @static */ - public static function getMethod(){ + public static function getMethod() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getMethod(); } @@ -8444,7 +9127,8 @@ namespace { * @see getMethod() * @static */ - public static function getRealMethod(){ + public static function getRealMethod() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getRealMethod(); } @@ -8456,7 +9140,8 @@ namespace { * @return string The associated mime type (null if not found) * @static */ - public static function getMimeType($format){ + public static function getMimeType($format) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getMimeType($format); } @@ -8468,7 +9153,8 @@ namespace { * @return array The associated mime types * @static */ - public static function getMimeTypes($format){ + public static function getMimeTypes($format) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getMimeTypes($format); } @@ -8480,7 +9166,8 @@ namespace { * @return string|null The format (null if not found) * @static */ - public static function getFormat($mimeType){ + public static function getFormat($mimeType) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getFormat($mimeType); } @@ -8492,7 +9179,8 @@ namespace { * @param string|array $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type) * @static */ - public static function setFormat($format, $mimeTypes){ + public static function setFormat($format, $mimeTypes) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::setFormat($format, $mimeTypes); } @@ -8510,7 +9198,8 @@ namespace { * @return string The request format * @static */ - public static function getRequestFormat($default = 'html'){ + public static function getRequestFormat($default = 'html') + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getRequestFormat($default); } @@ -8521,7 +9210,8 @@ namespace { * @param string $format The request format * @static */ - public static function setRequestFormat($format){ + public static function setRequestFormat($format) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::setRequestFormat($format); } @@ -8532,7 +9222,8 @@ namespace { * @return string|null The format (null if no content type is present) * @static */ - public static function getContentType(){ + public static function getContentType() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getContentType(); } @@ -8543,7 +9234,8 @@ namespace { * @param string $locale * @static */ - public static function setDefaultLocale($locale){ + public static function setDefaultLocale($locale) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::setDefaultLocale($locale); } @@ -8554,7 +9246,8 @@ namespace { * @return string * @static */ - public static function getDefaultLocale(){ + public static function getDefaultLocale() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getDefaultLocale(); } @@ -8565,7 +9258,8 @@ namespace { * @param string $locale * @static */ - public static function setLocale($locale){ + public static function setLocale($locale) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::setLocale($locale); } @@ -8576,7 +9270,8 @@ namespace { * @return string * @static */ - public static function getLocale(){ + public static function getLocale() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getLocale(); } @@ -8588,7 +9283,8 @@ namespace { * @return bool * @static */ - public static function isMethod($method){ + public static function isMethod($method) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::isMethod($method); } @@ -8601,7 +9297,8 @@ namespace { * @return bool * @static */ - public static function isMethodSafe(){ + public static function isMethodSafe() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::isMethodSafe(); } @@ -8612,7 +9309,8 @@ namespace { * @return bool * @static */ - public static function isMethodIdempotent(){ + public static function isMethodIdempotent() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::isMethodIdempotent(); } @@ -8624,7 +9322,8 @@ namespace { * @return bool * @static */ - public static function isMethodCacheable(){ + public static function isMethodCacheable() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::isMethodCacheable(); } @@ -8637,7 +9336,8 @@ namespace { * @throws \LogicException * @static */ - public static function getContent($asResource = false){ + public static function getContent($asResource = false) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getContent($asResource); } @@ -8648,7 +9348,8 @@ namespace { * @return array The entity tags * @static */ - public static function getETags(){ + public static function getETags() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getETags(); } @@ -8659,7 +9360,8 @@ namespace { * @return bool * @static */ - public static function isNoCache(){ + public static function isNoCache() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::isNoCache(); } @@ -8671,7 +9373,8 @@ namespace { * @return string|null The preferred locale * @static */ - public static function getPreferredLanguage($locales = null){ + public static function getPreferredLanguage($locales = null) + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getPreferredLanguage($locales); } @@ -8682,7 +9385,8 @@ namespace { * @return array Languages ordered in the user browser preferences * @static */ - public static function getLanguages(){ + public static function getLanguages() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getLanguages(); } @@ -8693,7 +9397,8 @@ namespace { * @return array List of charsets in preferable order * @static */ - public static function getCharsets(){ + public static function getCharsets() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getCharsets(); } @@ -8704,7 +9409,8 @@ namespace { * @return array List of encodings in preferable order * @static */ - public static function getEncodings(){ + public static function getEncodings() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getEncodings(); } @@ -8715,7 +9421,8 @@ namespace { * @return array List of content types in preferable order * @static */ - public static function getAcceptableContentTypes(){ + public static function getAcceptableContentTypes() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getAcceptableContentTypes(); } @@ -8730,7 +9437,8 @@ namespace { * @return bool true if the request is an XMLHttpRequest, false otherwise * @static */ - public static function isXmlHttpRequest(){ + public static function isXmlHttpRequest() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::isXmlHttpRequest(); } @@ -8744,7 +9452,8 @@ namespace { * @return bool true if the request came from a trusted proxy, false otherwise * @static */ - public static function isFromTrustedProxy(){ + public static function isFromTrustedProxy() + { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::isFromTrustedProxy(); } @@ -8757,7 +9466,8 @@ namespace { * @return bool * @static */ - public static function matchesType($actual, $type){ + public static function matchesType($actual, $type) + { return \Illuminate\Http\Request::matchesType($actual, $type); } @@ -8767,7 +9477,8 @@ namespace { * @return bool * @static */ - public static function isJson(){ + public static function isJson() + { return \Illuminate\Http\Request::isJson(); } @@ -8777,7 +9488,8 @@ namespace { * @return bool * @static */ - public static function expectsJson(){ + public static function expectsJson() + { return \Illuminate\Http\Request::expectsJson(); } @@ -8787,7 +9499,8 @@ namespace { * @return bool * @static */ - public static function wantsJson(){ + public static function wantsJson() + { return \Illuminate\Http\Request::wantsJson(); } @@ -8798,7 +9511,8 @@ namespace { * @return bool * @static */ - public static function accepts($contentTypes){ + public static function accepts($contentTypes) + { return \Illuminate\Http\Request::accepts($contentTypes); } @@ -8809,7 +9523,8 @@ namespace { * @return string|null * @static */ - public static function prefers($contentTypes){ + public static function prefers($contentTypes) + { return \Illuminate\Http\Request::prefers($contentTypes); } @@ -8819,7 +9534,8 @@ namespace { * @return bool * @static */ - public static function acceptsJson(){ + public static function acceptsJson() + { return \Illuminate\Http\Request::acceptsJson(); } @@ -8829,7 +9545,8 @@ namespace { * @return bool * @static */ - public static function acceptsHtml(){ + public static function acceptsHtml() + { return \Illuminate\Http\Request::acceptsHtml(); } @@ -8840,7 +9557,8 @@ namespace { * @return string * @static */ - public static function format($default = 'html'){ + public static function format($default = 'html') + { return \Illuminate\Http\Request::format($default); } @@ -8852,7 +9570,8 @@ namespace { * @return string|array * @static */ - public static function old($key = null, $default = null){ + public static function old($key = null, $default = null) + { return \Illuminate\Http\Request::old($key, $default); } @@ -8862,7 +9581,8 @@ namespace { * @return void * @static */ - public static function flash(){ + public static function flash() + { \Illuminate\Http\Request::flash(); } @@ -8873,7 +9593,8 @@ namespace { * @return void * @static */ - public static function flashOnly($keys){ + public static function flashOnly($keys) + { \Illuminate\Http\Request::flashOnly($keys); } @@ -8884,7 +9605,8 @@ namespace { * @return void * @static */ - public static function flashExcept($keys){ + public static function flashExcept($keys) + { \Illuminate\Http\Request::flashExcept($keys); } @@ -8894,7 +9616,8 @@ namespace { * @return void * @static */ - public static function flush(){ + public static function flush() + { \Illuminate\Http\Request::flush(); } @@ -8906,7 +9629,8 @@ namespace { * @return string|array * @static */ - public static function server($key = null, $default = null){ + public static function server($key = null, $default = null) + { return \Illuminate\Http\Request::server($key, $default); } @@ -8917,7 +9641,8 @@ namespace { * @return bool * @static */ - public static function hasHeader($key){ + public static function hasHeader($key) + { return \Illuminate\Http\Request::hasHeader($key); } @@ -8929,7 +9654,8 @@ namespace { * @return string|array * @static */ - public static function header($key = null, $default = null){ + public static function header($key = null, $default = null) + { return \Illuminate\Http\Request::header($key, $default); } @@ -8939,7 +9665,8 @@ namespace { * @return string|null * @static */ - public static function bearerToken(){ + public static function bearerToken() + { return \Illuminate\Http\Request::bearerToken(); } @@ -8950,7 +9677,8 @@ namespace { * @return bool * @static */ - public static function exists($key){ + public static function exists($key) + { return \Illuminate\Http\Request::exists($key); } @@ -8961,7 +9689,8 @@ namespace { * @return bool * @static */ - public static function has($key){ + public static function has($key) + { return \Illuminate\Http\Request::has($key); } @@ -8971,7 +9700,8 @@ namespace { * @return array * @static */ - public static function all(){ + public static function all() + { return \Illuminate\Http\Request::all(); } @@ -8983,7 +9713,8 @@ namespace { * @return string|array * @static */ - public static function input($key = null, $default = null){ + public static function input($key = null, $default = null) + { return \Illuminate\Http\Request::input($key, $default); } @@ -8994,7 +9725,8 @@ namespace { * @return array * @static */ - public static function only($keys){ + public static function only($keys) + { return \Illuminate\Http\Request::only($keys); } @@ -9005,7 +9737,8 @@ namespace { * @return array * @static */ - public static function except($keys){ + public static function except($keys) + { return \Illuminate\Http\Request::except($keys); } @@ -9016,7 +9749,8 @@ namespace { * @return array * @static */ - public static function intersect($keys){ + public static function intersect($keys) + { return \Illuminate\Http\Request::intersect($keys); } @@ -9028,7 +9762,8 @@ namespace { * @return string|array * @static */ - public static function query($key = null, $default = null){ + public static function query($key = null, $default = null) + { return \Illuminate\Http\Request::query($key, $default); } @@ -9039,7 +9774,8 @@ namespace { * @return bool * @static */ - public static function hasCookie($key){ + public static function hasCookie($key) + { return \Illuminate\Http\Request::hasCookie($key); } @@ -9051,7 +9787,8 @@ namespace { * @return string|array * @static */ - public static function cookie($key = null, $default = null){ + public static function cookie($key = null, $default = null) + { return \Illuminate\Http\Request::cookie($key, $default); } @@ -9061,7 +9798,8 @@ namespace { * @return array * @static */ - public static function allFiles(){ + public static function allFiles() + { return \Illuminate\Http\Request::allFiles(); } @@ -9072,7 +9810,8 @@ namespace { * @return bool * @static */ - public static function hasFile($key){ + public static function hasFile($key) + { return \Illuminate\Http\Request::hasFile($key); } @@ -9084,7 +9823,8 @@ namespace { * @return \Illuminate\Http\UploadedFile|array|null * @static */ - public static function file($key = null, $default = null){ + public static function file($key = null, $default = null) + { return \Illuminate\Http\Request::file($key, $default); } @@ -9096,7 +9836,8 @@ namespace { * @return void * @static */ - public static function macro($name, $macro){ + public static function macro($name, $macro) + { \Illuminate\Http\Request::macro($name, $macro); } @@ -9107,15 +9848,15 @@ namespace { * @return bool * @static */ - public static function hasMacro($name){ + public static function hasMacro($name) + { return \Illuminate\Http\Request::hasMacro($name); } - } - class Response extends \Illuminate\Support\Facades\Response{ - + class Response extends \Illuminate\Support\Facades\Response + { /** * Return a new response from the application. * @@ -9125,7 +9866,8 @@ namespace { * @return \Illuminate\Http\Response * @static */ - public static function make($content = '', $status = 200, $headers = array()){ + public static function make($content = '', $status = 200, $headers = []) + { return \Illuminate\Routing\ResponseFactory::make($content, $status, $headers); } @@ -9139,7 +9881,8 @@ namespace { * @return \Illuminate\Http\Response * @static */ - public static function view($view, $data = array(), $status = 200, $headers = array()){ + public static function view($view, $data = [], $status = 200, $headers = []) + { return \Illuminate\Routing\ResponseFactory::view($view, $data, $status, $headers); } @@ -9153,7 +9896,8 @@ namespace { * @return \Illuminate\Http\JsonResponse * @static */ - public static function json($data = array(), $status = 200, $headers = array(), $options = 0){ + public static function json($data = [], $status = 200, $headers = [], $options = 0) + { return \Illuminate\Routing\ResponseFactory::json($data, $status, $headers, $options); } @@ -9168,7 +9912,8 @@ namespace { * @return \Illuminate\Http\JsonResponse * @static */ - public static function jsonp($callback, $data = array(), $status = 200, $headers = array(), $options = 0){ + public static function jsonp($callback, $data = [], $status = 200, $headers = [], $options = 0) + { return \Illuminate\Routing\ResponseFactory::jsonp($callback, $data, $status, $headers, $options); } @@ -9181,7 +9926,8 @@ namespace { * @return \Symfony\Component\HttpFoundation\StreamedResponse * @static */ - public static function stream($callback, $status = 200, $headers = array()){ + public static function stream($callback, $status = 200, $headers = []) + { return \Illuminate\Routing\ResponseFactory::stream($callback, $status, $headers); } @@ -9195,7 +9941,8 @@ namespace { * @return \Symfony\Component\HttpFoundation\BinaryFileResponse * @static */ - public static function download($file, $name = null, $headers = array(), $disposition = 'attachment'){ + public static function download($file, $name = null, $headers = [], $disposition = 'attachment') + { return \Illuminate\Routing\ResponseFactory::download($file, $name, $headers, $disposition); } @@ -9207,7 +9954,8 @@ namespace { * @return \Symfony\Component\HttpFoundation\BinaryFileResponse * @static */ - public static function file($file, $headers = array()){ + public static function file($file, $headers = []) + { return \Illuminate\Routing\ResponseFactory::file($file, $headers); } @@ -9221,7 +9969,8 @@ namespace { * @return \Illuminate\Http\RedirectResponse * @static */ - public static function redirectTo($path, $status = 302, $headers = array(), $secure = null){ + public static function redirectTo($path, $status = 302, $headers = [], $secure = null) + { return \Illuminate\Routing\ResponseFactory::redirectTo($path, $status, $headers, $secure); } @@ -9235,7 +9984,8 @@ namespace { * @return \Illuminate\Http\RedirectResponse * @static */ - public static function redirectToRoute($route, $parameters = array(), $status = 302, $headers = array()){ + public static function redirectToRoute($route, $parameters = [], $status = 302, $headers = []) + { return \Illuminate\Routing\ResponseFactory::redirectToRoute($route, $parameters, $status, $headers); } @@ -9249,7 +9999,8 @@ namespace { * @return \Illuminate\Http\RedirectResponse * @static */ - public static function redirectToAction($action, $parameters = array(), $status = 302, $headers = array()){ + public static function redirectToAction($action, $parameters = [], $status = 302, $headers = []) + { return \Illuminate\Routing\ResponseFactory::redirectToAction($action, $parameters, $status, $headers); } @@ -9263,7 +10014,8 @@ namespace { * @return \Illuminate\Http\RedirectResponse * @static */ - public static function redirectGuest($path, $status = 302, $headers = array(), $secure = null){ + public static function redirectGuest($path, $status = 302, $headers = [], $secure = null) + { return \Illuminate\Routing\ResponseFactory::redirectGuest($path, $status, $headers, $secure); } @@ -9277,7 +10029,8 @@ namespace { * @return \Illuminate\Http\RedirectResponse * @static */ - public static function redirectToIntended($default = '/', $status = 302, $headers = array(), $secure = null){ + public static function redirectToIntended($default = '/', $status = 302, $headers = [], $secure = null) + { return \Illuminate\Routing\ResponseFactory::redirectToIntended($default, $status, $headers, $secure); } @@ -9289,7 +10042,8 @@ namespace { * @return void * @static */ - public static function macro($name, $macro){ + public static function macro($name, $macro) + { \Illuminate\Routing\ResponseFactory::macro($name, $macro); } @@ -9300,15 +10054,15 @@ namespace { * @return bool * @static */ - public static function hasMacro($name){ + public static function hasMacro($name) + { return \Illuminate\Routing\ResponseFactory::hasMacro($name); } - } - class Route extends \Illuminate\Support\Facades\Route{ - + class Route extends \Illuminate\Support\Facades\Route + { /** * Register a new GET route with the router. * @@ -9317,7 +10071,8 @@ namespace { * @return \Illuminate\Routing\Route * @static */ - public static function get($uri, $action = null){ + public static function get($uri, $action = null) + { return \Illuminate\Routing\Router::get($uri, $action); } @@ -9329,7 +10084,8 @@ namespace { * @return \Illuminate\Routing\Route * @static */ - public static function post($uri, $action = null){ + public static function post($uri, $action = null) + { return \Illuminate\Routing\Router::post($uri, $action); } @@ -9341,7 +10097,8 @@ namespace { * @return \Illuminate\Routing\Route * @static */ - public static function put($uri, $action = null){ + public static function put($uri, $action = null) + { return \Illuminate\Routing\Router::put($uri, $action); } @@ -9353,7 +10110,8 @@ namespace { * @return \Illuminate\Routing\Route * @static */ - public static function patch($uri, $action = null){ + public static function patch($uri, $action = null) + { return \Illuminate\Routing\Router::patch($uri, $action); } @@ -9365,7 +10123,8 @@ namespace { * @return \Illuminate\Routing\Route * @static */ - public static function delete($uri, $action = null){ + public static function delete($uri, $action = null) + { return \Illuminate\Routing\Router::delete($uri, $action); } @@ -9377,7 +10136,8 @@ namespace { * @return \Illuminate\Routing\Route * @static */ - public static function options($uri, $action = null){ + public static function options($uri, $action = null) + { return \Illuminate\Routing\Router::options($uri, $action); } @@ -9389,7 +10149,8 @@ namespace { * @return \Illuminate\Routing\Route * @static */ - public static function any($uri, $action = null){ + public static function any($uri, $action = null) + { return \Illuminate\Routing\Router::any($uri, $action); } @@ -9402,7 +10163,8 @@ namespace { * @return \Illuminate\Routing\Route * @static */ - public static function match($methods, $uri, $action = null){ + public static function match($methods, $uri, $action = null) + { return \Illuminate\Routing\Router::match($methods, $uri, $action); } @@ -9413,7 +10175,8 @@ namespace { * @return void * @static */ - public static function resources($resources){ + public static function resources($resources) + { \Illuminate\Routing\Router::resources($resources); } @@ -9426,7 +10189,8 @@ namespace { * @return void * @static */ - public static function resource($name, $controller, $options = array()){ + public static function resource($name, $controller, $options = []) + { \Illuminate\Routing\Router::resource($name, $controller, $options); } @@ -9438,7 +10202,8 @@ namespace { * @return void * @static */ - public static function group($attributes, $routes){ + public static function group($attributes, $routes) + { \Illuminate\Routing\Router::group($attributes, $routes); } @@ -9449,7 +10214,8 @@ namespace { * @return array * @static */ - public static function mergeWithLastGroup($new){ + public static function mergeWithLastGroup($new) + { return \Illuminate\Routing\Router::mergeWithLastGroup($new); } @@ -9459,7 +10225,8 @@ namespace { * @return string * @static */ - public static function getLastGroupPrefix(){ + public static function getLastGroupPrefix() + { return \Illuminate\Routing\Router::getLastGroupPrefix(); } @@ -9470,7 +10237,8 @@ namespace { * @return \Illuminate\Http\Response * @static */ - public static function dispatch($request){ + public static function dispatch($request) + { return \Illuminate\Routing\Router::dispatch($request); } @@ -9481,7 +10249,8 @@ namespace { * @return mixed * @static */ - public static function dispatchToRoute($request){ + public static function dispatchToRoute($request) + { return \Illuminate\Routing\Router::dispatchToRoute($request); } @@ -9492,7 +10261,8 @@ namespace { * @return array * @static */ - public static function gatherRouteMiddleware($route){ + public static function gatherRouteMiddleware($route) + { return \Illuminate\Routing\Router::gatherRouteMiddleware($route); } @@ -9504,7 +10274,8 @@ namespace { * @return \Illuminate\Http\Response * @static */ - public static function prepareResponse($request, $response){ + public static function prepareResponse($request, $response) + { return \Illuminate\Routing\Router::prepareResponse($request, $response); } @@ -9515,7 +10286,8 @@ namespace { * @return \Illuminate\Routing\Route * @static */ - public static function substituteBindings($route){ + public static function substituteBindings($route) + { return \Illuminate\Routing\Router::substituteBindings($route); } @@ -9526,7 +10298,8 @@ namespace { * @return void * @static */ - public static function substituteImplicitBindings($route){ + public static function substituteImplicitBindings($route) + { \Illuminate\Routing\Router::substituteImplicitBindings($route); } @@ -9537,7 +10310,8 @@ namespace { * @return void * @static */ - public static function matched($callback){ + public static function matched($callback) + { \Illuminate\Routing\Router::matched($callback); } @@ -9547,7 +10321,8 @@ namespace { * @return array * @static */ - public static function getMiddleware(){ + public static function getMiddleware() + { return \Illuminate\Routing\Router::getMiddleware(); } @@ -9559,7 +10334,8 @@ namespace { * @return $this * @static */ - public static function aliasMiddleware($name, $class){ + public static function aliasMiddleware($name, $class) + { return \Illuminate\Routing\Router::aliasMiddleware($name, $class); } @@ -9570,7 +10346,8 @@ namespace { * @return bool * @static */ - public static function hasMiddlewareGroup($name){ + public static function hasMiddlewareGroup($name) + { return \Illuminate\Routing\Router::hasMiddlewareGroup($name); } @@ -9580,7 +10357,8 @@ namespace { * @return array * @static */ - public static function getMiddlewareGroups(){ + public static function getMiddlewareGroups() + { return \Illuminate\Routing\Router::getMiddlewareGroups(); } @@ -9592,7 +10370,8 @@ namespace { * @return $this * @static */ - public static function middlewareGroup($name, $middleware){ + public static function middlewareGroup($name, $middleware) + { return \Illuminate\Routing\Router::middlewareGroup($name, $middleware); } @@ -9606,7 +10385,8 @@ namespace { * @return $this * @static */ - public static function prependMiddlewareToGroup($group, $middleware){ + public static function prependMiddlewareToGroup($group, $middleware) + { return \Illuminate\Routing\Router::prependMiddlewareToGroup($group, $middleware); } @@ -9620,7 +10400,8 @@ namespace { * @return $this * @static */ - public static function pushMiddlewareToGroup($group, $middleware){ + public static function pushMiddlewareToGroup($group, $middleware) + { return \Illuminate\Routing\Router::pushMiddlewareToGroup($group, $middleware); } @@ -9632,7 +10413,8 @@ namespace { * @return void * @static */ - public static function bind($key, $binder){ + public static function bind($key, $binder) + { \Illuminate\Routing\Router::bind($key, $binder); } @@ -9646,7 +10428,8 @@ namespace { * @throws \Illuminate\Database\Eloquent\ModelNotFoundException * @static */ - public static function model($key, $class, $callback = null){ + public static function model($key, $class, $callback = null) + { \Illuminate\Routing\Router::model($key, $class, $callback); } @@ -9657,7 +10440,8 @@ namespace { * @return \Closure|null * @static */ - public static function getBindingCallback($key){ + public static function getBindingCallback($key) + { return \Illuminate\Routing\Router::getBindingCallback($key); } @@ -9667,7 +10451,8 @@ namespace { * @return array * @static */ - public static function getPatterns(){ + public static function getPatterns() + { return \Illuminate\Routing\Router::getPatterns(); } @@ -9679,7 +10464,8 @@ namespace { * @return void * @static */ - public static function pattern($key, $pattern){ + public static function pattern($key, $pattern) + { \Illuminate\Routing\Router::pattern($key, $pattern); } @@ -9690,7 +10476,8 @@ namespace { * @return void * @static */ - public static function patterns($patterns){ + public static function patterns($patterns) + { \Illuminate\Routing\Router::patterns($patterns); } @@ -9700,7 +10487,8 @@ namespace { * @return bool * @static */ - public static function hasGroupStack(){ + public static function hasGroupStack() + { return \Illuminate\Routing\Router::hasGroupStack(); } @@ -9710,7 +10498,8 @@ namespace { * @return array * @static */ - public static function getGroupStack(){ + public static function getGroupStack() + { return \Illuminate\Routing\Router::getGroupStack(); } @@ -9722,7 +10511,8 @@ namespace { * @return mixed * @static */ - public static function input($key, $default = null){ + public static function input($key, $default = null) + { return \Illuminate\Routing\Router::input($key, $default); } @@ -9732,7 +10522,8 @@ namespace { * @return \Illuminate\Http\Request * @static */ - public static function getCurrentRequest(){ + public static function getCurrentRequest() + { return \Illuminate\Routing\Router::getCurrentRequest(); } @@ -9742,7 +10533,8 @@ namespace { * @return \Illuminate\Routing\Route * @static */ - public static function getCurrentRoute(){ + public static function getCurrentRoute() + { return \Illuminate\Routing\Router::getCurrentRoute(); } @@ -9752,7 +10544,8 @@ namespace { * @return \Illuminate\Routing\Route * @static */ - public static function current(){ + public static function current() + { return \Illuminate\Routing\Router::current(); } @@ -9763,7 +10556,8 @@ namespace { * @return bool * @static */ - public static function has($name){ + public static function has($name) + { return \Illuminate\Routing\Router::has($name); } @@ -9773,7 +10567,8 @@ namespace { * @return string|null * @static */ - public static function currentRouteName(){ + public static function currentRouteName() + { return \Illuminate\Routing\Router::currentRouteName(); } @@ -9783,7 +10578,8 @@ namespace { * @return bool * @static */ - public static function is(){ + public static function is() + { return \Illuminate\Routing\Router::is(); } @@ -9794,7 +10590,8 @@ namespace { * @return bool * @static */ - public static function currentRouteNamed($name){ + public static function currentRouteNamed($name) + { return \Illuminate\Routing\Router::currentRouteNamed($name); } @@ -9804,7 +10601,8 @@ namespace { * @return string|null * @static */ - public static function currentRouteAction(){ + public static function currentRouteAction() + { return \Illuminate\Routing\Router::currentRouteAction(); } @@ -9814,7 +10612,8 @@ namespace { * @return bool * @static */ - public static function uses(){ + public static function uses() + { return \Illuminate\Routing\Router::uses(); } @@ -9825,7 +10624,8 @@ namespace { * @return bool * @static */ - public static function currentRouteUses($action){ + public static function currentRouteUses($action) + { return \Illuminate\Routing\Router::currentRouteUses($action); } @@ -9835,7 +10635,8 @@ namespace { * @return void * @static */ - public static function auth(){ + public static function auth() + { \Illuminate\Routing\Router::auth(); } @@ -9846,7 +10647,8 @@ namespace { * @return void * @static */ - public static function singularResourceParameters($singular = true){ + public static function singularResourceParameters($singular = true) + { \Illuminate\Routing\Router::singularResourceParameters($singular); } @@ -9857,7 +10659,8 @@ namespace { * @return void * @static */ - public static function resourceParameters($parameters = array()){ + public static function resourceParameters($parameters = []) + { \Illuminate\Routing\Router::resourceParameters($parameters); } @@ -9868,7 +10671,8 @@ namespace { * @return array|null * @static */ - public static function resourceVerbs($verbs = array()){ + public static function resourceVerbs($verbs = []) + { return \Illuminate\Routing\Router::resourceVerbs($verbs); } @@ -9878,7 +10682,8 @@ namespace { * @return \Illuminate\Routing\RouteCollection * @static */ - public static function getRoutes(){ + public static function getRoutes() + { return \Illuminate\Routing\Router::getRoutes(); } @@ -9889,7 +10694,8 @@ namespace { * @return void * @static */ - public static function setRoutes($routes){ + public static function setRoutes($routes) + { \Illuminate\Routing\Router::setRoutes($routes); } @@ -9901,7 +10707,8 @@ namespace { * @return void * @static */ - public static function macro($name, $macro){ + public static function macro($name, $macro) + { \Illuminate\Routing\Router::macro($name, $macro); } @@ -9912,7 +10719,8 @@ namespace { * @return bool * @static */ - public static function hasMacro($name){ + public static function hasMacro($name) + { return \Illuminate\Routing\Router::hasMacro($name); } @@ -9925,15 +10733,15 @@ namespace { * @throws \BadMethodCallException * @static */ - public static function macroCall($method, $parameters){ + public static function macroCall($method, $parameters) + { return \Illuminate\Routing\Router::macroCall($method, $parameters); } - } - class Schema extends \Illuminate\Support\Facades\Schema{ - + class Schema extends \Illuminate\Support\Facades\Schema + { /** * Determine if the given table exists. * @@ -9941,7 +10749,8 @@ namespace { * @return bool * @static */ - public static function hasTable($table){ + public static function hasTable($table) + { return \Illuminate\Database\Schema\MySqlBuilder::hasTable($table); } @@ -9952,7 +10761,8 @@ namespace { * @return array * @static */ - public static function getColumnListing($table){ + public static function getColumnListing($table) + { return \Illuminate\Database\Schema\MySqlBuilder::getColumnListing($table); } @@ -9963,7 +10773,8 @@ namespace { * @return void * @static */ - public static function defaultStringLength($length){ + public static function defaultStringLength($length) + { //Method inherited from \Illuminate\Database\Schema\Builder \Illuminate\Database\Schema\MySqlBuilder::defaultStringLength($length); } @@ -9976,7 +10787,8 @@ namespace { * @return bool * @static */ - public static function hasColumn($table, $column){ + public static function hasColumn($table, $column) + { //Method inherited from \Illuminate\Database\Schema\Builder return \Illuminate\Database\Schema\MySqlBuilder::hasColumn($table, $column); } @@ -9989,7 +10801,8 @@ namespace { * @return bool * @static */ - public static function hasColumns($table, $columns){ + public static function hasColumns($table, $columns) + { //Method inherited from \Illuminate\Database\Schema\Builder return \Illuminate\Database\Schema\MySqlBuilder::hasColumns($table, $columns); } @@ -10002,7 +10815,8 @@ namespace { * @return string * @static */ - public static function getColumnType($table, $column){ + public static function getColumnType($table, $column) + { //Method inherited from \Illuminate\Database\Schema\Builder return \Illuminate\Database\Schema\MySqlBuilder::getColumnType($table, $column); } @@ -10015,7 +10829,8 @@ namespace { * @return void * @static */ - public static function table($table, $callback){ + public static function table($table, $callback) + { //Method inherited from \Illuminate\Database\Schema\Builder \Illuminate\Database\Schema\MySqlBuilder::table($table, $callback); } @@ -10028,7 +10843,8 @@ namespace { * @return void * @static */ - public static function create($table, $callback){ + public static function create($table, $callback) + { //Method inherited from \Illuminate\Database\Schema\Builder \Illuminate\Database\Schema\MySqlBuilder::create($table, $callback); } @@ -10040,7 +10856,8 @@ namespace { * @return void * @static */ - public static function drop($table){ + public static function drop($table) + { //Method inherited from \Illuminate\Database\Schema\Builder \Illuminate\Database\Schema\MySqlBuilder::drop($table); } @@ -10052,7 +10869,8 @@ namespace { * @return void * @static */ - public static function dropIfExists($table){ + public static function dropIfExists($table) + { //Method inherited from \Illuminate\Database\Schema\Builder \Illuminate\Database\Schema\MySqlBuilder::dropIfExists($table); } @@ -10065,7 +10883,8 @@ namespace { * @return void * @static */ - public static function rename($from, $to){ + public static function rename($from, $to) + { //Method inherited from \Illuminate\Database\Schema\Builder \Illuminate\Database\Schema\MySqlBuilder::rename($from, $to); } @@ -10076,7 +10895,8 @@ namespace { * @return bool * @static */ - public static function enableForeignKeyConstraints(){ + public static function enableForeignKeyConstraints() + { //Method inherited from \Illuminate\Database\Schema\Builder return \Illuminate\Database\Schema\MySqlBuilder::enableForeignKeyConstraints(); } @@ -10087,7 +10907,8 @@ namespace { * @return bool * @static */ - public static function disableForeignKeyConstraints(){ + public static function disableForeignKeyConstraints() + { //Method inherited from \Illuminate\Database\Schema\Builder return \Illuminate\Database\Schema\MySqlBuilder::disableForeignKeyConstraints(); } @@ -10098,7 +10919,8 @@ namespace { * @return \Illuminate\Database\Connection * @static */ - public static function getConnection(){ + public static function getConnection() + { //Method inherited from \Illuminate\Database\Schema\Builder return \Illuminate\Database\Schema\MySqlBuilder::getConnection(); } @@ -10110,7 +10932,8 @@ namespace { * @return $this * @static */ - public static function setConnection($connection){ + public static function setConnection($connection) + { //Method inherited from \Illuminate\Database\Schema\Builder return \Illuminate\Database\Schema\MySqlBuilder::setConnection($connection); } @@ -10122,23 +10945,24 @@ namespace { * @return void * @static */ - public static function blueprintResolver($resolver){ + public static function blueprintResolver($resolver) + { //Method inherited from \Illuminate\Database\Schema\Builder \Illuminate\Database\Schema\MySqlBuilder::blueprintResolver($resolver); } - } - class Session extends \Illuminate\Support\Facades\Session{ - + class Session extends \Illuminate\Support\Facades\Session + { /** * Get the session configuration. * * @return array * @static */ - public static function getSessionConfig(){ + public static function getSessionConfig() + { return \Illuminate\Session\SessionManager::getSessionConfig(); } @@ -10148,7 +10972,8 @@ namespace { * @return string * @static */ - public static function getDefaultDriver(){ + public static function getDefaultDriver() + { return \Illuminate\Session\SessionManager::getDefaultDriver(); } @@ -10159,7 +10984,8 @@ namespace { * @return void * @static */ - public static function setDefaultDriver($name){ + public static function setDefaultDriver($name) + { \Illuminate\Session\SessionManager::setDefaultDriver($name); } @@ -10170,7 +10996,8 @@ namespace { * @return mixed * @static */ - public static function driver($driver = null){ + public static function driver($driver = null) + { //Method inherited from \Illuminate\Support\Manager return \Illuminate\Session\SessionManager::driver($driver); } @@ -10183,7 +11010,8 @@ namespace { * @return $this * @static */ - public static function extend($driver, $callback){ + public static function extend($driver, $callback) + { //Method inherited from \Illuminate\Support\Manager return \Illuminate\Session\SessionManager::extend($driver, $callback); } @@ -10194,7 +11022,8 @@ namespace { * @return array * @static */ - public static function getDrivers(){ + public static function getDrivers() + { //Method inherited from \Illuminate\Support\Manager return \Illuminate\Session\SessionManager::getDrivers(); } @@ -10205,7 +11034,8 @@ namespace { * @return bool * @static */ - public static function start(){ + public static function start() + { return \Illuminate\Session\Store::start(); } @@ -10215,7 +11045,8 @@ namespace { * @return bool * @static */ - public static function save(){ + public static function save() + { return \Illuminate\Session\Store::save(); } @@ -10225,7 +11056,8 @@ namespace { * @return void * @static */ - public static function ageFlashData(){ + public static function ageFlashData() + { \Illuminate\Session\Store::ageFlashData(); } @@ -10235,7 +11067,8 @@ namespace { * @return array * @static */ - public static function all(){ + public static function all() + { return \Illuminate\Session\Store::all(); } @@ -10246,7 +11079,8 @@ namespace { * @return bool * @static */ - public static function exists($key){ + public static function exists($key) + { return \Illuminate\Session\Store::exists($key); } @@ -10257,7 +11091,8 @@ namespace { * @return bool * @static */ - public static function has($key){ + public static function has($key) + { return \Illuminate\Session\Store::has($key); } @@ -10269,7 +11104,8 @@ namespace { * @return mixed * @static */ - public static function get($key, $default = null){ + public static function get($key, $default = null) + { return \Illuminate\Session\Store::get($key, $default); } @@ -10281,7 +11117,8 @@ namespace { * @return mixed * @static */ - public static function pull($key, $default = null){ + public static function pull($key, $default = null) + { return \Illuminate\Session\Store::pull($key, $default); } @@ -10292,7 +11129,8 @@ namespace { * @return bool * @static */ - public static function hasOldInput($key = null){ + public static function hasOldInput($key = null) + { return \Illuminate\Session\Store::hasOldInput($key); } @@ -10304,7 +11142,8 @@ namespace { * @return mixed * @static */ - public static function getOldInput($key = null, $default = null){ + public static function getOldInput($key = null, $default = null) + { return \Illuminate\Session\Store::getOldInput($key, $default); } @@ -10315,7 +11154,8 @@ namespace { * @return void * @static */ - public static function replace($attributes){ + public static function replace($attributes) + { \Illuminate\Session\Store::replace($attributes); } @@ -10327,7 +11167,8 @@ namespace { * @return void * @static */ - public static function put($key, $value = null){ + public static function put($key, $value = null) + { \Illuminate\Session\Store::put($key, $value); } @@ -10339,7 +11180,8 @@ namespace { * @return mixed * @static */ - public static function remember($key, $callback){ + public static function remember($key, $callback) + { return \Illuminate\Session\Store::remember($key, $callback); } @@ -10351,7 +11193,8 @@ namespace { * @return void * @static */ - public static function push($key, $value){ + public static function push($key, $value) + { \Illuminate\Session\Store::push($key, $value); } @@ -10363,7 +11206,8 @@ namespace { * @return mixed * @static */ - public static function increment($key, $amount = 1){ + public static function increment($key, $amount = 1) + { return \Illuminate\Session\Store::increment($key, $amount); } @@ -10375,7 +11219,8 @@ namespace { * @return int * @static */ - public static function decrement($key, $amount = 1){ + public static function decrement($key, $amount = 1) + { return \Illuminate\Session\Store::decrement($key, $amount); } @@ -10387,7 +11232,8 @@ namespace { * @return void * @static */ - public static function flash($key, $value){ + public static function flash($key, $value) + { \Illuminate\Session\Store::flash($key, $value); } @@ -10399,7 +11245,8 @@ namespace { * @return void * @static */ - public static function now($key, $value){ + public static function now($key, $value) + { \Illuminate\Session\Store::now($key, $value); } @@ -10409,7 +11256,8 @@ namespace { * @return void * @static */ - public static function reflash(){ + public static function reflash() + { \Illuminate\Session\Store::reflash(); } @@ -10420,7 +11268,8 @@ namespace { * @return void * @static */ - public static function keep($keys = null){ + public static function keep($keys = null) + { \Illuminate\Session\Store::keep($keys); } @@ -10431,7 +11280,8 @@ namespace { * @return void * @static */ - public static function flashInput($value){ + public static function flashInput($value) + { \Illuminate\Session\Store::flashInput($value); } @@ -10442,7 +11292,8 @@ namespace { * @return mixed * @static */ - public static function remove($key){ + public static function remove($key) + { return \Illuminate\Session\Store::remove($key); } @@ -10453,7 +11304,8 @@ namespace { * @return void * @static */ - public static function forget($keys){ + public static function forget($keys) + { \Illuminate\Session\Store::forget($keys); } @@ -10463,7 +11315,8 @@ namespace { * @return void * @static */ - public static function flush(){ + public static function flush() + { \Illuminate\Session\Store::flush(); } @@ -10473,7 +11326,8 @@ namespace { * @return bool * @static */ - public static function invalidate(){ + public static function invalidate() + { return \Illuminate\Session\Store::invalidate(); } @@ -10484,7 +11338,8 @@ namespace { * @return bool * @static */ - public static function regenerate($destroy = false){ + public static function regenerate($destroy = false) + { return \Illuminate\Session\Store::regenerate($destroy); } @@ -10495,7 +11350,8 @@ namespace { * @return bool * @static */ - public static function migrate($destroy = false){ + public static function migrate($destroy = false) + { return \Illuminate\Session\Store::migrate($destroy); } @@ -10505,7 +11361,8 @@ namespace { * @return bool * @static */ - public static function isStarted(){ + public static function isStarted() + { return \Illuminate\Session\Store::isStarted(); } @@ -10515,7 +11372,8 @@ namespace { * @return string * @static */ - public static function getName(){ + public static function getName() + { return \Illuminate\Session\Store::getName(); } @@ -10526,7 +11384,8 @@ namespace { * @return void * @static */ - public static function setName($name){ + public static function setName($name) + { \Illuminate\Session\Store::setName($name); } @@ -10536,7 +11395,8 @@ namespace { * @return string * @static */ - public static function getId(){ + public static function getId() + { return \Illuminate\Session\Store::getId(); } @@ -10547,7 +11407,8 @@ namespace { * @return void * @static */ - public static function setId($id){ + public static function setId($id) + { \Illuminate\Session\Store::setId($id); } @@ -10558,7 +11419,8 @@ namespace { * @return bool * @static */ - public static function isValidId($id){ + public static function isValidId($id) + { return \Illuminate\Session\Store::isValidId($id); } @@ -10569,7 +11431,8 @@ namespace { * @return void * @static */ - public static function setExists($value){ + public static function setExists($value) + { \Illuminate\Session\Store::setExists($value); } @@ -10579,7 +11442,8 @@ namespace { * @return string * @static */ - public static function token(){ + public static function token() + { return \Illuminate\Session\Store::token(); } @@ -10589,7 +11453,8 @@ namespace { * @return void * @static */ - public static function regenerateToken(){ + public static function regenerateToken() + { \Illuminate\Session\Store::regenerateToken(); } @@ -10599,7 +11464,8 @@ namespace { * @return string|null * @static */ - public static function previousUrl(){ + public static function previousUrl() + { return \Illuminate\Session\Store::previousUrl(); } @@ -10610,7 +11476,8 @@ namespace { * @return void * @static */ - public static function setPreviousUrl($url){ + public static function setPreviousUrl($url) + { \Illuminate\Session\Store::setPreviousUrl($url); } @@ -10620,7 +11487,8 @@ namespace { * @return \SessionHandlerInterface * @static */ - public static function getHandler(){ + public static function getHandler() + { return \Illuminate\Session\Store::getHandler(); } @@ -10630,7 +11498,8 @@ namespace { * @return bool * @static */ - public static function handlerNeedsRequest(){ + public static function handlerNeedsRequest() + { return \Illuminate\Session\Store::handlerNeedsRequest(); } @@ -10641,15 +11510,15 @@ namespace { * @return void * @static */ - public static function setRequestOnHandler($request){ + public static function setRequestOnHandler($request) + { \Illuminate\Session\Store::setRequestOnHandler($request); } - } - class Storage extends \Illuminate\Support\Facades\Storage{ - + class Storage extends \Illuminate\Support\Facades\Storage + { /** * Get a filesystem instance. * @@ -10657,7 +11526,8 @@ namespace { * @return \Illuminate\Filesystem\FilesystemAdapter * @static */ - public static function drive($name = null){ + public static function drive($name = null) + { return \Illuminate\Filesystem\FilesystemManager::drive($name); } @@ -10668,7 +11538,8 @@ namespace { * @return \Illuminate\Filesystem\FilesystemAdapter * @static */ - public static function disk($name = null){ + public static function disk($name = null) + { return \Illuminate\Filesystem\FilesystemManager::disk($name); } @@ -10678,7 +11549,8 @@ namespace { * @return \Illuminate\Filesystem\FilesystemAdapter * @static */ - public static function cloud(){ + public static function cloud() + { return \Illuminate\Filesystem\FilesystemManager::cloud(); } @@ -10689,7 +11561,8 @@ namespace { * @return \Illuminate\Filesystem\FilesystemAdapter * @static */ - public static function createLocalDriver($config){ + public static function createLocalDriver($config) + { return \Illuminate\Filesystem\FilesystemManager::createLocalDriver($config); } @@ -10700,7 +11573,8 @@ namespace { * @return \Illuminate\Filesystem\FilesystemAdapter * @static */ - public static function createFtpDriver($config){ + public static function createFtpDriver($config) + { return \Illuminate\Filesystem\FilesystemManager::createFtpDriver($config); } @@ -10711,7 +11585,8 @@ namespace { * @return \Illuminate\Contracts\Filesystem\Cloud * @static */ - public static function createS3Driver($config){ + public static function createS3Driver($config) + { return \Illuminate\Filesystem\FilesystemManager::createS3Driver($config); } @@ -10722,7 +11597,8 @@ namespace { * @return \Illuminate\Contracts\Filesystem\Cloud * @static */ - public static function createRackspaceDriver($config){ + public static function createRackspaceDriver($config) + { return \Illuminate\Filesystem\FilesystemManager::createRackspaceDriver($config); } @@ -10732,7 +11608,8 @@ namespace { * @return string * @static */ - public static function getDefaultDriver(){ + public static function getDefaultDriver() + { return \Illuminate\Filesystem\FilesystemManager::getDefaultDriver(); } @@ -10742,7 +11619,8 @@ namespace { * @return string * @static */ - public static function getDefaultCloudDriver(){ + public static function getDefaultCloudDriver() + { return \Illuminate\Filesystem\FilesystemManager::getDefaultCloudDriver(); } @@ -10754,7 +11632,8 @@ namespace { * @return $this * @static */ - public static function extend($driver, $callback){ + public static function extend($driver, $callback) + { return \Illuminate\Filesystem\FilesystemManager::extend($driver, $callback); } @@ -10765,7 +11644,8 @@ namespace { * @return bool * @static */ - public static function exists($path){ + public static function exists($path) + { return \Illuminate\Filesystem\FilesystemAdapter::exists($path); } @@ -10777,7 +11657,8 @@ namespace { * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException * @static */ - public static function get($path){ + public static function get($path) + { return \Illuminate\Filesystem\FilesystemAdapter::get($path); } @@ -10790,7 +11671,8 @@ namespace { * @return bool * @static */ - public static function put($path, $contents, $options = array()){ + public static function put($path, $contents, $options = []) + { return \Illuminate\Filesystem\FilesystemAdapter::put($path, $contents, $options); } @@ -10803,7 +11685,8 @@ namespace { * @return string|false * @static */ - public static function putFile($path, $file, $options = array()){ + public static function putFile($path, $file, $options = []) + { return \Illuminate\Filesystem\FilesystemAdapter::putFile($path, $file, $options); } @@ -10817,7 +11700,8 @@ namespace { * @return string|false * @static */ - public static function putFileAs($path, $file, $name, $options = array()){ + public static function putFileAs($path, $file, $name, $options = []) + { return \Illuminate\Filesystem\FilesystemAdapter::putFileAs($path, $file, $name, $options); } @@ -10828,7 +11712,8 @@ namespace { * @return string * @static */ - public static function getVisibility($path){ + public static function getVisibility($path) + { return \Illuminate\Filesystem\FilesystemAdapter::getVisibility($path); } @@ -10840,7 +11725,8 @@ namespace { * @return void * @static */ - public static function setVisibility($path, $visibility){ + public static function setVisibility($path, $visibility) + { \Illuminate\Filesystem\FilesystemAdapter::setVisibility($path, $visibility); } @@ -10853,7 +11739,8 @@ namespace { * @return int * @static */ - public static function prepend($path, $data, $separator = ''){ + public static function prepend($path, $data, $separator = '') + { return \Illuminate\Filesystem\FilesystemAdapter::prepend($path, $data, $separator); } @@ -10866,7 +11753,8 @@ namespace { * @return int * @static */ - public static function append($path, $data, $separator = ''){ + public static function append($path, $data, $separator = '') + { return \Illuminate\Filesystem\FilesystemAdapter::append($path, $data, $separator); } @@ -10877,7 +11765,8 @@ namespace { * @return bool * @static */ - public static function delete($paths){ + public static function delete($paths) + { return \Illuminate\Filesystem\FilesystemAdapter::delete($paths); } @@ -10889,7 +11778,8 @@ namespace { * @return bool * @static */ - public static function copy($from, $to){ + public static function copy($from, $to) + { return \Illuminate\Filesystem\FilesystemAdapter::copy($from, $to); } @@ -10901,7 +11791,8 @@ namespace { * @return bool * @static */ - public static function move($from, $to){ + public static function move($from, $to) + { return \Illuminate\Filesystem\FilesystemAdapter::move($from, $to); } @@ -10912,7 +11803,8 @@ namespace { * @return int * @static */ - public static function size($path){ + public static function size($path) + { return \Illuminate\Filesystem\FilesystemAdapter::size($path); } @@ -10923,7 +11815,8 @@ namespace { * @return string|false * @static */ - public static function mimeType($path){ + public static function mimeType($path) + { return \Illuminate\Filesystem\FilesystemAdapter::mimeType($path); } @@ -10934,7 +11827,8 @@ namespace { * @return int * @static */ - public static function lastModified($path){ + public static function lastModified($path) + { return \Illuminate\Filesystem\FilesystemAdapter::lastModified($path); } @@ -10945,7 +11839,8 @@ namespace { * @return string * @static */ - public static function url($path){ + public static function url($path) + { return \Illuminate\Filesystem\FilesystemAdapter::url($path); } @@ -10957,7 +11852,8 @@ namespace { * @return array * @static */ - public static function files($directory = null, $recursive = false){ + public static function files($directory = null, $recursive = false) + { return \Illuminate\Filesystem\FilesystemAdapter::files($directory, $recursive); } @@ -10968,7 +11864,8 @@ namespace { * @return array * @static */ - public static function allFiles($directory = null){ + public static function allFiles($directory = null) + { return \Illuminate\Filesystem\FilesystemAdapter::allFiles($directory); } @@ -10980,7 +11877,8 @@ namespace { * @return array * @static */ - public static function directories($directory = null, $recursive = false){ + public static function directories($directory = null, $recursive = false) + { return \Illuminate\Filesystem\FilesystemAdapter::directories($directory, $recursive); } @@ -10991,7 +11889,8 @@ namespace { * @return array * @static */ - public static function allDirectories($directory = null){ + public static function allDirectories($directory = null) + { return \Illuminate\Filesystem\FilesystemAdapter::allDirectories($directory); } @@ -11002,7 +11901,8 @@ namespace { * @return bool * @static */ - public static function makeDirectory($path){ + public static function makeDirectory($path) + { return \Illuminate\Filesystem\FilesystemAdapter::makeDirectory($path); } @@ -11013,7 +11913,8 @@ namespace { * @return bool * @static */ - public static function deleteDirectory($directory){ + public static function deleteDirectory($directory) + { return \Illuminate\Filesystem\FilesystemAdapter::deleteDirectory($directory); } @@ -11023,22 +11924,23 @@ namespace { * @return \League\Flysystem\FilesystemInterface * @static */ - public static function getDriver(){ + public static function getDriver() + { return \Illuminate\Filesystem\FilesystemAdapter::getDriver(); } - } - class URL extends \Illuminate\Support\Facades\URL{ - + class URL extends \Illuminate\Support\Facades\URL + { /** * Get the full URL for the current request. * * @return string * @static */ - public static function full(){ + public static function full() + { return \Illuminate\Routing\UrlGenerator::full(); } @@ -11048,7 +11950,8 @@ namespace { * @return string * @static */ - public static function current(){ + public static function current() + { return \Illuminate\Routing\UrlGenerator::current(); } @@ -11059,7 +11962,8 @@ namespace { * @return string * @static */ - public static function previous($fallback = false){ + public static function previous($fallback = false) + { return \Illuminate\Routing\UrlGenerator::previous($fallback); } @@ -11072,7 +11976,8 @@ namespace { * @return string * @static */ - public static function to($path, $extra = array(), $secure = null){ + public static function to($path, $extra = [], $secure = null) + { return \Illuminate\Routing\UrlGenerator::to($path, $extra, $secure); } @@ -11084,7 +11989,8 @@ namespace { * @return string * @static */ - public static function secure($path, $parameters = array()){ + public static function secure($path, $parameters = []) + { return \Illuminate\Routing\UrlGenerator::secure($path, $parameters); } @@ -11096,7 +12002,8 @@ namespace { * @return string * @static */ - public static function asset($path, $secure = null){ + public static function asset($path, $secure = null) + { return \Illuminate\Routing\UrlGenerator::asset($path, $secure); } @@ -11107,7 +12014,8 @@ namespace { * @return string * @static */ - public static function secureAsset($path){ + public static function secureAsset($path) + { return \Illuminate\Routing\UrlGenerator::secureAsset($path); } @@ -11120,7 +12028,8 @@ namespace { * @return string * @static */ - public static function assetFrom($root, $path, $secure = null){ + public static function assetFrom($root, $path, $secure = null) + { return \Illuminate\Routing\UrlGenerator::assetFrom($root, $path, $secure); } @@ -11131,7 +12040,8 @@ namespace { * @return string * @static */ - public static function formatScheme($secure){ + public static function formatScheme($secure) + { return \Illuminate\Routing\UrlGenerator::formatScheme($secure); } @@ -11145,7 +12055,8 @@ namespace { * @throws \InvalidArgumentException * @static */ - public static function route($name, $parameters = array(), $absolute = true){ + public static function route($name, $parameters = [], $absolute = true) + { return \Illuminate\Routing\UrlGenerator::route($name, $parameters, $absolute); } @@ -11159,7 +12070,8 @@ namespace { * @throws \InvalidArgumentException * @static */ - public static function action($action, $parameters = array(), $absolute = true){ + public static function action($action, $parameters = [], $absolute = true) + { return \Illuminate\Routing\UrlGenerator::action($action, $parameters, $absolute); } @@ -11170,7 +12082,8 @@ namespace { * @return array * @static */ - public static function formatParameters($parameters){ + public static function formatParameters($parameters) + { return \Illuminate\Routing\UrlGenerator::formatParameters($parameters); } @@ -11182,7 +12095,8 @@ namespace { * @return string * @static */ - public static function formatRoot($scheme, $root = null){ + public static function formatRoot($scheme, $root = null) + { return \Illuminate\Routing\UrlGenerator::formatRoot($scheme, $root); } @@ -11194,7 +12108,8 @@ namespace { * @return string * @static */ - public static function format($root, $path){ + public static function format($root, $path) + { return \Illuminate\Routing\UrlGenerator::format($root, $path); } @@ -11205,7 +12120,8 @@ namespace { * @return bool * @static */ - public static function isValidUrl($path){ + public static function isValidUrl($path) + { return \Illuminate\Routing\UrlGenerator::isValidUrl($path); } @@ -11216,7 +12132,8 @@ namespace { * @return void * @static */ - public static function defaults($defaults){ + public static function defaults($defaults) + { \Illuminate\Routing\UrlGenerator::defaults($defaults); } @@ -11227,7 +12144,8 @@ namespace { * @return void * @static */ - public static function forceScheme($schema){ + public static function forceScheme($schema) + { \Illuminate\Routing\UrlGenerator::forceScheme($schema); } @@ -11238,7 +12156,8 @@ namespace { * @return void * @static */ - public static function forceRootUrl($root){ + public static function forceRootUrl($root) + { \Illuminate\Routing\UrlGenerator::forceRootUrl($root); } @@ -11249,7 +12168,8 @@ namespace { * @return $this * @static */ - public static function formatHostUsing($callback){ + public static function formatHostUsing($callback) + { return \Illuminate\Routing\UrlGenerator::formatHostUsing($callback); } @@ -11260,7 +12180,8 @@ namespace { * @return $this * @static */ - public static function formatPathUsing($callback){ + public static function formatPathUsing($callback) + { return \Illuminate\Routing\UrlGenerator::formatPathUsing($callback); } @@ -11270,7 +12191,8 @@ namespace { * @return \Closure * @static */ - public static function pathFormatter(){ + public static function pathFormatter() + { return \Illuminate\Routing\UrlGenerator::pathFormatter(); } @@ -11280,7 +12202,8 @@ namespace { * @return \Illuminate\Http\Request * @static */ - public static function getRequest(){ + public static function getRequest() + { return \Illuminate\Routing\UrlGenerator::getRequest(); } @@ -11291,7 +12214,8 @@ namespace { * @return void * @static */ - public static function setRequest($request){ + public static function setRequest($request) + { \Illuminate\Routing\UrlGenerator::setRequest($request); } @@ -11302,7 +12226,8 @@ namespace { * @return $this * @static */ - public static function setRoutes($routes){ + public static function setRoutes($routes) + { return \Illuminate\Routing\UrlGenerator::setRoutes($routes); } @@ -11313,7 +12238,8 @@ namespace { * @return $this * @static */ - public static function setSessionResolver($sessionResolver){ + public static function setSessionResolver($sessionResolver) + { return \Illuminate\Routing\UrlGenerator::setSessionResolver($sessionResolver); } @@ -11324,7 +12250,8 @@ namespace { * @return $this * @static */ - public static function setRootControllerNamespace($rootNamespace){ + public static function setRootControllerNamespace($rootNamespace) + { return \Illuminate\Routing\UrlGenerator::setRootControllerNamespace($rootNamespace); } @@ -11336,7 +12263,8 @@ namespace { * @return void * @static */ - public static function macro($name, $macro){ + public static function macro($name, $macro) + { \Illuminate\Routing\UrlGenerator::macro($name, $macro); } @@ -11347,15 +12275,15 @@ namespace { * @return bool * @static */ - public static function hasMacro($name){ + public static function hasMacro($name) + { return \Illuminate\Routing\UrlGenerator::hasMacro($name); } - } - class Validator extends \Illuminate\Support\Facades\Validator{ - + class Validator extends \Illuminate\Support\Facades\Validator + { /** * Create a new Validator instance. * @@ -11366,7 +12294,8 @@ namespace { * @return \Illuminate\Validation\Validator * @static */ - public static function make($data, $rules, $messages = array(), $customAttributes = array()){ + public static function make($data, $rules, $messages = [], $customAttributes = []) + { return \Illuminate\Validation\Factory::make($data, $rules, $messages, $customAttributes); } @@ -11381,7 +12310,8 @@ namespace { * @throws \Illuminate\Validation\ValidationException * @static */ - public static function validate($data, $rules, $messages = array(), $customAttributes = array()){ + public static function validate($data, $rules, $messages = [], $customAttributes = []) + { \Illuminate\Validation\Factory::validate($data, $rules, $messages, $customAttributes); } @@ -11394,7 +12324,8 @@ namespace { * @return void * @static */ - public static function extend($rule, $extension, $message = null){ + public static function extend($rule, $extension, $message = null) + { \Illuminate\Validation\Factory::extend($rule, $extension, $message); } @@ -11407,7 +12338,8 @@ namespace { * @return void * @static */ - public static function extendImplicit($rule, $extension, $message = null){ + public static function extendImplicit($rule, $extension, $message = null) + { \Illuminate\Validation\Factory::extendImplicit($rule, $extension, $message); } @@ -11419,7 +12351,8 @@ namespace { * @return void * @static */ - public static function replacer($rule, $replacer){ + public static function replacer($rule, $replacer) + { \Illuminate\Validation\Factory::replacer($rule, $replacer); } @@ -11430,7 +12363,8 @@ namespace { * @return void * @static */ - public static function resolver($resolver){ + public static function resolver($resolver) + { \Illuminate\Validation\Factory::resolver($resolver); } @@ -11440,7 +12374,8 @@ namespace { * @return \Illuminate\Contracts\Translation\Translator * @static */ - public static function getTranslator(){ + public static function getTranslator() + { return \Illuminate\Validation\Factory::getTranslator(); } @@ -11450,7 +12385,8 @@ namespace { * @return \Illuminate\Validation\PresenceVerifierInterface * @static */ - public static function getPresenceVerifier(){ + public static function getPresenceVerifier() + { return \Illuminate\Validation\Factory::getPresenceVerifier(); } @@ -11461,15 +12397,15 @@ namespace { * @return void * @static */ - public static function setPresenceVerifier($presenceVerifier){ + public static function setPresenceVerifier($presenceVerifier) + { \Illuminate\Validation\Factory::setPresenceVerifier($presenceVerifier); } - } - class View extends \Illuminate\Support\Facades\View{ - + class View extends \Illuminate\Support\Facades\View + { /** * Get the evaluated view contents for the given view. * @@ -11479,7 +12415,8 @@ namespace { * @return \Illuminate\Contracts\View\View * @static */ - public static function file($path, $data = array(), $mergeData = array()){ + public static function file($path, $data = [], $mergeData = []) + { return \Illuminate\View\Factory::file($path, $data, $mergeData); } @@ -11492,7 +12429,8 @@ namespace { * @return \Illuminate\Contracts\View\View * @static */ - public static function make($view, $data = array(), $mergeData = array()){ + public static function make($view, $data = [], $mergeData = []) + { return \Illuminate\View\Factory::make($view, $data, $mergeData); } @@ -11506,7 +12444,8 @@ namespace { * @return string * @static */ - public static function renderEach($view, $data, $iterator, $empty = 'raw|'){ + public static function renderEach($view, $data, $iterator, $empty = 'raw|') + { return \Illuminate\View\Factory::renderEach($view, $data, $iterator, $empty); } @@ -11517,7 +12456,8 @@ namespace { * @return bool * @static */ - public static function exists($view){ + public static function exists($view) + { return \Illuminate\View\Factory::exists($view); } @@ -11529,7 +12469,8 @@ namespace { * @throws \InvalidArgumentException * @static */ - public static function getEngineFromPath($path){ + public static function getEngineFromPath($path) + { return \Illuminate\View\Factory::getEngineFromPath($path); } @@ -11541,7 +12482,8 @@ namespace { * @return mixed * @static */ - public static function share($key, $value = null){ + public static function share($key, $value = null) + { return \Illuminate\View\Factory::share($key, $value); } @@ -11551,7 +12493,8 @@ namespace { * @return void * @static */ - public static function incrementRender(){ + public static function incrementRender() + { \Illuminate\View\Factory::incrementRender(); } @@ -11561,7 +12504,8 @@ namespace { * @return void * @static */ - public static function decrementRender(){ + public static function decrementRender() + { \Illuminate\View\Factory::decrementRender(); } @@ -11571,7 +12515,8 @@ namespace { * @return bool * @static */ - public static function doneRendering(){ + public static function doneRendering() + { return \Illuminate\View\Factory::doneRendering(); } @@ -11582,7 +12527,8 @@ namespace { * @return void * @static */ - public static function addLocation($location){ + public static function addLocation($location) + { \Illuminate\View\Factory::addLocation($location); } @@ -11594,7 +12540,8 @@ namespace { * @return $this * @static */ - public static function addNamespace($namespace, $hints){ + public static function addNamespace($namespace, $hints) + { return \Illuminate\View\Factory::addNamespace($namespace, $hints); } @@ -11606,7 +12553,8 @@ namespace { * @return $this * @static */ - public static function prependNamespace($namespace, $hints){ + public static function prependNamespace($namespace, $hints) + { return \Illuminate\View\Factory::prependNamespace($namespace, $hints); } @@ -11618,7 +12566,8 @@ namespace { * @return $this * @static */ - public static function replaceNamespace($namespace, $hints){ + public static function replaceNamespace($namespace, $hints) + { return \Illuminate\View\Factory::replaceNamespace($namespace, $hints); } @@ -11631,7 +12580,8 @@ namespace { * @return void * @static */ - public static function addExtension($extension, $engine, $resolver = null){ + public static function addExtension($extension, $engine, $resolver = null) + { \Illuminate\View\Factory::addExtension($extension, $engine, $resolver); } @@ -11641,7 +12591,8 @@ namespace { * @return void * @static */ - public static function flushState(){ + public static function flushState() + { \Illuminate\View\Factory::flushState(); } @@ -11651,7 +12602,8 @@ namespace { * @return void * @static */ - public static function flushStateIfDoneRendering(){ + public static function flushStateIfDoneRendering() + { \Illuminate\View\Factory::flushStateIfDoneRendering(); } @@ -11661,7 +12613,8 @@ namespace { * @return array * @static */ - public static function getExtensions(){ + public static function getExtensions() + { return \Illuminate\View\Factory::getExtensions(); } @@ -11671,7 +12624,8 @@ namespace { * @return \Illuminate\View\Engines\EngineResolver * @static */ - public static function getEngineResolver(){ + public static function getEngineResolver() + { return \Illuminate\View\Factory::getEngineResolver(); } @@ -11681,7 +12635,8 @@ namespace { * @return \Illuminate\View\ViewFinderInterface * @static */ - public static function getFinder(){ + public static function getFinder() + { return \Illuminate\View\Factory::getFinder(); } @@ -11692,7 +12647,8 @@ namespace { * @return void * @static */ - public static function setFinder($finder){ + public static function setFinder($finder) + { \Illuminate\View\Factory::setFinder($finder); } @@ -11702,7 +12658,8 @@ namespace { * @return void * @static */ - public static function flushFinderCache(){ + public static function flushFinderCache() + { \Illuminate\View\Factory::flushFinderCache(); } @@ -11712,7 +12669,8 @@ namespace { * @return \Illuminate\Contracts\Events\Dispatcher * @static */ - public static function getDispatcher(){ + public static function getDispatcher() + { return \Illuminate\View\Factory::getDispatcher(); } @@ -11723,7 +12681,8 @@ namespace { * @return void * @static */ - public static function setDispatcher($events){ + public static function setDispatcher($events) + { \Illuminate\View\Factory::setDispatcher($events); } @@ -11733,7 +12692,8 @@ namespace { * @return \Illuminate\Contracts\Container\Container * @static */ - public static function getContainer(){ + public static function getContainer() + { return \Illuminate\View\Factory::getContainer(); } @@ -11744,7 +12704,8 @@ namespace { * @return void * @static */ - public static function setContainer($container){ + public static function setContainer($container) + { \Illuminate\View\Factory::setContainer($container); } @@ -11756,7 +12717,8 @@ namespace { * @return mixed * @static */ - public static function shared($key, $default = null){ + public static function shared($key, $default = null) + { return \Illuminate\View\Factory::shared($key, $default); } @@ -11766,7 +12728,8 @@ namespace { * @return array * @static */ - public static function getShared(){ + public static function getShared() + { return \Illuminate\View\Factory::getShared(); } @@ -11778,7 +12741,8 @@ namespace { * @return void * @static */ - public static function startComponent($name, $data = array()){ + public static function startComponent($name, $data = []) + { \Illuminate\View\Factory::startComponent($name, $data); } @@ -11788,7 +12752,8 @@ namespace { * @return string * @static */ - public static function renderComponent(){ + public static function renderComponent() + { return \Illuminate\View\Factory::renderComponent(); } @@ -11800,7 +12765,8 @@ namespace { * @return void * @static */ - public static function slot($name, $content = null){ + public static function slot($name, $content = null) + { \Illuminate\View\Factory::slot($name, $content); } @@ -11810,7 +12776,8 @@ namespace { * @return void * @static */ - public static function endSlot(){ + public static function endSlot() + { \Illuminate\View\Factory::endSlot(); } @@ -11822,7 +12789,8 @@ namespace { * @return array * @static */ - public static function creator($views, $callback){ + public static function creator($views, $callback) + { return \Illuminate\View\Factory::creator($views, $callback); } @@ -11833,7 +12801,8 @@ namespace { * @return array * @static */ - public static function composers($composers){ + public static function composers($composers) + { return \Illuminate\View\Factory::composers($composers); } @@ -11845,7 +12814,8 @@ namespace { * @return array * @static */ - public static function composer($views, $callback){ + public static function composer($views, $callback) + { return \Illuminate\View\Factory::composer($views, $callback); } @@ -11856,7 +12826,8 @@ namespace { * @return void * @static */ - public static function callComposer($view){ + public static function callComposer($view) + { \Illuminate\View\Factory::callComposer($view); } @@ -11867,7 +12838,8 @@ namespace { * @return void * @static */ - public static function callCreator($view){ + public static function callCreator($view) + { \Illuminate\View\Factory::callCreator($view); } @@ -11879,7 +12851,8 @@ namespace { * @return void * @static */ - public static function startSection($section, $content = null){ + public static function startSection($section, $content = null) + { \Illuminate\View\Factory::startSection($section, $content); } @@ -11891,7 +12864,8 @@ namespace { * @return void * @static */ - public static function inject($section, $content){ + public static function inject($section, $content) + { \Illuminate\View\Factory::inject($section, $content); } @@ -11901,7 +12875,8 @@ namespace { * @return string * @static */ - public static function yieldSection(){ + public static function yieldSection() + { return \Illuminate\View\Factory::yieldSection(); } @@ -11913,7 +12888,8 @@ namespace { * @throws \InvalidArgumentException * @static */ - public static function stopSection($overwrite = false){ + public static function stopSection($overwrite = false) + { return \Illuminate\View\Factory::stopSection($overwrite); } @@ -11924,7 +12900,8 @@ namespace { * @throws \InvalidArgumentException * @static */ - public static function appendSection(){ + public static function appendSection() + { return \Illuminate\View\Factory::appendSection(); } @@ -11936,7 +12913,8 @@ namespace { * @return string * @static */ - public static function yieldContent($section, $default = ''){ + public static function yieldContent($section, $default = '') + { return \Illuminate\View\Factory::yieldContent($section, $default); } @@ -11947,7 +12925,8 @@ namespace { * @return string * @static */ - public static function parentPlaceholder($section = ''){ + public static function parentPlaceholder($section = '') + { return \Illuminate\View\Factory::parentPlaceholder($section); } @@ -11958,7 +12937,8 @@ namespace { * @return bool * @static */ - public static function hasSection($name){ + public static function hasSection($name) + { return \Illuminate\View\Factory::hasSection($name); } @@ -11968,7 +12948,8 @@ namespace { * @return array * @static */ - public static function getSections(){ + public static function getSections() + { return \Illuminate\View\Factory::getSections(); } @@ -11978,7 +12959,8 @@ namespace { * @return void * @static */ - public static function flushSections(){ + public static function flushSections() + { \Illuminate\View\Factory::flushSections(); } @@ -11989,7 +12971,8 @@ namespace { * @return void * @static */ - public static function addLoop($data){ + public static function addLoop($data) + { \Illuminate\View\Factory::addLoop($data); } @@ -11999,7 +12982,8 @@ namespace { * @return void * @static */ - public static function incrementLoopIndices(){ + public static function incrementLoopIndices() + { \Illuminate\View\Factory::incrementLoopIndices(); } @@ -12009,7 +12993,8 @@ namespace { * @return void * @static */ - public static function popLoop(){ + public static function popLoop() + { \Illuminate\View\Factory::popLoop(); } @@ -12019,7 +13004,8 @@ namespace { * @return \StdClass|null * @static */ - public static function getLastLoop(){ + public static function getLastLoop() + { return \Illuminate\View\Factory::getLastLoop(); } @@ -12029,7 +13015,8 @@ namespace { * @return array * @static */ - public static function getLoopStack(){ + public static function getLoopStack() + { return \Illuminate\View\Factory::getLoopStack(); } @@ -12041,7 +13028,8 @@ namespace { * @return void * @static */ - public static function startPush($section, $content = ''){ + public static function startPush($section, $content = '') + { \Illuminate\View\Factory::startPush($section, $content); } @@ -12052,7 +13040,8 @@ namespace { * @throws \InvalidArgumentException * @static */ - public static function stopPush(){ + public static function stopPush() + { return \Illuminate\View\Factory::stopPush(); } @@ -12064,7 +13053,8 @@ namespace { * @return string * @static */ - public static function yieldPushContent($section, $default = ''){ + public static function yieldPushContent($section, $default = '') + { return \Illuminate\View\Factory::yieldPushContent($section, $default); } @@ -12074,7 +13064,8 @@ namespace { * @return void * @static */ - public static function flushStacks(){ + public static function flushStacks() + { \Illuminate\View\Factory::flushStacks(); } @@ -12085,7 +13076,8 @@ namespace { * @return void * @static */ - public static function startTranslation($replacements = array()){ + public static function startTranslation($replacements = []) + { \Illuminate\View\Factory::startTranslation($replacements); } @@ -12095,15 +13087,15 @@ namespace { * @return string * @static */ - public static function renderTranslation(){ + public static function renderTranslation() + { return \Illuminate\View\Factory::renderTranslation(); } - } - class JWTAuth extends \Tymon\JWTAuth\Facades\JWTAuth{ - + class JWTAuth extends \Tymon\JWTAuth\Facades\JWTAuth + { /** * Find a user using the user identifier in the subject claim. * @@ -12111,7 +13103,8 @@ namespace { * @return mixed * @static */ - public static function toUser($token = false){ + public static function toUser($token = false) + { return \Tymon\JWTAuth\JWTAuth::toUser($token); } @@ -12123,7 +13116,8 @@ namespace { * @return string * @static */ - public static function fromUser($user, $customClaims = array()){ + public static function fromUser($user, $customClaims = []) + { return \Tymon\JWTAuth\JWTAuth::fromUser($user, $customClaims); } @@ -12135,7 +13129,8 @@ namespace { * @return false|string * @static */ - public static function attempt($credentials = array(), $customClaims = array()){ + public static function attempt($credentials = [], $customClaims = []) + { return \Tymon\JWTAuth\JWTAuth::attempt($credentials, $customClaims); } @@ -12146,7 +13141,8 @@ namespace { * @return mixed * @static */ - public static function authenticate($token = false){ + public static function authenticate($token = false) + { return \Tymon\JWTAuth\JWTAuth::authenticate($token); } @@ -12157,7 +13153,8 @@ namespace { * @return string * @static */ - public static function refresh($token = false){ + public static function refresh($token = false) + { return \Tymon\JWTAuth\JWTAuth::refresh($token); } @@ -12168,7 +13165,8 @@ namespace { * @return bool * @static */ - public static function invalidate($token = false){ + public static function invalidate($token = false) + { return \Tymon\JWTAuth\JWTAuth::invalidate($token); } @@ -12178,7 +13176,8 @@ namespace { * @return bool|string * @static */ - public static function getToken(){ + public static function getToken() + { return \Tymon\JWTAuth\JWTAuth::getToken(); } @@ -12189,7 +13188,8 @@ namespace { * @return \Tymon\JWTAuth\Payload * @static */ - public static function getPayload($token = false){ + public static function getPayload($token = false) + { return \Tymon\JWTAuth\JWTAuth::getPayload($token); } @@ -12200,7 +13200,8 @@ namespace { * @return \JWTAuth * @static */ - public static function parseToken($method = 'bearer', $header = 'authorization', $query = 'token'){ + public static function parseToken($method = 'bearer', $header = 'authorization', $query = 'token') + { return \Tymon\JWTAuth\JWTAuth::parseToken($method, $header, $query); } @@ -12211,7 +13212,8 @@ namespace { * @return $this * @static */ - public static function setIdentifier($identifier){ + public static function setIdentifier($identifier) + { return \Tymon\JWTAuth\JWTAuth::setIdentifier($identifier); } @@ -12221,7 +13223,8 @@ namespace { * @return string * @static */ - public static function getIdentifier(){ + public static function getIdentifier() + { return \Tymon\JWTAuth\JWTAuth::getIdentifier(); } @@ -12232,7 +13235,8 @@ namespace { * @return $this * @static */ - public static function setToken($token){ + public static function setToken($token) + { return \Tymon\JWTAuth\JWTAuth::setToken($token); } @@ -12242,7 +13246,8 @@ namespace { * @param \Request $request * @static */ - public static function setRequest($request){ + public static function setRequest($request) + { return \Tymon\JWTAuth\JWTAuth::setRequest($request); } @@ -12252,14 +13257,11 @@ namespace { * @return \Tymon\JWTAuth\JWTManager * @static */ - public static function manager(){ + public static function manager() + { return \Tymon\JWTAuth\JWTAuth::manager(); } - } } - - - diff --git a/app/Console/Commands/CheckEstimateStatus.php b/app/Console/Commands/CheckEstimateStatus.php index 770c9c3b..12bbc64b 100644 --- a/app/Console/Commands/CheckEstimateStatus.php +++ b/app/Console/Commands/CheckEstimateStatus.php @@ -1,9 +1,10 @@ whereDate('expiry_date', '<', $date)->get(); foreach ($estimates as $estimate) { diff --git a/app/Console/Commands/CheckInvoiceStatus.php b/app/Console/Commands/CheckInvoiceStatus.php index d67ef8a1..4d641d6f 100644 --- a/app/Console/Commands/CheckInvoiceStatus.php +++ b/app/Console/Commands/CheckInvoiceStatus.php @@ -1,9 +1,10 @@ ', Invoice::STATUS_COMPLETED)->whereDate('due_date', '<',$date)->get(); + $invoices = Invoice::where('status', '<>', Invoice::STATUS_COMPLETED)->whereDate('due_date', '<', $date)->get(); foreach ($invoices as $invoice) { $invoice->status = Invoice::STATUS_OVERDUE; diff --git a/app/Console/Commands/ResetApp.php b/app/Console/Commands/ResetApp.php index f3062501..20d48a1f 100644 --- a/app/Console/Commands/ResetApp.php +++ b/app/Console/Commands/ResetApp.php @@ -5,7 +5,6 @@ namespace Crater\Console\Commands; use Illuminate\Console\Command; use Illuminate\Console\ConfirmableTrait; use Illuminate\Support\Facades\Artisan; -use Illuminate\Filesystem\Filesystem; class ResetApp extends Command { @@ -42,7 +41,7 @@ class ResetApp extends Command */ public function handle() { - if (!$this->confirmToProceed()) { + if (! $this->confirmToProceed()) { return; } diff --git a/app/Console/Commands/UpdateCommand.php b/app/Console/Commands/UpdateCommand.php index f734f513..9229d0ab 100644 --- a/app/Console/Commands/UpdateCommand.php +++ b/app/Console/Commands/UpdateCommand.php @@ -2,9 +2,9 @@ namespace Crater\Console\Commands; -use Illuminate\Console\Command; -use Crater\Space\Updater; use Crater\Models\Setting; +use Crater\Space\Updater; +use Illuminate\Console\Command; // Implementation taken from Akaunting - https://github.com/akaunting/akaunting class UpdateCommand extends Command @@ -57,42 +57,43 @@ class UpdateCommand extends Command return; } - if (!$this->version) { + if (! $this->version) { $this->info('No Update Available! You are already on the latest version.'); + return; } - if (!$this->confirm("Do you wish to update to {$this->version}?")) { + if (! $this->confirm("Do you wish to update to {$this->version}?")) { return; } - if (!$path = $this->download()) { + if (! $path = $this->download()) { return; } - if (!$path = $this->unzip($path)) { + if (! $path = $this->unzip($path)) { return; } - if (!$this->copyFiles($path)) { + if (! $this->copyFiles($path)) { return; } - if(isset($this->response->deleted_files) && !empty($this->response->deleted_files)) { - if (!$this->deleteFiles($this->response->deleted_files)) { + if (isset($this->response->deleted_files) && ! empty($this->response->deleted_files)) { + if (! $this->deleteFiles($this->response->deleted_files)) { return; } } - if (!$this->migrateUpdate()) { + if (! $this->migrateUpdate()) { return; } - if (!$this->finish()) { + if (! $this->finish()) { return; } - $this->info('Successfully updated to ' . $this->version); + $this->info('Successfully updated to '.$this->version); } public function getInstalledVersion() @@ -102,7 +103,7 @@ class UpdateCommand extends Command public function getLatestVersionResponse() { - $this->info('Your currently installed version is ' . $this->installed); + $this->info('Your currently installed version is '.$this->installed); $this->line(''); $this->info('Checking for update...'); @@ -110,14 +111,12 @@ class UpdateCommand extends Command $response = Updater::checkForUpdate($this->installed); if ($response->success) { - $extensions = $response->version->extensions; $is_required = false; foreach ($extensions as $key => $extension) { - - if(!$extension) { + if (! $extension) { $is_required = true; $this->info('❌ '.$key); } @@ -125,7 +124,7 @@ class UpdateCommand extends Command $this->info('✅ '.$key); } - if($is_required) { + if ($is_required) { return 'extension_required'; } @@ -146,8 +145,9 @@ class UpdateCommand extends Command try { $path = Updater::download($this->version, 1); - if (!is_string($path)) { + if (! is_string($path)) { $this->error('Download exception'); + return false; } } catch (\Exception $e) { @@ -165,8 +165,9 @@ class UpdateCommand extends Command try { $path = Updater::unzip($path); - if (!is_string($path)) { + if (! is_string($path)) { $this->error('Unzipping exception'); + return false; } } catch (\Exception $e) { diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index cd270548..9518fea7 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -1,4 +1,5 @@ getBasePath($media) . '/'; + return $this->getBasePath($media).'/'; } public function getPathForConversions(Media $media): string { - return $this->getBasePath($media) . '/conversations/'; + return $this->getBasePath($media).'/conversations/'; } public function getPathForResponsiveImages(Media $media): string { - return $this->getBasePath($media) . '/responsive-images/'; + return $this->getBasePath($media).'/responsive-images/'; } /* diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index de0272fb..f580f89e 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -1,12 +1,15 @@ $data['name'], 'email' => $data['email'], - 'password' => $data['password'] + 'password' => $data['password'], ]); } } diff --git a/app/Http/Controllers/V1/Auth/ResetPasswordController.php b/app/Http/Controllers/V1/Auth/ResetPasswordController.php index 96f88911..1f41dd2c 100644 --- a/app/Http/Controllers/V1/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/V1/Auth/ResetPasswordController.php @@ -4,10 +4,10 @@ namespace Crater\Http\Controllers\V1\Auth; use Crater\Http\Controllers\Controller; use Crater\Providers\RouteServiceProvider; -use Illuminate\Support\Str; use Illuminate\Auth\Events\PasswordReset; -use Illuminate\Http\Request; use Illuminate\Foundation\Auth\ResetsPasswords; +use Illuminate\Http\Request; +use Illuminate\Support\Str; class ResetPasswordController extends Controller { @@ -31,7 +31,6 @@ class ResetPasswordController extends Controller */ protected $redirectTo = RouteServiceProvider::HOME; - /** * Get the response for a successful password reset. * @@ -42,7 +41,7 @@ class ResetPasswordController extends Controller protected function sendResetResponse(Request $request, $response) { return response()->json([ - 'message' => 'Password reset successfully.' + 'message' => 'Password reset successfully.', ]); } diff --git a/app/Http/Controllers/V1/Backup/ApiController.php b/app/Http/Controllers/V1/Backup/ApiController.php index 0ab3a811..73dbeca9 100644 --- a/app/Http/Controllers/V1/Backup/ApiController.php +++ b/app/Http/Controllers/V1/Backup/ApiController.php @@ -1,4 +1,5 @@ json([ - 'success' => true + 'success' => true, ]); } - } diff --git a/app/Http/Controllers/V1/Backup/BackupsController.php b/app/Http/Controllers/V1/Backup/BackupsController.php index 3684a4b1..97abaac4 100644 --- a/app/Http/Controllers/V1/Backup/BackupsController.php +++ b/app/Http/Controllers/V1/Backup/BackupsController.php @@ -1,17 +1,17 @@ json([ 'backups' => $backups, - 'disks' => $configuredBackupDisks + 'disks' => $configuredBackupDisks, ]); } catch (\Exception $e) { return response()->json([ 'backups' => [], 'error' => 'invalid_disk_credentials', 'error_message' => $e->getMessage(), - 'disks' => $configuredBackupDisks + 'disks' => $configuredBackupDisks, ]); } } diff --git a/app/Http/Controllers/V1/Backup/DownloadBackupController.php b/app/Http/Controllers/V1/Backup/DownloadBackupController.php index a462559e..8ea0162b 100644 --- a/app/Http/Controllers/V1/Backup/DownloadBackupController.php +++ b/app/Http/Controllers/V1/Backup/DownloadBackupController.php @@ -1,14 +1,13 @@ has('limit') ? $request->limit : 5; + $limit = $request->has('limit') ? $request->limit : 5; - $customFields = CustomField::whereCompany($request->header('company')) + $customFields = CustomField::whereCompany($request->header('company')) ->applyFilters($request->only([ 'type', - 'search' + 'search', ])) ->latest() ->paginateData($limit); return response()->json([ - 'customFields' => $customFields + 'customFields' => $customFields, ]); } @@ -44,7 +44,7 @@ class CustomFieldsController extends Controller return response()->json([ 'customField' => $customField, - 'success' => true + 'success' => true, ]); } @@ -58,7 +58,7 @@ class CustomFieldsController extends Controller { return response()->json([ 'customField' => $customField, - 'success' => true + 'success' => true, ]); } @@ -75,7 +75,7 @@ class CustomFieldsController extends Controller return response()->json([ 'customField' => $customField, - 'success' => true + 'success' => true, ]); } @@ -89,14 +89,14 @@ class CustomFieldsController extends Controller { if ($customField->customFieldValue()->exists()) { return response()->json([ - 'error' => 'values_attached' + 'error' => 'values_attached', ]); } $customField->delete(); return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Customer/CustomerStatsController.php b/app/Http/Controllers/V1/Customer/CustomerStatsController.php index e5e97429..027f54bb 100644 --- a/app/Http/Controllers/V1/Customer/CustomerStatsController.php +++ b/app/Http/Controllers/V1/Customer/CustomerStatsController.php @@ -2,13 +2,13 @@ namespace Crater\Http\Controllers\V1\Customer; +use Carbon\Carbon; use Crater\Http\Controllers\Controller; -use Crater\Models\Invoice; +use Crater\Models\CompanySetting; use Crater\Models\Expense; +use Crater\Models\Invoice; use Crater\Models\Payment; use Crater\Models\User; -use Crater\Models\CompanySetting; -use Carbon\Carbon; use Illuminate\Http\Request; class CustomerStatsController extends Controller @@ -118,15 +118,15 @@ class CustomerStatsController extends Controller $netProfit = (int) $totalReceipts - (int) $totalExpenses; $chartData = [ - 'months' => $months, + 'months' => $months, 'invoiceTotals' => $invoiceTotals, 'expenseTotals' => $expenseTotals, 'receiptTotals' => $receiptTotals, - 'netProfit' => $netProfit, - 'netProfits' => $netProfits, - 'salesTotal' => $salesTotal, + 'netProfit' => $netProfit, + 'netProfits' => $netProfits, + 'salesTotal' => $salesTotal, 'totalReceipts' => $totalReceipts, - 'totalExpenses' => $totalExpenses + 'totalExpenses' => $totalExpenses, ]; $customer = User::with([ @@ -135,7 +135,7 @@ class CustomerStatsController extends Controller 'billingAddress.country', 'shippingAddress.country', 'currency', - 'fields.customField' + 'fields.customField', ])->find($customer->id); return response()->json([ diff --git a/app/Http/Controllers/V1/Customer/CustomersController.php b/app/Http/Controllers/V1/Customer/CustomersController.php index d42b4e06..71f481f7 100644 --- a/app/Http/Controllers/V1/Customer/CustomersController.php +++ b/app/Http/Controllers/V1/Customer/CustomersController.php @@ -2,13 +2,12 @@ namespace Crater\Http\Controllers\V1\Customer; -use Illuminate\Http\Request; +use Crater\Http\Controllers\Controller; use Crater\Http\Requests; use Crater\Models\User; -use Crater\Http\Controllers\Controller; +use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; - class CustomersController extends Controller { /** @@ -29,7 +28,7 @@ class CustomersController extends Controller 'phone', 'customer_id', 'orderByField', - 'orderBy' + 'orderBy', ])) ->whereCompany($request->header('company')) ->select( @@ -42,7 +41,7 @@ class CustomersController extends Controller return response()->json([ 'customers' => $customers, - 'customerTotalCount' => User::whereRole('customer')->count() + 'customerTotalCount' => User::whereRole('customer')->count(), ]); } @@ -58,7 +57,7 @@ class CustomersController extends Controller return response()->json([ 'customer' => $customer, - 'success' => true + 'success' => true, ]); } @@ -74,7 +73,7 @@ class CustomersController extends Controller 'billingAddress.country', 'shippingAddress.country', 'fields.customField', - 'creator' + 'creator', ]); $currency = $customer->currency; @@ -85,7 +84,6 @@ class CustomersController extends Controller ]); } - /** * Update the specified resource in storage. * @@ -101,7 +99,7 @@ class CustomersController extends Controller return response()->json([ 'customer' => $customer, - 'success' => true + 'success' => true, ]); } @@ -116,7 +114,7 @@ class CustomersController extends Controller User::deleteCustomers($request->ids); return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Dashboard/DashboardChartController.php b/app/Http/Controllers/V1/Dashboard/DashboardChartController.php index cda22d47..7dc9530c 100644 --- a/app/Http/Controllers/V1/Dashboard/DashboardChartController.php +++ b/app/Http/Controllers/V1/Dashboard/DashboardChartController.php @@ -2,8 +2,8 @@ namespace Crater\Http\Controllers\V1\Dashboard; -use Crater\Models\Expense; use Crater\Http\Controllers\Controller; +use Crater\Models\Expense; use Illuminate\Http\Request; class DashboardChartController extends Controller diff --git a/app/Http/Controllers/V1/Dashboard/DashboardController.php b/app/Http/Controllers/V1/Dashboard/DashboardController.php index 24b2118c..f59684cb 100644 --- a/app/Http/Controllers/V1/Dashboard/DashboardController.php +++ b/app/Http/Controllers/V1/Dashboard/DashboardController.php @@ -1,15 +1,16 @@ $months, + 'months' => $months, 'invoiceTotals' => $invoiceTotals, 'expenseTotals' => $expenseTotals, 'receiptTotals' => $receiptTotals, - 'netProfits' => $netProfits + 'netProfits' => $netProfits, ]; $customersCount = User::customer()->whereCompany($request->header('company'))->get()->count(); @@ -138,7 +139,7 @@ class DashboardController extends Controller 'salesTotal' => $salesTotal, 'totalReceipts' => $totalReceipts, 'totalExpenses' => $totalExpenses, - 'netProfit' => $netProfit + 'netProfit' => $netProfit, ]); } } diff --git a/app/Http/Controllers/V1/Estimate/ChangeEstimateStatusController.php b/app/Http/Controllers/V1/Estimate/ChangeEstimateStatusController.php index 1a986fb9..9da6b8a0 100644 --- a/app/Http/Controllers/V1/Estimate/ChangeEstimateStatusController.php +++ b/app/Http/Controllers/V1/Estimate/ChangeEstimateStatusController.php @@ -2,9 +2,9 @@ namespace Crater\Http\Controllers\V1\Estimate; -use Illuminate\Http\Request; use Crater\Http\Controllers\Controller; use Crater\Models\Estimate; +use Illuminate\Http\Request; class ChangeEstimateStatusController extends Controller { @@ -15,12 +15,12 @@ class ChangeEstimateStatusController extends Controller * @param Estimate $estimate * @return \Illuminate\Http\Response */ - public function __invoke(Request $request, Estimate $estimate) - { + public function __invoke(Request $request, Estimate $estimate) + { $estimate->update($request->only('status')); return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Estimate/ConvertEstimateController.php b/app/Http/Controllers/V1/Estimate/ConvertEstimateController.php index 85a0f93e..2b3014d6 100644 --- a/app/Http/Controllers/V1/Estimate/ConvertEstimateController.php +++ b/app/Http/Controllers/V1/Estimate/ConvertEstimateController.php @@ -2,12 +2,12 @@ namespace Crater\Http\Controllers\V1\Estimate; -use Illuminate\Http\Request; +use Carbon\Carbon; use Crater\Http\Controllers\Controller; +use Crater\Models\CompanySetting; use Crater\Models\Estimate; use Crater\Models\Invoice; -use Carbon\Carbon; -use Crater\Models\CompanySetting; +use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; class ConvertEstimateController extends Controller @@ -35,7 +35,7 @@ class ConvertEstimateController extends Controller 'creator_id' => Auth::id(), 'invoice_date' => $invoice_date->format('Y-m-d'), 'due_date' => $due_date->format('Y-m-d'), - 'invoice_number' => $invoice_prefix . "-" . Invoice::getNextInvoiceNumber($invoice_prefix), + 'invoice_number' => $invoice_prefix."-".Invoice::getNextInvoiceNumber($invoice_prefix), 'reference_number' => $estimate->reference_number, 'user_id' => $estimate->user_id, 'company_id' => $request->header('company'), @@ -52,7 +52,7 @@ class ConvertEstimateController extends Controller 'discount_per_item' => $estimate->discount_per_item, 'tax' => $estimate->tax, 'notes' => $estimate->notes, - 'unique_hash' => str_random(60) + 'unique_hash' => str_random(60), ]); $invoiceItems = $estimate->items->toArray(); @@ -85,11 +85,11 @@ class ConvertEstimateController extends Controller 'items', 'user', 'invoiceTemplate', - 'taxes' + 'taxes', ])->find($invoice->id); return response()->json([ - 'invoice' => $invoice + 'invoice' => $invoice, ]); } } diff --git a/app/Http/Controllers/V1/Estimate/EstimatePdfController.php b/app/Http/Controllers/V1/Estimate/EstimatePdfController.php index 143e6718..77220a1d 100644 --- a/app/Http/Controllers/V1/Estimate/EstimatePdfController.php +++ b/app/Http/Controllers/V1/Estimate/EstimatePdfController.php @@ -2,8 +2,8 @@ namespace Crater\Http\Controllers\V1\Estimate; -use Crater\Models\Estimate; use Crater\Http\Controllers\Controller; +use Crater\Models\Estimate; class EstimatePdfController extends Controller { diff --git a/app/Http/Controllers/V1/Estimate/EstimateTemplatesController.php b/app/Http/Controllers/V1/Estimate/EstimateTemplatesController.php index cfdf0be9..fafa49d7 100644 --- a/app/Http/Controllers/V1/Estimate/EstimateTemplatesController.php +++ b/app/Http/Controllers/V1/Estimate/EstimateTemplatesController.php @@ -2,8 +2,8 @@ namespace Crater\Http\Controllers\V1\Estimate; -use Crater\Models\EstimateTemplate; use Crater\Http\Controllers\Controller; +use Crater\Models\EstimateTemplate; use Illuminate\Http\Request; class EstimateTemplatesController extends Controller @@ -17,7 +17,7 @@ class EstimateTemplatesController extends Controller public function __invoke(Request $request) { return response()->json([ - 'templates' => EstimateTemplate::all() + 'templates' => EstimateTemplate::all(), ]); } } diff --git a/app/Http/Controllers/V1/Estimate/EstimatesController.php b/app/Http/Controllers/V1/Estimate/EstimatesController.php index 6d17d66a..9c2b8457 100644 --- a/app/Http/Controllers/V1/Estimate/EstimatesController.php +++ b/app/Http/Controllers/V1/Estimate/EstimatesController.php @@ -2,12 +2,12 @@ namespace Crater\Http\Controllers\V1\Estimate; -use Illuminate\Http\Request; -use Crater\Models\Estimate; -use Crater\Http\Requests\EstimatesRequest; use Crater\Http\Controllers\Controller; use Crater\Http\Requests\DeleteEstimatesRequest; +use Crater\Http\Requests\EstimatesRequest; use Crater\Jobs\GenerateEstimatePdfJob; +use Crater\Models\Estimate; +use Illuminate\Http\Request; class EstimatesController extends Controller { @@ -20,7 +20,7 @@ class EstimatesController extends Controller 'user', 'estimateTemplate', 'taxes', - 'creator' + 'creator', ]) ->join('users', 'users.id', '=', 'estimates.user_id') ->applyFilters($request->only([ @@ -32,7 +32,7 @@ class EstimatesController extends Controller 'to_date', 'search', 'orderByField', - 'orderBy' + 'orderBy', ])) ->whereCompany($request->header('company')) ->select('estimates.*', 'users.name') @@ -41,7 +41,7 @@ class EstimatesController extends Controller $siteData = [ 'estimates' => $estimates, - 'estimateTotalCount' => Estimate::count() + 'estimateTotalCount' => Estimate::count(), ]; return response()->json($siteData); @@ -58,7 +58,7 @@ class EstimatesController extends Controller GenerateEstimatePdfJob::dispatch($estimate); return response()->json([ - 'estimate' => $estimate + 'estimate' => $estimate, ]); } @@ -72,7 +72,7 @@ class EstimatesController extends Controller 'creator', 'taxes', 'taxes.taxType', - 'fields.customField' + 'fields.customField', ]); return response()->json([ @@ -89,7 +89,7 @@ class EstimatesController extends Controller GenerateEstimatePdfJob::dispatch($estimate, true); return response()->json([ - 'estimate' => $estimate + 'estimate' => $estimate, ]); } @@ -98,7 +98,7 @@ class EstimatesController extends Controller Estimate::destroy($request->ids); return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Estimate/SendEstimateController.php b/app/Http/Controllers/V1/Estimate/SendEstimateController.php index ce692bed..ffa8c80a 100644 --- a/app/Http/Controllers/V1/Estimate/SendEstimateController.php +++ b/app/Http/Controllers/V1/Estimate/SendEstimateController.php @@ -3,8 +3,8 @@ namespace Crater\Http\Controllers\V1\Estimate; use Crater\Http\Controllers\Controller; -use Crater\Models\Estimate; use Crater\Http\Requests\SendEstimatesRequest; +use Crater\Models\Estimate; class SendEstimateController extends Controller { diff --git a/app/Http/Controllers/V1/Expense/DownloadReceiptController.php b/app/Http/Controllers/V1/Expense/DownloadReceiptController.php index 4fc57e40..d0e2073b 100644 --- a/app/Http/Controllers/V1/Expense/DownloadReceiptController.php +++ b/app/Http/Controllers/V1/Expense/DownloadReceiptController.php @@ -2,8 +2,8 @@ namespace Crater\Http\Controllers\V1\Expense; -use Crater\Models\Expense; use Crater\Http\Controllers\Controller; +use Crater\Models\Expense; class DownloadReceiptController extends Controller { @@ -23,12 +23,13 @@ class DownloadReceiptController extends Controller $imagePath = $media->getPath(); $response = \Response::download($imagePath, $media->file_name); ob_end_clean(); + return $response; } } return response()->json([ - 'error' => 'receipt_not_found' + 'error' => 'receipt_not_found', ]); } } diff --git a/app/Http/Controllers/V1/Expense/ExpenseCategoriesController.php b/app/Http/Controllers/V1/Expense/ExpenseCategoriesController.php index f597cf42..3bfc7f1a 100644 --- a/app/Http/Controllers/V1/Expense/ExpenseCategoriesController.php +++ b/app/Http/Controllers/V1/Expense/ExpenseCategoriesController.php @@ -1,10 +1,11 @@ header('company')) ->applyFilters($request->only([ 'category_id', - 'search' + 'search', ])) ->latest() ->paginateData($limit); return response()->json([ - 'categories' => $categories + 'categories' => $categories, ]); } @@ -44,7 +45,7 @@ class ExpenseCategoriesController extends Controller return response()->json([ 'category' => $category, - 'success' => true + 'success' => true, ]); } @@ -57,7 +58,7 @@ class ExpenseCategoriesController extends Controller public function show(ExpenseCategory $category) { return response()->json([ - 'category' => $category + 'category' => $category, ]); } @@ -74,7 +75,7 @@ class ExpenseCategoriesController extends Controller return response()->json([ 'category' => $category, - 'success' => true + 'success' => true, ]); } @@ -88,14 +89,14 @@ class ExpenseCategoriesController extends Controller { if ($category->expenses() && $category->expenses()->count() > 0) { return response()->json([ - 'success' => false + 'success' => false, ]); } $category->delete(); return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Expense/ExpensesController.php b/app/Http/Controllers/V1/Expense/ExpensesController.php index d4276e70..bb749552 100644 --- a/app/Http/Controllers/V1/Expense/ExpensesController.php +++ b/app/Http/Controllers/V1/Expense/ExpensesController.php @@ -2,11 +2,11 @@ namespace Crater\Http\Controllers\V1\Expense; -use Crater\Models\Expense; -use Illuminate\Http\Request; -use Crater\Http\Requests\ExpenseRequest; use Crater\Http\Controllers\Controller; use Crater\Http\Requests\DeleteExpensesRequest; +use Crater\Http\Requests\ExpenseRequest; +use Crater\Models\Expense; +use Illuminate\Http\Request; class ExpensesController extends Controller { @@ -30,7 +30,7 @@ class ExpensesController extends Controller 'from_date', 'to_date', 'orderByField', - 'orderBy' + 'orderBy', ])) ->whereCompany($request->header('company')) ->select('expenses.*', 'expense_categories.name', 'users.name as user_name') @@ -38,7 +38,7 @@ class ExpensesController extends Controller return response()->json([ 'expenses' => $expenses, - 'expenseTotalCount' => Expense::count() + 'expenseTotalCount' => Expense::count(), ]); } @@ -54,7 +54,7 @@ class ExpensesController extends Controller return response()->json([ 'expense' => $expense, - 'success' => true + 'success' => true, ]); } @@ -69,7 +69,7 @@ class ExpensesController extends Controller $expense->load('creator', 'fields.customField'); return response()->json([ - 'expense' => $expense + 'expense' => $expense, ]); } @@ -86,7 +86,7 @@ class ExpensesController extends Controller return response()->json([ 'expense' => $expense, - 'success' => true + 'success' => true, ]); } @@ -95,7 +95,7 @@ class ExpensesController extends Controller Expense::destroy($request->ids); return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Expense/ShowReceiptController.php b/app/Http/Controllers/V1/Expense/ShowReceiptController.php index 68167042..f6285e8f 100644 --- a/app/Http/Controllers/V1/Expense/ShowReceiptController.php +++ b/app/Http/Controllers/V1/Expense/ShowReceiptController.php @@ -2,8 +2,8 @@ namespace Crater\Http\Controllers\V1\Expense; -use Crater\Models\Expense; use Crater\Http\Controllers\Controller; +use Crater\Models\Expense; class ShowReceiptController extends Controller { @@ -15,7 +15,7 @@ class ShowReceiptController extends Controller */ public function __invoke(Expense $expense) { - $imagePath = null; + $imagePath = null; if ($expense) { $media = $expense->getFirstMedia('receipts'); @@ -23,18 +23,18 @@ class ShowReceiptController extends Controller $imagePath = $media->getPath(); } else { return response()->json([ - 'error' => 'receipt_does_not_exist' + 'error' => 'receipt_does_not_exist', ]); } } $type = \File::mimeType($imagePath); - $image = 'data:' . $type . ';base64,' . base64_encode(file_get_contents($imagePath)); + $image = 'data:'.$type.';base64,'.base64_encode(file_get_contents($imagePath)); return response()->json([ 'image' => $image, - 'type' => $type + 'type' => $type, ]); } } diff --git a/app/Http/Controllers/V1/Expense/UploadReceiptController.php b/app/Http/Controllers/V1/Expense/UploadReceiptController.php index 43ac3786..8a238b6a 100644 --- a/app/Http/Controllers/V1/Expense/UploadReceiptController.php +++ b/app/Http/Controllers/V1/Expense/UploadReceiptController.php @@ -2,8 +2,8 @@ namespace Crater\Http\Controllers\V1\Expense; -use Crater\Models\Expense; use Crater\Http\Controllers\Controller; +use Crater\Models\Expense; use Illuminate\Http\Request; class UploadReceiptController extends Controller @@ -30,7 +30,7 @@ class UploadReceiptController extends Controller } return response()->json([ - 'success' => 'Expense receipts uploaded successfully' + 'success' => 'Expense receipts uploaded successfully', ]); } } diff --git a/app/Http/Controllers/V1/General/BootstrapController.php b/app/Http/Controllers/V1/General/BootstrapController.php index 3818001c..860af310 100644 --- a/app/Http/Controllers/V1/General/BootstrapController.php +++ b/app/Http/Controllers/V1/General/BootstrapController.php @@ -2,13 +2,12 @@ namespace Crater\Http\Controllers\V1\General; -use Crater\Http\Controllers\Controller; -use Illuminate\Http\Request; -use Crater\Models\Currency; -use Crater\Models\Country; use Auth; +use Crater\Http\Controllers\Controller; use Crater\Models\CompanySetting; -use Crater\Models\CustomField; +use Crater\Models\Country; +use Crater\Models\Currency; +use Illuminate\Http\Request; class BootstrapController extends Controller { @@ -29,7 +28,7 @@ class BootstrapController extends Controller 'carbon_date_format', 'fiscal_year', 'time_zone', - 'currency' + 'currency', ]; $settings = CompanySetting::getSettings($settings, $user->company_id); @@ -46,7 +45,7 @@ class BootstrapController extends Controller 'moment_date_format' => $settings['moment_date_format'], 'carbon_date_format' => $settings['carbon_date_format'], 'fiscal_year' => $settings['fiscal_year'], - 'time_zone' => $settings['time_zone'] + 'time_zone' => $settings['time_zone'], ]); } } diff --git a/app/Http/Controllers/V1/General/CountriesController.php b/app/Http/Controllers/V1/General/CountriesController.php index b2946e53..4c03e46a 100644 --- a/app/Http/Controllers/V1/General/CountriesController.php +++ b/app/Http/Controllers/V1/General/CountriesController.php @@ -2,8 +2,8 @@ namespace Crater\Http\Controllers\V1\General; -use Crater\Models\Country; use Crater\Http\Controllers\Controller; +use Crater\Models\Country; use Illuminate\Http\Request; class CountriesController extends Controller @@ -17,7 +17,7 @@ class CountriesController extends Controller public function __invoke(Request $request) { return response()->json([ - 'countries' => Country::all() + 'countries' => Country::all(), ]); } } diff --git a/app/Http/Controllers/V1/General/CurrenciesController.php b/app/Http/Controllers/V1/General/CurrenciesController.php index 5fa1fb93..edbbe500 100644 --- a/app/Http/Controllers/V1/General/CurrenciesController.php +++ b/app/Http/Controllers/V1/General/CurrenciesController.php @@ -2,8 +2,8 @@ namespace Crater\Http\Controllers\V1\General; -use Crater\Models\Currency; use Crater\Http\Controllers\Controller; +use Crater\Models\Currency; use Illuminate\Http\Request; class CurrenciesController extends Controller @@ -19,7 +19,7 @@ class CurrenciesController extends Controller $currencies = Currency::latest()->get(); return response()->json([ - 'currencies' => $currencies + 'currencies' => $currencies, ]); } } diff --git a/app/Http/Controllers/V1/General/DateFormatsController.php b/app/Http/Controllers/V1/General/DateFormatsController.php index 8a8bb658..8d52fde9 100644 --- a/app/Http/Controllers/V1/General/DateFormatsController.php +++ b/app/Http/Controllers/V1/General/DateFormatsController.php @@ -17,7 +17,7 @@ class DateFormatsController extends Controller public function __invoke(Request $request) { return response()->json([ - 'date_formats' => DateFormatter::get_list() + 'date_formats' => DateFormatter::get_list(), ]); } } diff --git a/app/Http/Controllers/V1/General/FiscalYearsController.php b/app/Http/Controllers/V1/General/FiscalYearsController.php index 3e578063..65d74ad7 100644 --- a/app/Http/Controllers/V1/General/FiscalYearsController.php +++ b/app/Http/Controllers/V1/General/FiscalYearsController.php @@ -16,7 +16,7 @@ class FiscalYearsController extends Controller public function __invoke(Request $request) { return response()->json([ - 'fiscal_years' => config('crater.fiscal_years') + 'fiscal_years' => config('crater.fiscal_years'), ]); } } diff --git a/app/Http/Controllers/V1/General/LanguagesController.php b/app/Http/Controllers/V1/General/LanguagesController.php index 2a5d4968..02e6ed0c 100644 --- a/app/Http/Controllers/V1/General/LanguagesController.php +++ b/app/Http/Controllers/V1/General/LanguagesController.php @@ -16,7 +16,7 @@ class LanguagesController extends Controller public function __invoke(Request $request) { return response()->json([ - 'languages' => config('crater.languages') + 'languages' => config('crater.languages'), ]); } } diff --git a/app/Http/Controllers/V1/General/NextNumberController.php b/app/Http/Controllers/V1/General/NextNumberController.php index 17e71388..7ab5a49e 100644 --- a/app/Http/Controllers/V1/General/NextNumberController.php +++ b/app/Http/Controllers/V1/General/NextNumberController.php @@ -2,11 +2,11 @@ namespace Crater\Http\Controllers\V1\General; -use Crater\Models\Invoice; -use Crater\Models\Estimate; -use Crater\Models\Payment; -use Crater\Models\CompanySetting; use Crater\Http\Controllers\Controller; +use Crater\Models\CompanySetting; +use Crater\Models\Estimate; +use Crater\Models\Invoice; +use Crater\Models\Payment; use Illuminate\Http\Request; class NextNumberController extends Controller @@ -21,7 +21,7 @@ class NextNumberController extends Controller { $key = $request->key; - $val = $key . '_prefix'; + $val = $key.'_prefix'; $prefix = CompanySetting::getSetting( $val, @@ -33,14 +33,17 @@ class NextNumberController extends Controller switch ($key) { case 'invoice': $nextNumber = Invoice::getNextInvoiceNumber($prefix); + break; case 'estimate': $nextNumber = Estimate::getNextEstimateNumber($prefix); + break; case 'payment': $nextNumber = Payment::getNextPaymentNumber($prefix); + break; default: @@ -49,7 +52,7 @@ class NextNumberController extends Controller return response()->json([ 'nextNumber' => $nextNumber, - 'prefix' => $prefix + 'prefix' => $prefix, ]); } } diff --git a/app/Http/Controllers/V1/General/NotesController.php b/app/Http/Controllers/V1/General/NotesController.php index dd85e7c9..b5f0fd9c 100644 --- a/app/Http/Controllers/V1/General/NotesController.php +++ b/app/Http/Controllers/V1/General/NotesController.php @@ -23,7 +23,7 @@ class NotesController extends Controller ->paginate($limit); return response()->json([ - 'notes' => $notes + 'notes' => $notes, ]); } @@ -38,7 +38,7 @@ class NotesController extends Controller $note = Note::create($request->validated()); return response()->json([ - 'note' => $note + 'note' => $note, ]); } @@ -51,7 +51,7 @@ class NotesController extends Controller public function show(Note $note) { return response()->json([ - 'note' => $note + 'note' => $note, ]); } @@ -67,7 +67,7 @@ class NotesController extends Controller $note->update($request->validated()); return response()->json([ - 'note' => $note + 'note' => $note, ]); } @@ -82,7 +82,7 @@ class NotesController extends Controller $note->delete(); return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/General/SearchController.php b/app/Http/Controllers/V1/General/SearchController.php index d0a34986..00602de5 100644 --- a/app/Http/Controllers/V1/General/SearchController.php +++ b/app/Http/Controllers/V1/General/SearchController.php @@ -31,7 +31,7 @@ class SearchController extends Controller return response()->json([ 'customers' => $customers, - 'users' => $users ?? [] + 'users' => $users ?? [], ]); } } diff --git a/app/Http/Controllers/V1/General/TimezonesController.php b/app/Http/Controllers/V1/General/TimezonesController.php index c2a60408..93055918 100644 --- a/app/Http/Controllers/V1/General/TimezonesController.php +++ b/app/Http/Controllers/V1/General/TimezonesController.php @@ -17,7 +17,7 @@ class TimezonesController extends Controller public function __invoke(Request $request) { return response()->json([ - 'time_zones' => TimeZones::get_list() + 'time_zones' => TimeZones::get_list(), ]); } } diff --git a/app/Http/Controllers/V1/Invoice/ChangeInvoiceStatusController.php b/app/Http/Controllers/V1/Invoice/ChangeInvoiceStatusController.php index 781e9ec4..dde05bf2 100644 --- a/app/Http/Controllers/V1/Invoice/ChangeInvoiceStatusController.php +++ b/app/Http/Controllers/V1/Invoice/ChangeInvoiceStatusController.php @@ -2,9 +2,9 @@ namespace Crater\Http\Controllers\V1\Invoice; -use Illuminate\Http\Request; use Crater\Http\Controllers\Controller; use Crater\Models\Invoice; +use Illuminate\Http\Request; class ChangeInvoiceStatusController extends Controller { @@ -14,8 +14,8 @@ class ChangeInvoiceStatusController extends Controller * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\JsonResponse */ - public function __invoke(Request $request, Invoice $invoice) - { + public function __invoke(Request $request, Invoice $invoice) + { if ($request->status == Invoice::STATUS_SENT) { $invoice->status = Invoice::STATUS_SENT; $invoice->sent = true; @@ -28,7 +28,7 @@ class ChangeInvoiceStatusController extends Controller } return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Invoice/CloneInvoiceController.php b/app/Http/Controllers/V1/Invoice/CloneInvoiceController.php index 079dc195..c1f8c4a2 100644 --- a/app/Http/Controllers/V1/Invoice/CloneInvoiceController.php +++ b/app/Http/Controllers/V1/Invoice/CloneInvoiceController.php @@ -2,11 +2,11 @@ namespace Crater\Http\Controllers\V1\Invoice; -use Illuminate\Http\Request; -use Crater\Http\Controllers\Controller; -use Crater\Models\Invoice; use Carbon\Carbon; +use Crater\Http\Controllers\Controller; use Crater\Models\CompanySetting; +use Crater\Models\Invoice; +use Illuminate\Http\Request; class CloneInvoiceController extends Controller { @@ -28,7 +28,7 @@ class CloneInvoiceController extends Controller $newInvoice = Invoice::create([ 'invoice_date' => $date->format('Y-m-d'), 'due_date' => $date->format('Y-m-d'), - 'invoice_number' => $invoice_prefix . "-" . Invoice::getNextInvoiceNumber($invoice_prefix), + 'invoice_number' => $invoice_prefix."-".Invoice::getNextInvoiceNumber($invoice_prefix), 'reference_number' => $invoice->reference_number, 'user_id' => $invoice->user_id, 'company_id' => $request->header('company'), @@ -45,7 +45,7 @@ class CloneInvoiceController extends Controller 'discount_per_item' => $invoice->discount_per_item, 'tax' => $invoice->tax, 'notes' => $invoice->notes, - 'unique_hash' => str_random(60) + 'unique_hash' => str_random(60), ]); $invoice->load('items.taxes'); @@ -79,13 +79,13 @@ class CloneInvoiceController extends Controller 'items', 'user', 'invoiceTemplate', - 'taxes' + 'taxes', ]) ->find($newInvoice->id); return response()->json([ 'invoice' => $newInvoice, - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Invoice/InvoiceTemplatesController.php b/app/Http/Controllers/V1/Invoice/InvoiceTemplatesController.php index 802c8047..96f5d9b6 100644 --- a/app/Http/Controllers/V1/Invoice/InvoiceTemplatesController.php +++ b/app/Http/Controllers/V1/Invoice/InvoiceTemplatesController.php @@ -19,7 +19,7 @@ class InvoiceTemplatesController extends Controller $invoiceTemplates = InvoiceTemplate::all(); return response()->json([ - 'invoiceTemplates' => $invoiceTemplates + 'invoiceTemplates' => $invoiceTemplates, ]); } } diff --git a/app/Http/Controllers/V1/Invoice/InvoicesController.php b/app/Http/Controllers/V1/Invoice/InvoicesController.php index 6e086906..acd5110c 100644 --- a/app/Http/Controllers/V1/Invoice/InvoicesController.php +++ b/app/Http/Controllers/V1/Invoice/InvoicesController.php @@ -2,12 +2,12 @@ namespace Crater\Http\Controllers\V1\Invoice; -use Illuminate\Http\Request; -use Crater\Http\Requests; -use Crater\Models\Invoice; use Crater\Http\Controllers\Controller; +use Crater\Http\Requests; use Crater\Http\Requests\DeleteInvoiceRequest; use Crater\Jobs\GenerateInvoicePdfJob; +use Crater\Models\Invoice; +use Illuminate\Http\Request; class InvoicesController extends Controller { @@ -41,7 +41,7 @@ class InvoicesController extends Controller return response()->json([ 'invoices' => $invoices, - 'invoiceTotalCount' => Invoice::count() + 'invoiceTotalCount' => Invoice::count(), ]); } @@ -62,7 +62,7 @@ class InvoicesController extends Controller GenerateInvoicePdfJob::dispatch($invoice); return response()->json([ - 'invoice' => $invoice + 'invoice' => $invoice, ]); } @@ -80,7 +80,7 @@ class InvoicesController extends Controller 'user', 'invoiceTemplate', 'taxes.taxType', - 'fields.customField' + 'fields.customField', ]); $siteData = [ @@ -107,7 +107,7 @@ class InvoicesController extends Controller return response()->json([ 'invoice' => $invoice, - 'success' => true + 'success' => true, ]); } @@ -122,7 +122,7 @@ class InvoicesController extends Controller Invoice::destroy($request->ids); return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Invoice/SendInvoiceController.php b/app/Http/Controllers/V1/Invoice/SendInvoiceController.php index b0a6cf35..c18930b6 100644 --- a/app/Http/Controllers/V1/Invoice/SendInvoiceController.php +++ b/app/Http/Controllers/V1/Invoice/SendInvoiceController.php @@ -3,8 +3,8 @@ namespace Crater\Http\Controllers\V1\Invoice; use Crater\Http\Controllers\Controller; -use Crater\Models\Invoice; use Crater\Http\Requests\SendInvoiceRequest; +use Crater\Models\Invoice; class SendInvoiceController extends Controller { @@ -19,7 +19,7 @@ class SendInvoiceController extends Controller $invoice->send($request->all()); return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Item/ItemsController.php b/app/Http/Controllers/V1/Item/ItemsController.php index 25fbc453..973fd82d 100644 --- a/app/Http/Controllers/V1/Item/ItemsController.php +++ b/app/Http/Controllers/V1/Item/ItemsController.php @@ -3,11 +3,11 @@ namespace Crater\Http\Controllers\V1\Item; use Crater\Http\Controllers\Controller; -use Illuminate\Http\Request; use Crater\Http\Requests; use Crater\Http\Requests\DeleteItemsRequest; use Crater\Models\Item; use Crater\Models\TaxType; +use Illuminate\Http\Request; class ItemsController extends Controller { @@ -29,7 +29,7 @@ class ItemsController extends Controller 'unit_id', 'item_id', 'orderByField', - 'orderBy' + 'orderBy', ])) ->whereCompany($request->header('company')) ->select('items.*', 'units.name as unit_name') @@ -39,7 +39,7 @@ class ItemsController extends Controller return response()->json([ 'items' => $items, 'taxTypes' => TaxType::latest()->get(), - 'itemTotalCount' => Item::count() + 'itemTotalCount' => Item::count(), ]); } @@ -54,7 +54,7 @@ class ItemsController extends Controller $item = Item::createItem($request); return response()->json([ - 'item' => $item + 'item' => $item, ]); } @@ -69,7 +69,7 @@ class ItemsController extends Controller $item->load('taxes'); return response()->json([ - 'item' => $item + 'item' => $item, ]); } @@ -85,7 +85,7 @@ class ItemsController extends Controller $item = $item->updateItem($request); return response()->json([ - 'item' => $item + 'item' => $item, ]); } @@ -100,7 +100,7 @@ class ItemsController extends Controller Item::destroy($request->ids); return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Item/UnitsController.php b/app/Http/Controllers/V1/Item/UnitsController.php index f47666d2..115eee79 100644 --- a/app/Http/Controllers/V1/Item/UnitsController.php +++ b/app/Http/Controllers/V1/Item/UnitsController.php @@ -2,10 +2,10 @@ namespace Crater\Http\Controllers\V1\Item; +use Crater\Http\Controllers\Controller; +use Crater\Http\Requests\UnitRequest; use Crater\Models\Unit; use Illuminate\Http\Request; -use Crater\Http\Requests\UnitRequest; -use Crater\Http\Controllers\Controller; class UnitsController extends Controller { @@ -20,13 +20,13 @@ class UnitsController extends Controller $units = Unit::whereCompany($request->header('company')) ->applyFilters($request->only([ - 'unit_id' + 'unit_id', ])) ->latest() ->paginateData($limit); return response()->json([ - 'units' => $units + 'units' => $units, ]); } @@ -53,7 +53,7 @@ class UnitsController extends Controller $unit = Unit::create($data); return response()->json([ - 'unit' => $unit + 'unit' => $unit, ]); } @@ -66,7 +66,7 @@ class UnitsController extends Controller public function show(Unit $unit) { return response()->json([ - 'unit' => $unit + 'unit' => $unit, ]); } @@ -82,7 +82,7 @@ class UnitsController extends Controller $unit->update($request->validated()); return response()->json([ - 'unit' => $unit + 'unit' => $unit, ]); } @@ -96,14 +96,14 @@ class UnitsController extends Controller { if ($unit->items()->exists()) { return response()->json([ - 'error' => 'items_attached' + 'error' => 'items_attached', ]); } $unit->delete(); return response()->json([ - 'success' => 'Unit deleted successfully' + 'success' => 'Unit deleted successfully', ]); } } diff --git a/app/Http/Controllers/V1/Mobile/AuthController.php b/app/Http/Controllers/V1/Mobile/AuthController.php index 8c7151fe..96d6aa51 100644 --- a/app/Http/Controllers/V1/Mobile/AuthController.php +++ b/app/Http/Controllers/V1/Mobile/AuthController.php @@ -28,7 +28,7 @@ class AuthController extends Controller return response()->json([ 'type' => 'Bearer', - 'token' => $user->createToken($request->device_name)->plainTextToken + 'token' => $user->createToken($request->device_name)->plainTextToken, ]); } @@ -37,7 +37,7 @@ class AuthController extends Controller $request->user()->currentAccessToken()->delete(); return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Mobile/Customer/EstimatePdfController.php b/app/Http/Controllers/V1/Mobile/Customer/EstimatePdfController.php index ed6fd84b..b85aa388 100644 --- a/app/Http/Controllers/V1/Mobile/Customer/EstimatePdfController.php +++ b/app/Http/Controllers/V1/Mobile/Customer/EstimatePdfController.php @@ -2,13 +2,10 @@ namespace Crater\Http\Controllers\V1\Mobile\Customer; -use Barryvdh\DomPDF\PDF; -use Crater\Models\Company; -use Crater\Models\CompanySetting; -use Crater\Models\Estimate; -use Crater\Models\EstimateTemplate; use Crater\Http\Controllers\Controller; use Crater\Mail\EstimateViewedMail; +use Crater\Models\CompanySetting; +use Crater\Models\Estimate; use Crater\Models\User; class EstimatePdfController extends Controller diff --git a/app/Http/Controllers/V1/Mobile/Customer/InvoicePdfController.php b/app/Http/Controllers/V1/Mobile/Customer/InvoicePdfController.php index 040921fe..85d1ce3d 100644 --- a/app/Http/Controllers/V1/Mobile/Customer/InvoicePdfController.php +++ b/app/Http/Controllers/V1/Mobile/Customer/InvoicePdfController.php @@ -2,13 +2,10 @@ namespace Crater\Http\Controllers\V1\Mobile\Customer; -use Barryvdh\DomPDF\PDF; -use Crater\Models\Company; -use Crater\Models\CompanySetting; use Crater\Http\Controllers\Controller; -use Crater\Models\Invoice; -use Crater\Models\InvoiceTemplate; use Crater\Mail\InvoiceViewedMail; +use Crater\Models\CompanySetting; +use Crater\Models\Invoice; use Crater\Models\User; class InvoicePdfController extends Controller diff --git a/app/Http/Controllers/V1/Onboarding/DatabaseConfigurationController.php b/app/Http/Controllers/V1/Onboarding/DatabaseConfigurationController.php index b4f3b7d6..478be0c8 100644 --- a/app/Http/Controllers/V1/Onboarding/DatabaseConfigurationController.php +++ b/app/Http/Controllers/V1/Onboarding/DatabaseConfigurationController.php @@ -3,10 +3,10 @@ namespace Crater\Http\Controllers\V1\Onboarding; use Crater\Http\Controllers\Controller; -use Crater\Space\EnvironmentManager; use Crater\Http\Requests\DatabaseEnvironmentRequest; -use Illuminate\Support\Facades\Artisan; +use Crater\Space\EnvironmentManager; use Illuminate\Http\Request; +use Illuminate\Support\Facades\Artisan; class DatabaseConfigurationController extends Controller { @@ -55,6 +55,7 @@ class DatabaseConfigurationController extends Controller 'database_connection' => 'sqlite', 'database_name' => database_path('database.sqlite'), ]; + break; case 'pgsql': @@ -63,6 +64,7 @@ class DatabaseConfigurationController extends Controller 'database_host' => '127.0.0.1', 'database_port' => 5432, ]; + break; case 'mysql': @@ -71,6 +73,7 @@ class DatabaseConfigurationController extends Controller 'database_host' => '127.0.0.1', 'database_port' => 3306, ]; + break; case 'sqlsrv': @@ -79,13 +82,14 @@ class DatabaseConfigurationController extends Controller 'host' => '127.0.0.1', 'port' => 1433, ]; + break; } return response()->json([ 'config' => $databaseData, - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Onboarding/OnboardingWizardController.php b/app/Http/Controllers/V1/Onboarding/OnboardingWizardController.php index 57dbb5e7..e3d7df79 100644 --- a/app/Http/Controllers/V1/Onboarding/OnboardingWizardController.php +++ b/app/Http/Controllers/V1/Onboarding/OnboardingWizardController.php @@ -16,15 +16,14 @@ class OnboardingWizardController extends Controller */ public function getStep(Request $request) { - if (!\Storage::disk('local')->has('database_created')) { - + if (! \Storage::disk('local')->has('database_created')) { return response()->json([ - 'profile_complete' => 0 + 'profile_complete' => 0, ]); } return response()->json([ - 'profile_complete' => Setting::getSetting('profile_complete') + 'profile_complete' => Setting::getSetting('profile_complete'), ]); } @@ -34,14 +33,14 @@ class OnboardingWizardController extends Controller if ($setting === 'COMPLETED') { return response()->json([ - 'profile_complete' => $setting + 'profile_complete' => $setting, ]); } Setting::setSetting('profile_complete', $request->profile_complete); return response()->json([ - 'profile_complete' => Setting::getSetting('profile_complete') + 'profile_complete' => Setting::getSetting('profile_complete'), ]); } } diff --git a/app/Http/Controllers/V1/Onboarding/PermissionsController.php b/app/Http/Controllers/V1/Onboarding/PermissionsController.php index 692df849..c84f80c3 100755 --- a/app/Http/Controllers/V1/Onboarding/PermissionsController.php +++ b/app/Http/Controllers/V1/Onboarding/PermissionsController.php @@ -2,9 +2,9 @@ namespace Crater\Http\Controllers\V1\Onboarding; +use Crater\Http\Controllers\Controller; use Crater\Space\PermissionsChecker; use Illuminate\Http\JsonResponse; -use Crater\Http\Controllers\Controller; class PermissionsController extends Controller { @@ -33,7 +33,7 @@ class PermissionsController extends Controller ); return response()->json([ - 'permissions' => $permissions + 'permissions' => $permissions, ]); } } diff --git a/app/Http/Controllers/V1/Onboarding/RequirementsController.php b/app/Http/Controllers/V1/Onboarding/RequirementsController.php index ec3c2fff..c0cd7592 100755 --- a/app/Http/Controllers/V1/Onboarding/RequirementsController.php +++ b/app/Http/Controllers/V1/Onboarding/RequirementsController.php @@ -2,9 +2,9 @@ namespace Crater\Http\Controllers\V1\Onboarding; +use Crater\Http\Controllers\Controller; use Crater\Space\RequirementsChecker; use Illuminate\Http\JsonResponse; -use Crater\Http\Controllers\Controller; class RequirementsController extends Controller { @@ -37,7 +37,7 @@ class RequirementsController extends Controller return response()->json([ 'phpSupportInfo' => $phpSupportInfo, - 'requirements' => $requirements + 'requirements' => $requirements, ]); } } diff --git a/app/Http/Controllers/V1/Payment/PaymentMethodsController.php b/app/Http/Controllers/V1/Payment/PaymentMethodsController.php index dce49be7..52c468e2 100644 --- a/app/Http/Controllers/V1/Payment/PaymentMethodsController.php +++ b/app/Http/Controllers/V1/Payment/PaymentMethodsController.php @@ -2,10 +2,10 @@ namespace Crater\Http\Controllers\V1\Payment; +use Crater\Http\Controllers\Controller; +use Crater\Http\Requests\PaymentMethodRequest; use Crater\Models\PaymentMethod; use Illuminate\Http\Request; -use Crater\Http\Requests\PaymentMethodRequest; -use Crater\Http\Controllers\Controller; class PaymentMethodsController extends Controller { @@ -21,13 +21,13 @@ class PaymentMethodsController extends Controller $paymentMethods = PaymentMethod::whereCompany($request->header('company')) ->applyFilters($request->only([ 'method_id', - 'search' + 'search', ])) ->latest() ->paginateData($limit); return response()->json([ - 'paymentMethods' => $paymentMethods + 'paymentMethods' => $paymentMethods, ]); } @@ -42,7 +42,7 @@ class PaymentMethodsController extends Controller $paymentMethod = PaymentMethod::createPaymentMethod($request); return response()->json([ - 'paymentMethod' => $paymentMethod + 'paymentMethod' => $paymentMethod, ]); } @@ -55,7 +55,7 @@ class PaymentMethodsController extends Controller public function show(PaymentMethod $paymentMethod) { return response()->json([ - 'paymentMethod' => $paymentMethod + 'paymentMethod' => $paymentMethod, ]); } @@ -71,7 +71,7 @@ class PaymentMethodsController extends Controller $paymentMethod->update($request->validated()); return response()->json([ - 'paymentMethod' => $paymentMethod + 'paymentMethod' => $paymentMethod, ]); } @@ -87,14 +87,14 @@ class PaymentMethodsController extends Controller if ($payments->count() > 0) { return response()->json([ - 'error' => 'payments_attached' + 'error' => 'payments_attached', ]); } $paymentMethod->delete(); return response()->json([ - 'success' => 'Payment method deleted successfully' + 'success' => 'Payment method deleted successfully', ]); } } diff --git a/app/Http/Controllers/V1/Payment/PaymentsController.php b/app/Http/Controllers/V1/Payment/PaymentsController.php index 30c99b30..1c5ee327 100644 --- a/app/Http/Controllers/V1/Payment/PaymentsController.php +++ b/app/Http/Controllers/V1/Payment/PaymentsController.php @@ -2,11 +2,11 @@ namespace Crater\Http\Controllers\V1\Payment; -use Illuminate\Http\Request; -use Crater\Models\Payment; +use Crater\Http\Controllers\Controller; use Crater\Http\Requests\DeletePaymentsRequest; use Crater\Http\Requests\PaymentRequest; -use Crater\Http\Controllers\Controller; +use Crater\Models\Payment; +use Illuminate\Http\Request; class PaymentsController extends Controller { @@ -30,7 +30,7 @@ class PaymentsController extends Controller 'payment_method_id', 'customer_id', 'orderByField', - 'orderBy' + 'orderBy', ])) ->whereCompany($request->header('company')) ->select('payments.*', 'users.name', 'invoices.invoice_number', 'payment_methods.name as payment_mode') @@ -39,7 +39,7 @@ class PaymentsController extends Controller return response()->json([ 'payments' => $payments, - 'paymentTotalCount' => Payment::count() + 'paymentTotalCount' => Payment::count(), ]); } @@ -55,7 +55,7 @@ class PaymentsController extends Controller return response()->json([ 'payment' => $payment, - 'success' => true + 'success' => true, ]); } @@ -65,7 +65,7 @@ class PaymentsController extends Controller 'user', 'invoice', 'paymentMethod', - 'fields.customField' + 'fields.customField', ]); return response()->json([ @@ -81,7 +81,7 @@ class PaymentsController extends Controller return response()->json([ 'payment' => $payment, - 'success' => true + 'success' => true, ]); } @@ -90,7 +90,7 @@ class PaymentsController extends Controller Payment::deletePayments($request->ids); return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Payment/SendPaymentController.php b/app/Http/Controllers/V1/Payment/SendPaymentController.php index 4f512f2d..4a95c821 100644 --- a/app/Http/Controllers/V1/Payment/SendPaymentController.php +++ b/app/Http/Controllers/V1/Payment/SendPaymentController.php @@ -3,8 +3,8 @@ namespace Crater\Http\Controllers\V1\Payment; use Crater\Http\Controllers\Controller; -use Crater\Models\Payment; use Crater\Http\Requests\SendPaymentRequest; +use Crater\Models\Payment; class SendPaymentController extends Controller { diff --git a/app/Http/Controllers/V1/Report/CustomerSalesReportController.php b/app/Http/Controllers/V1/Report/CustomerSalesReportController.php index ec0cc237..7df1c048 100644 --- a/app/Http/Controllers/V1/Report/CustomerSalesReportController.php +++ b/app/Http/Controllers/V1/Report/CustomerSalesReportController.php @@ -2,14 +2,14 @@ namespace Crater\Http\Controllers\V1\Report; -use Illuminate\Support\Facades\App; -use Illuminate\Http\Request; -use Crater\Models\Company; -use PDF; use Carbon\Carbon; -use Crater\Models\User; -use Crater\Models\CompanySetting; use Crater\Http\Controllers\Controller; +use Crater\Models\Company; +use Crater\Models\CompanySetting; +use Crater\Models\User; +use Illuminate\Http\Request; +use Illuminate\Support\Facades\App; +use PDF; class CustomerSalesReportController extends Controller { @@ -32,11 +32,11 @@ class CustomerSalesReportController extends Controller $end = Carbon::createFromFormat('Y-m-d', $request->to_date); $customers = User::with(['invoices' => function ($query) use ($start, $end) { - $query->whereBetween( - 'invoice_date', - [$start->format('Y-m-d'), $end->format('Y-m-d')] - ); - }]) + $query->whereBetween( + 'invoice_date', + [$start->format('Y-m-d'), $end->format('Y-m-d')] + ); + }]) ->customer() ->whereCompany($company->id) ->applyInvoiceFilters($request->only(['from_date', 'to_date'])) @@ -65,7 +65,7 @@ class CustomerSalesReportController extends Controller 'footer_text_color', 'footer_total_color', 'footer_bg_color', - 'date_text_color' + 'date_text_color', ]; $colorSettings = CompanySetting::whereIn('option', $colors) @@ -78,7 +78,7 @@ class CustomerSalesReportController extends Controller 'colorSettings' => $colorSettings, 'company' => $company, 'from_date' => $from_date, - 'to_date' => $to_date + 'to_date' => $to_date, ]); $pdf = PDF::loadView('app.pdf.reports.sales-customers'); diff --git a/app/Http/Controllers/V1/Report/ExpensesReportController.php b/app/Http/Controllers/V1/Report/ExpensesReportController.php index 6190b74e..7e44b470 100644 --- a/app/Http/Controllers/V1/Report/ExpensesReportController.php +++ b/app/Http/Controllers/V1/Report/ExpensesReportController.php @@ -2,14 +2,14 @@ namespace Crater\Http\Controllers\V1\Report; -use Illuminate\Http\Request; -use Crater\Models\Company; -use PDF; use Carbon\Carbon; -use Crater\Models\Expense; -use Crater\Models\CompanySetting; use Crater\Http\Controllers\Controller; +use Crater\Models\Company; +use Crater\Models\CompanySetting; +use Crater\Models\Expense; +use Illuminate\Http\Request; use Illuminate\Support\Facades\App; +use PDF; class ExpensesReportController extends Controller { @@ -52,7 +52,7 @@ class ExpensesReportController extends Controller 'footer_text_color', 'footer_total_color', 'footer_bg_color', - 'date_text_color' + 'date_text_color', ]; $colorSettings = CompanySetting::whereIn('option', $colors) ->whereCompany($company->id) @@ -64,7 +64,7 @@ class ExpensesReportController extends Controller 'totalExpense' => $totalAmount, 'company' => $company, 'from_date' => $from_date, - 'to_date' => $to_date + 'to_date' => $to_date, ]); $pdf = PDF::loadView('app.pdf.reports.expenses'); diff --git a/app/Http/Controllers/V1/Report/ItemSalesReportController.php b/app/Http/Controllers/V1/Report/ItemSalesReportController.php index 8e954c37..2d7a9967 100644 --- a/app/Http/Controllers/V1/Report/ItemSalesReportController.php +++ b/app/Http/Controllers/V1/Report/ItemSalesReportController.php @@ -2,14 +2,14 @@ namespace Crater\Http\Controllers\V1\Report; -use Illuminate\Http\Request; -use Crater\Models\Company; -use PDF; use Carbon\Carbon; -use Crater\Models\InvoiceItem; -use Crater\Models\CompanySetting; use Crater\Http\Controllers\Controller; +use Crater\Models\Company; +use Crater\Models\CompanySetting; +use Crater\Models\InvoiceItem; +use Illuminate\Http\Request; use Illuminate\Support\Facades\App; +use PDF; class ItemSalesReportController extends Controller { @@ -51,7 +51,7 @@ class ItemSalesReportController extends Controller 'footer_text_color', 'footer_total_color', 'footer_bg_color', - 'date_text_color' + 'date_text_color', ]; $colorSettings = CompanySetting::whereIn('option', $colors) ->whereCompany($company->id) @@ -63,7 +63,7 @@ class ItemSalesReportController extends Controller 'totalAmount' => $totalAmount, 'company' => $company, 'from_date' => $from_date, - 'to_date' => $to_date + 'to_date' => $to_date, ]); $pdf = PDF::loadView('app.pdf.reports.sales-items'); diff --git a/app/Http/Controllers/V1/Report/ProfitLossReportController.php b/app/Http/Controllers/V1/Report/ProfitLossReportController.php index 389f5660..56b916b3 100644 --- a/app/Http/Controllers/V1/Report/ProfitLossReportController.php +++ b/app/Http/Controllers/V1/Report/ProfitLossReportController.php @@ -2,15 +2,15 @@ namespace Crater\Http\Controllers\V1\Report; -use Illuminate\Http\Request; -use Crater\Models\Company; -use PDF; use Carbon\Carbon; -use Crater\Models\Invoice; -use Crater\Models\Expense; -use Crater\Models\CompanySetting; use Crater\Http\Controllers\Controller; +use Crater\Models\Company; +use Crater\Models\CompanySetting; +use Crater\Models\Expense; +use Crater\Models\Invoice; +use Illuminate\Http\Request; use Illuminate\Support\Facades\App; +use PDF; class ProfitLossReportController extends Controller { @@ -58,7 +58,7 @@ class ProfitLossReportController extends Controller 'footer_text_color', 'footer_total_color', 'footer_bg_color', - 'date_text_color' + 'date_text_color', ]; $colorSettings = CompanySetting::whereIn('option', $colors) ->whereCompany($company->id) @@ -72,7 +72,7 @@ class ProfitLossReportController extends Controller 'colorSettings' => $colorSettings, 'company' => $company, 'from_date' => $from_date, - 'to_date' => $to_date + 'to_date' => $to_date, ]); $pdf = PDF::loadView('app.pdf.reports.profit-loss'); diff --git a/app/Http/Controllers/V1/Report/TaxSummaryReportController.php b/app/Http/Controllers/V1/Report/TaxSummaryReportController.php index 3babe7fd..b5467556 100644 --- a/app/Http/Controllers/V1/Report/TaxSummaryReportController.php +++ b/app/Http/Controllers/V1/Report/TaxSummaryReportController.php @@ -2,14 +2,14 @@ namespace Crater\Http\Controllers\V1\Report; -use Illuminate\Http\Request; -use Crater\Models\Company; -use PDF; use Carbon\Carbon; -use Crater\Models\Tax; -use Crater\Models\CompanySetting; use Crater\Http\Controllers\Controller; +use Crater\Models\Company; +use Crater\Models\CompanySetting; +use Crater\Models\Tax; +use Illuminate\Http\Request; use Illuminate\Support\Facades\App; +use PDF; class TaxSummaryReportController extends Controller { @@ -52,7 +52,7 @@ class TaxSummaryReportController extends Controller 'footer_text_color', 'footer_total_color', 'footer_bg_color', - 'date_text_color' + 'date_text_color', ]; $colorSettings = CompanySetting::whereIn('option', $colors) @@ -65,7 +65,7 @@ class TaxSummaryReportController extends Controller 'colorSettings' => $colorSettings, 'company' => $company, 'from_date' => $from_date, - 'to_date' => $to_date + 'to_date' => $to_date, ]); $pdf = PDF::loadView('app.pdf.reports.tax-summary'); diff --git a/app/Http/Controllers/V1/Settings/CompanyController.php b/app/Http/Controllers/V1/Settings/CompanyController.php index 7ff4d58a..3591d155 100644 --- a/app/Http/Controllers/V1/Settings/CompanyController.php +++ b/app/Http/Controllers/V1/Settings/CompanyController.php @@ -2,11 +2,11 @@ namespace Crater\Http\Controllers\V1\Settings; -use Illuminate\Http\Request; -use Crater\Models\Company; -use Crater\Http\Requests\ProfileRequest; -use Crater\Http\Requests\CompanyRequest; use Crater\Http\Controllers\Controller; +use Crater\Http\Requests\CompanyRequest; +use Crater\Http\Requests\ProfileRequest; +use Crater\Models\Company; +use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; class CompanyController extends Controller @@ -24,11 +24,11 @@ class CompanyController extends Controller 'addresses.country', 'company', 'company.address', - 'company.address.country' + 'company.address.country', ]); return response()->json([ - 'user' => $user + 'user' => $user, ]); } @@ -47,7 +47,7 @@ class CompanyController extends Controller return response()->json([ 'user' => $user, - 'success' => true + 'success' => true, ]); } @@ -66,7 +66,7 @@ class CompanyController extends Controller return response()->json([ 'company' => $company, - 'success' => true + 'success' => true, ]); } @@ -93,7 +93,7 @@ class CompanyController extends Controller } return response()->json([ - 'success' => true + 'success' => true, ]); } @@ -121,7 +121,7 @@ class CompanyController extends Controller return response()->json([ 'user' => $user, - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Settings/DiskController.php b/app/Http/Controllers/V1/Settings/DiskController.php index 8e9563a1..9f00901f 100644 --- a/app/Http/Controllers/V1/Settings/DiskController.php +++ b/app/Http/Controllers/V1/Settings/DiskController.php @@ -3,10 +3,10 @@ namespace Crater\Http\Controllers\V1\Settings; use Crater\Http\Controllers\Controller; -use Illuminate\Http\Request; -use Crater\Models\FileDisk; use Crater\Http\Requests\DiskEnvironmentRequest; +use Crater\Models\FileDisk; use Illuminate\Http\JsonResponse; +use Illuminate\Http\Request; class DiskController extends Controller { @@ -33,10 +33,10 @@ class DiskController extends Controller */ public function store(DiskEnvironmentRequest $request) { - if(!FileDisk::validateCredentials($request->credentials, $request->driver)) { + if (! FileDisk::validateCredentials($request->credentials, $request->driver)) { return response()->json([ 'success' => false, - 'error' => 'invalid_credentials' + 'error' => 'invalid_credentials', ]); } @@ -44,7 +44,7 @@ class DiskController extends Controller return response()->json([ 'success' => true, - 'disk' => $disk + 'disk' => $disk, ]); } @@ -59,22 +59,22 @@ class DiskController extends Controller $credentials = $request->credentials; $driver = $request->driver; - if($credentials && $driver && $disk->type !== 'SYSTEM') { - if(!FileDisk::validateCredentials($credentials, $driver)) { + if ($credentials && $driver && $disk->type !== 'SYSTEM') { + if (! FileDisk::validateCredentials($credentials, $driver)) { return response()->json([ 'success' => false, - 'error' => 'invalid_credentials' + 'error' => 'invalid_credentials', ]); } $disk->updateDisk($request); - } else if($request->set_as_default) { + } elseif ($request->set_as_default) { $disk->setAsDefaultDisk(); } return response()->json([ 'success' => true, - 'disk' => $disk + 'disk' => $disk, ]); } @@ -90,6 +90,7 @@ class DiskController extends Controller $diskData = [ 'root' => config('filesystems.disks.local.root'), ]; + break; @@ -101,6 +102,7 @@ class DiskController extends Controller 'bucket' => '', 'root' => '', ]; + break; case 'doSpaces': @@ -112,6 +114,7 @@ class DiskController extends Controller 'endpoint' => '', 'root' => '', ]; + break; case 'dropbox': @@ -122,6 +125,7 @@ class DiskController extends Controller 'app' => '', 'root' => '', ]; + break; } @@ -140,14 +144,14 @@ class DiskController extends Controller { if ($disk->setAsDefault() && $disk->type === 'SYSTEM') { return response()->json([ - 'success' => false + 'success' => false, ]); } $disk->delete(); return response()->json([ - 'success' => true + 'success' => true, ]); } @@ -160,19 +164,19 @@ class DiskController extends Controller $drivers = [ [ 'name' => 'Local', - 'value' => 'local' + 'value' => 'local', ], [ 'name' => 'Amazon S3', - 'value' => 's3' + 'value' => 's3', ], [ 'name' => 'Digital Ocean Spaces', - 'value' => 'doSpaces' + 'value' => 'doSpaces', ], [ 'name' => 'Dropbox', - 'value' => 'dropbox' + 'value' => 'dropbox', ], ]; @@ -180,7 +184,7 @@ class DiskController extends Controller return response()->json([ 'drivers' => $drivers, - 'default' => $default + 'default' => $default, ]); } } diff --git a/app/Http/Controllers/V1/Settings/GetCompanySettingsController.php b/app/Http/Controllers/V1/Settings/GetCompanySettingsController.php index eb567559..115ec4b5 100644 --- a/app/Http/Controllers/V1/Settings/GetCompanySettingsController.php +++ b/app/Http/Controllers/V1/Settings/GetCompanySettingsController.php @@ -2,9 +2,9 @@ namespace Crater\Http\Controllers\V1\Settings; -use Crater\Models\CompanySetting; use Crater\Http\Controllers\Controller; use Crater\Http\Requests\GetSettingsRequest; +use Crater\Models\CompanySetting; class GetCompanySettingsController extends Controller { diff --git a/app/Http/Controllers/V1/Settings/MailConfigurationController.php b/app/Http/Controllers/V1/Settings/MailConfigurationController.php index 5eabc85b..d1762351 100755 --- a/app/Http/Controllers/V1/Settings/MailConfigurationController.php +++ b/app/Http/Controllers/V1/Settings/MailConfigurationController.php @@ -2,13 +2,13 @@ namespace Crater\Http\Controllers\V1\Settings; -use Crater\Models\Setting; -use Illuminate\Http\Request; -use Crater\Space\EnvironmentManager; -use Crater\Http\Requests\MailEnvironmentRequest; -use Illuminate\Http\JsonResponse; use Crater\Http\Controllers\Controller; +use Crater\Http\Requests\MailEnvironmentRequest; use Crater\Mail\TestMail; +use Crater\Models\Setting; +use Crater\Space\EnvironmentManager; +use Illuminate\Http\JsonResponse; +use Illuminate\Http\Request; use Mail; class MailConfigurationController extends Controller @@ -36,8 +36,7 @@ class MailConfigurationController extends Controller $setting = Setting::getSetting('profile_complete'); $results = $this->environmentManager->saveMailVariables($request); - if ($setting !== 'COMPLETED') - { + if ($setting !== 'COMPLETED') { Setting::setSetting('profile_complete', 4); } @@ -77,7 +76,7 @@ class MailConfigurationController extends Controller 'mail', 'sendmail', 'mailgun', - 'ses' + 'ses', ]; return response()->json($drivers); @@ -88,13 +87,13 @@ class MailConfigurationController extends Controller $this->validate($request, [ 'to' => 'required|email', 'subject' => 'required', - 'message' => 'required' + 'message' => 'required', ]); Mail::to($request->to)->send(new TestMail($request->subject, $request->message)); return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Settings/TaxTypesController.php b/app/Http/Controllers/V1/Settings/TaxTypesController.php index e4fed9e9..3f3c1053 100644 --- a/app/Http/Controllers/V1/Settings/TaxTypesController.php +++ b/app/Http/Controllers/V1/Settings/TaxTypesController.php @@ -2,10 +2,10 @@ namespace Crater\Http\Controllers\V1\Settings; -use Crater\Models\TaxType; -use Crater\Http\Requests\TaxTypeRequest; -use Illuminate\Http\Request; use Crater\Http\Controllers\Controller; +use Crater\Http\Requests\TaxTypeRequest; +use Crater\Models\TaxType; +use Illuminate\Http\Request; class TaxTypesController extends Controller { @@ -23,13 +23,13 @@ class TaxTypesController extends Controller 'tax_type_id', 'search', 'orderByField', - 'orderBy' + 'orderBy', ])) ->latest() ->paginateData($limit); return response()->json([ - 'taxTypes' => $taxTypes + 'taxTypes' => $taxTypes, ]); } @@ -61,7 +61,7 @@ class TaxTypesController extends Controller public function show(TaxType $taxType) { return response()->json([ - 'taxType' => $taxType + 'taxType' => $taxType, ]); } @@ -91,13 +91,13 @@ class TaxTypesController extends Controller { if ($taxType->taxes() && $taxType->taxes()->count() > 0) { return response()->json([ - 'success' => false + 'success' => false, ]); } $taxType->delete(); return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Settings/UpdateCompanySettingsController.php b/app/Http/Controllers/V1/Settings/UpdateCompanySettingsController.php index 5f9089b7..a434727c 100644 --- a/app/Http/Controllers/V1/Settings/UpdateCompanySettingsController.php +++ b/app/Http/Controllers/V1/Settings/UpdateCompanySettingsController.php @@ -2,9 +2,9 @@ namespace Crater\Http\Controllers\V1\Settings; -use Crater\Models\CompanySetting; use Crater\Http\Controllers\Controller; use Crater\Http\Requests\UpdateSettingsRequest; +use Crater\Models\CompanySetting; class UpdateCompanySettingsController extends Controller { @@ -19,7 +19,7 @@ class UpdateCompanySettingsController extends Controller CompanySetting::setSettings($request->settings, $request->header('company')); return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Settings/UpdateUserSettingsController.php b/app/Http/Controllers/V1/Settings/UpdateUserSettingsController.php index 7be67843..2b3367ae 100644 --- a/app/Http/Controllers/V1/Settings/UpdateUserSettingsController.php +++ b/app/Http/Controllers/V1/Settings/UpdateUserSettingsController.php @@ -21,7 +21,7 @@ class UpdateUserSettingsController extends Controller $user->setSettings($request->settings); return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Update/CopyFilesController.php b/app/Http/Controllers/V1/Update/CopyFilesController.php index 5ad6b56e..38a0e9a5 100644 --- a/app/Http/Controllers/V1/Update/CopyFilesController.php +++ b/app/Http/Controllers/V1/Update/CopyFilesController.php @@ -24,7 +24,7 @@ class CopyFilesController extends Controller return response()->json([ 'success' => true, - 'path' => $path + 'path' => $path, ]); } } diff --git a/app/Http/Controllers/V1/Update/DeleteFilesController.php b/app/Http/Controllers/V1/Update/DeleteFilesController.php index f788605e..8ec78243 100644 --- a/app/Http/Controllers/V1/Update/DeleteFilesController.php +++ b/app/Http/Controllers/V1/Update/DeleteFilesController.php @@ -3,8 +3,8 @@ namespace Crater\Http\Controllers\V1\Update; use Crater\Http\Controllers\Controller; -use Illuminate\Http\Request; use Crater\Space\Updater; +use Illuminate\Http\Request; class DeleteFilesController extends Controller { @@ -16,8 +16,7 @@ class DeleteFilesController extends Controller */ public function __invoke(Request $request) { - - if(isset($request->deleted_files) && !empty($request->deleted_files)) { + if (isset($request->deleted_files) && ! empty($request->deleted_files)) { Updater::deleteFiles($request->deleted_files); } diff --git a/app/Http/Controllers/V1/Update/DownloadUpdateController.php b/app/Http/Controllers/V1/Update/DownloadUpdateController.php index 7bfe4211..6b853eaa 100644 --- a/app/Http/Controllers/V1/Update/DownloadUpdateController.php +++ b/app/Http/Controllers/V1/Update/DownloadUpdateController.php @@ -24,7 +24,7 @@ class DownloadUpdateController extends Controller return response()->json([ 'success' => true, - 'path' => $path + 'path' => $path, ]); } } diff --git a/app/Http/Controllers/V1/Update/MigrateUpdateController.php b/app/Http/Controllers/V1/Update/MigrateUpdateController.php index 3f03cff1..c1abe512 100644 --- a/app/Http/Controllers/V1/Update/MigrateUpdateController.php +++ b/app/Http/Controllers/V1/Update/MigrateUpdateController.php @@ -19,7 +19,7 @@ class MigrateUpdateController extends Controller Updater::migrateUpdate(); return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Controllers/V1/Update/UnzipUpdateController.php b/app/Http/Controllers/V1/Update/UnzipUpdateController.php index 198c5c8e..bdfa466a 100644 --- a/app/Http/Controllers/V1/Update/UnzipUpdateController.php +++ b/app/Http/Controllers/V1/Update/UnzipUpdateController.php @@ -25,13 +25,12 @@ class UnzipUpdateController extends Controller return response()->json([ 'success' => true, - 'path' => $path + 'path' => $path, ]); - } catch (\Exception $e) { return response()->json([ 'success' => false, - 'error' => $e->getMessage() + 'error' => $e->getMessage(), ], 500); } } diff --git a/app/Http/Controllers/V1/Update/UpdateController.php b/app/Http/Controllers/V1/Update/UpdateController.php index 2ae79ac4..1339f713 100644 --- a/app/Http/Controllers/V1/Update/UpdateController.php +++ b/app/Http/Controllers/V1/Update/UpdateController.php @@ -2,12 +2,10 @@ namespace Crater\Http\Controllers\V1\Update; -use Crater\Models\Setting; -use Illuminate\Http\Request; -use Crater\Space\Updater; -use Crater\Space\SiteApi; -use Illuminate\Support\Facades\Artisan; use Crater\Http\Controllers\Controller; +use Crater\Models\Setting; +use Crater\Space\Updater; +use Illuminate\Http\Request; class UpdateController extends Controller { @@ -21,7 +19,7 @@ class UpdateController extends Controller return response()->json([ 'success' => true, - 'path' => $path + 'path' => $path, ]); } @@ -36,13 +34,12 @@ class UpdateController extends Controller return response()->json([ 'success' => true, - 'path' => $path + 'path' => $path, ]); - } catch (\Exception $e) { return response()->json([ 'success' => false, - 'error' => $e->getMessage() + 'error' => $e->getMessage(), ], 500); } } @@ -57,7 +54,7 @@ class UpdateController extends Controller return response()->json([ 'success' => true, - 'path' => $path + 'path' => $path, ]); } @@ -66,7 +63,7 @@ class UpdateController extends Controller Updater::migrateUpdate(); return response()->json([ - 'success' => true + 'success' => true, ]); } diff --git a/app/Http/Controllers/V1/Users/UsersController.php b/app/Http/Controllers/V1/Users/UsersController.php index 5c5d8f5a..e05ef914 100644 --- a/app/Http/Controllers/V1/Users/UsersController.php +++ b/app/Http/Controllers/V1/Users/UsersController.php @@ -4,8 +4,8 @@ namespace Crater\Http\Controllers\V1\Users; use Crater\Http\Controllers\Controller; use Crater\Http\Requests\UserRequest; -use Crater\Models\User; use Crater\Models\CompanySetting; +use Crater\Models\User; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; @@ -28,14 +28,14 @@ class UsersController extends Controller 'email', 'display_name', 'orderByField', - 'orderBy' + 'orderBy', ]) ) ->latest() ->paginate($limit); return response()->json([ - 'users' => $users + 'users' => $users, ]); } @@ -54,12 +54,12 @@ class UsersController extends Controller $user = User::create($data); $user->setSettings([ - 'language' => CompanySetting::getSetting('language', $user->company_id) + 'language' => CompanySetting::getSetting('language', $user->company_id), ]); return response()->json([ 'user' => $user, - 'success' => true + 'success' => true, ]); } @@ -73,7 +73,7 @@ class UsersController extends Controller { return response()->json([ 'user' => $user, - 'success' => true + 'success' => true, ]); } @@ -90,7 +90,7 @@ class UsersController extends Controller return response()->json([ 'user' => $user, - 'success' => true + 'success' => true, ]); } @@ -107,7 +107,7 @@ class UsersController extends Controller } return response()->json([ - 'success' => true + 'success' => true, ]); } } diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 15bfffb4..f725282d 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -2,8 +2,8 @@ namespace Crater\Http; -use Illuminate\Foundation\Http\Kernel as HttpKernel; use Crater\Http\Middleware\AdminMiddleware; +use Illuminate\Foundation\Http\Kernel as HttpKernel; use Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful; class Kernel extends HttpKernel @@ -22,7 +22,7 @@ class Kernel extends HttpKernel \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, \Crater\Http\Middleware\TrustProxies::class, \Crater\Http\Middleware\ConfigMiddleware::class, - \Fruitcake\Cors\HandleCors::class + \Fruitcake\Cors\HandleCors::class, ]; /** @@ -68,6 +68,7 @@ class Kernel extends HttpKernel 'redirect-if-installed' => \Crater\Http\Middleware\RedirectIfInstalled::class, 'redirect-if-unauthenticated' => \Crater\Http\Middleware\RedirectIfUnauthorized::class, ]; + /** * The priority-sorted list of middleware. * diff --git a/app/Http/Middleware/AdminMiddleware.php b/app/Http/Middleware/AdminMiddleware.php index d44e3752..83cfeec9 100644 --- a/app/Http/Middleware/AdminMiddleware.php +++ b/app/Http/Middleware/AdminMiddleware.php @@ -17,7 +17,7 @@ class AdminMiddleware */ public function handle($request, Closure $next, $guard = null) { - if (Auth::guard($guard)->guest() || !Auth::user()->isSuperAdminOrAdmin()) { + if (Auth::guard($guard)->guest() || ! Auth::user()->isSuperAdminOrAdmin()) { if ($request->ajax() || $request->wantsJson()) { return response('Unauthorized.', 401); } else { diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index 37f8aa63..41de8502 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -1,4 +1,5 @@ has('file_disk_id')) { + if ($request->has('file_disk_id')) { $file_disk = FileDisk::find($request->file_disk_id); } else { $file_disk = FileDisk::whereSetAsDefault(true)->first(); } - if($file_disk) { + if ($file_disk) { $file_disk->setConfig(); } } diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php index 7b4b7fd3..4a5ba505 100644 --- a/app/Http/Middleware/EncryptCookies.php +++ b/app/Http/Middleware/EncryptCookies.php @@ -1,4 +1,5 @@ has('database_created')) { + if (! \Storage::disk('local')->has('database_created')) { return redirect('/on-boarding'); } diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index 7371d4fd..60b61a24 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -2,8 +2,8 @@ namespace Crater\Http\Middleware; -use Crater\Providers\RouteServiceProvider; use Closure; +use Crater\Providers\RouteServiceProvider; use Illuminate\Support\Facades\Auth; class RedirectIfAuthenticated diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php index eed03a30..8336b47e 100644 --- a/app/Http/Middleware/TrimStrings.php +++ b/app/Http/Middleware/TrimStrings.php @@ -1,4 +1,5 @@ [ - 'required' + 'required', ], 'country_id' => [ - 'required' - ] + 'required', + ], ]; } } diff --git a/app/Http/Requests/CompanySettingRequest.php b/app/Http/Requests/CompanySettingRequest.php index 380c88fd..306deae7 100644 --- a/app/Http/Requests/CompanySettingRequest.php +++ b/app/Http/Requests/CompanySettingRequest.php @@ -1,4 +1,5 @@ [ - 'required' + 'required', ], 'time_zone' => [ - 'required' + 'required', ], 'language' => [ - 'required' + 'required', ], 'fiscal_year' => [ - 'required' + 'required', ], 'moment_date_format' => [ - 'required' + 'required', ], 'carbon_date_format' => [ - 'required' - ] + 'required', + ], ]; } } diff --git a/app/Http/Requests/CustomerRequest.php b/app/Http/Requests/CustomerRequest.php index cdfb7bd6..ed0fa389 100644 --- a/app/Http/Requests/CustomerRequest.php +++ b/app/Http/Requests/CustomerRequest.php @@ -26,19 +26,19 @@ class CustomerRequest extends FormRequest { $rules = [ 'name' => [ - 'required' + 'required', ], 'addresses.*.address_street_1' => [ - 'max:255' + 'max:255', ], 'addresses.*.address_street_2' => [ - 'max:255' + 'max:255', ], 'email' => [ 'email', 'nullable', 'unique:users,email', - ] + ], ]; if ($this->isMethod('PUT') && $this->email != null) { @@ -46,8 +46,8 @@ class CustomerRequest extends FormRequest 'email' => [ 'email', 'nullable', - Rule::unique('users')->ignore($this->route('customer')->id) - ] + Rule::unique('users')->ignore($this->route('customer')->id), + ], ]; }; diff --git a/app/Http/Requests/DatabaseEnvironmentRequest.php b/app/Http/Requests/DatabaseEnvironmentRequest.php index e8f442c6..cca487a1 100644 --- a/app/Http/Requests/DatabaseEnvironmentRequest.php +++ b/app/Http/Requests/DatabaseEnvironmentRequest.php @@ -28,51 +28,53 @@ class DatabaseEnvironmentRequest extends FormRequest return [ 'app_url' => [ 'required', - 'url' + 'url', ], 'app_domain' => [ 'required', ], 'database_connection' => [ 'required', - 'string' + 'string', ], 'database_name' => [ 'required', - 'string' + 'string', ], ]; + break; default: return [ 'app_url' => [ 'required', - 'url' + 'url', ], 'app_domain' => [ 'required', ], 'database_connection' => [ 'required', - 'string' + 'string', ], 'database_hostname' => [ 'required', - 'string' + 'string', ], 'database_port' => [ 'required', - 'numeric' + 'numeric', ], 'database_name' => [ 'required', - 'string' + 'string', ], 'database_username' => [ 'required', - 'string' + 'string', ], ]; + break; } diff --git a/app/Http/Requests/DeleteCustomersRequest.php b/app/Http/Requests/DeleteCustomersRequest.php index fb5c4525..551732d0 100644 --- a/app/Http/Requests/DeleteCustomersRequest.php +++ b/app/Http/Requests/DeleteCustomersRequest.php @@ -2,8 +2,8 @@ namespace Crater\Http\Requests; -use Illuminate\Validation\Rule; use Illuminate\Foundation\Http\FormRequest; +use Illuminate\Validation\Rule; class DeleteCustomersRequest extends FormRequest { @@ -26,12 +26,12 @@ class DeleteCustomersRequest extends FormRequest { return [ 'ids' => [ - 'required' + 'required', ], 'ids.*' => [ 'required', - Rule::exists('users', 'id') - ] + Rule::exists('users', 'id'), + ], ]; } } diff --git a/app/Http/Requests/DeleteEstimatesRequest.php b/app/Http/Requests/DeleteEstimatesRequest.php index c9833622..c1e65d03 100644 --- a/app/Http/Requests/DeleteEstimatesRequest.php +++ b/app/Http/Requests/DeleteEstimatesRequest.php @@ -26,12 +26,12 @@ class DeleteEstimatesRequest extends FormRequest { return [ 'ids' => [ - 'required' + 'required', ], 'ids.*' => [ 'required', - Rule::exists('estimates', 'id') - ] + Rule::exists('estimates', 'id'), + ], ]; } } diff --git a/app/Http/Requests/DeleteExpensesRequest.php b/app/Http/Requests/DeleteExpensesRequest.php index 0b90a9d0..6a8c1c33 100644 --- a/app/Http/Requests/DeleteExpensesRequest.php +++ b/app/Http/Requests/DeleteExpensesRequest.php @@ -26,12 +26,12 @@ class DeleteExpensesRequest extends FormRequest { return [ 'ids' => [ - 'required' + 'required', ], 'ids.*' => [ 'required', - Rule::exists('expenses', 'id') - ] + Rule::exists('expenses', 'id'), + ], ]; } } diff --git a/app/Http/Requests/DeleteInvoiceRequest.php b/app/Http/Requests/DeleteInvoiceRequest.php index 0ccaa87b..1651547d 100644 --- a/app/Http/Requests/DeleteInvoiceRequest.php +++ b/app/Http/Requests/DeleteInvoiceRequest.php @@ -4,8 +4,8 @@ namespace Crater\Http\Requests; use Crater\Models\Invoice; use Crater\Rules\RelationNotExist; -use Illuminate\Validation\Rule; use Illuminate\Foundation\Http\FormRequest; +use Illuminate\Validation\Rule; class DeleteInvoiceRequest extends FormRequest { @@ -28,13 +28,13 @@ class DeleteInvoiceRequest extends FormRequest { return [ 'ids' => [ - 'required' + 'required', ], 'ids.*' => [ 'required', Rule::exists('invoices', 'id'), - new RelationNotExist(Invoice::class, 'payments') - ] + new RelationNotExist(Invoice::class, 'payments'), + ], ]; } } diff --git a/app/Http/Requests/DeleteItemsRequest.php b/app/Http/Requests/DeleteItemsRequest.php index 70b00805..3c6bce72 100644 --- a/app/Http/Requests/DeleteItemsRequest.php +++ b/app/Http/Requests/DeleteItemsRequest.php @@ -28,15 +28,15 @@ class DeleteItemsRequest extends FormRequest { return [ 'ids' => [ - 'required' + 'required', ], 'ids.*' => [ 'required', Rule::exists('items', 'id'), new RelationNotExist(Item::class, 'invoiceItems'), new RelationNotExist(Item::class, 'estimateItems'), - new RelationNotExist(Item::class, 'taxes') - ] + new RelationNotExist(Item::class, 'taxes'), + ], ]; } } diff --git a/app/Http/Requests/DeletePaymentsRequest.php b/app/Http/Requests/DeletePaymentsRequest.php index 6b8a84bc..29da7455 100644 --- a/app/Http/Requests/DeletePaymentsRequest.php +++ b/app/Http/Requests/DeletePaymentsRequest.php @@ -26,12 +26,12 @@ class DeletePaymentsRequest extends FormRequest { return [ 'ids' => [ - 'required' + 'required', ], 'ids.*' => [ 'required', - Rule::exists('payments', 'id') - ] + Rule::exists('payments', 'id'), + ], ]; } } diff --git a/app/Http/Requests/DiskEnvironmentRequest.php b/app/Http/Requests/DiskEnvironmentRequest.php index 45536b08..f6e66a14 100644 --- a/app/Http/Requests/DiskEnvironmentRequest.php +++ b/app/Http/Requests/DiskEnvironmentRequest.php @@ -29,79 +29,82 @@ class DiskEnvironmentRequest extends FormRequest $rules = [ 'credentials.key' => [ 'required', - 'string' + 'string', ], 'credentials.secret' => [ 'required', - 'string' + 'string', ], 'credentials.region' => [ 'required', - 'string' + 'string', ], 'credentials.bucket' => [ 'required', - 'string' + 'string', ], 'credentials.root' => [ 'required', - 'string' + 'string', ], ]; + break; case 'doSpaces': $rules = [ 'credentials.key' => [ 'required', - 'string' + 'string', ], 'credentials.secret' => [ 'required', - 'string' + 'string', ], 'credentials.region' => [ 'required', - 'string' + 'string', ], 'credentials.bucket' => [ 'required', - 'string' + 'string', ], 'credentials.endpoint' => [ 'required', - 'string' + 'string', ], 'credentials.root' => [ 'required', - 'string' + 'string', ], ]; + break; case 'dropbox': $rules = [ 'credentials.token' => [ 'required', - 'string' + 'string', ], 'credentials.key' => [ 'required', - 'string' + 'string', ], 'credentials.secret' => [ 'required', - 'string' + 'string', ], 'credentials.app' => [ 'required', - 'string' + 'string', ], 'credentials.root' => [ 'required', - 'string' + 'string', ], ]; + break; } @@ -111,7 +114,7 @@ class DiskEnvironmentRequest extends FormRequest ], 'driver' => [ 'required', - ] + ], ]; return array_merge($rules, $defaultRules); diff --git a/app/Http/Requests/EstimatesRequest.php b/app/Http/Requests/EstimatesRequest.php index ac0dfc46..4bb5786a 100644 --- a/app/Http/Requests/EstimatesRequest.php +++ b/app/Http/Requests/EstimatesRequest.php @@ -1,4 +1,5 @@ [ - 'required' + 'required', ], 'expiry_date' => [ - 'required' + 'required', ], 'user_id' => [ - 'required' + 'required', ], 'estimate_number' => [ 'required', - new UniqueNumber(Estimate::class) + new UniqueNumber(Estimate::class), ], 'discount' => [ - 'required' + 'required', ], 'discount_val' => [ - 'required' + 'required', ], 'sub_total' => [ - 'required' + 'required', ], 'total' => [ - 'required' + 'required', ], 'tax' => [ - 'required' + 'required', ], 'estimate_template_id' => [ - 'required' + 'required', ], 'items' => [ 'required', - 'array' + 'array', ], 'items.*.description' => [ - 'max:255' + 'max:255', ], 'items.*' => [ 'required', - 'max:255' + 'max:255', ], 'items.*.name' => [ - 'required' + 'required', ], 'items.*.quantity' => [ - 'required' + 'required', ], 'items.*.price' => [ - 'required' - ] + 'required', + ], ]; if ($this->isMethod('PUT')) { $rules['estimate_number'] = [ 'required', - new UniqueNumber(Estimate::class, $this->route('estimate')->id) + new UniqueNumber(Estimate::class, $this->route('estimate')->id), ]; } diff --git a/app/Http/Requests/ExpenseCategoryRequest.php b/app/Http/Requests/ExpenseCategoryRequest.php index a09343dc..c8a5e3a1 100644 --- a/app/Http/Requests/ExpenseCategoryRequest.php +++ b/app/Http/Requests/ExpenseCategoryRequest.php @@ -1,4 +1,5 @@ [ - 'required' + 'required', ], 'description' => [ - 'nullable' - ] + 'nullable', + ], ]; } } diff --git a/app/Http/Requests/ExpenseRequest.php b/app/Http/Requests/ExpenseRequest.php index a822e443..e2939f66 100644 --- a/app/Http/Requests/ExpenseRequest.php +++ b/app/Http/Requests/ExpenseRequest.php @@ -25,20 +25,20 @@ class ExpenseRequest extends FormRequest { return [ 'expense_date' => [ - 'required' + 'required', ], 'expense_category_id' => [ - 'required' + 'required', ], 'amount' => [ - 'required' + 'required', ], 'user_id' => [ - 'nullable' + 'nullable', ], 'notes' => [ - 'nullable' - ] + 'nullable', + ], ]; } } diff --git a/app/Http/Requests/GetSettingsRequest.php b/app/Http/Requests/GetSettingsRequest.php index 21390d83..f0b77297 100644 --- a/app/Http/Requests/GetSettingsRequest.php +++ b/app/Http/Requests/GetSettingsRequest.php @@ -25,12 +25,12 @@ class GetSettingsRequest extends FormRequest { return [ 'settings' => [ - 'required' + 'required', ], 'settings.*' => [ 'required', - 'string' - ] + 'string', + ], ]; } } diff --git a/app/Http/Requests/InvoicesRequest.php b/app/Http/Requests/InvoicesRequest.php index 279f717a..7743d28e 100644 --- a/app/Http/Requests/InvoicesRequest.php +++ b/app/Http/Requests/InvoicesRequest.php @@ -1,4 +1,5 @@ [ - 'required' + 'required', ], 'due_date' => [ - 'required' + 'required', ], 'user_id' => [ - 'required' + 'required', ], 'invoice_number' => [ 'required', - new UniqueNumber(Invoice::class) + new UniqueNumber(Invoice::class), ], 'discount' => [ - 'required' + 'required', ], 'discount_val' => [ - 'required' + 'required', ], 'sub_total' => [ - 'required' + 'required', ], 'total' => [ - 'required' + 'required', ], 'tax' => [ - 'required' + 'required', ], 'invoice_template_id' => [ - 'required' + 'required', ], 'items' => [ 'required', - 'array' + 'array', ], 'items.*' => [ 'required', - 'max:255' + 'max:255', ], 'items.*.description' => [ - 'max:255' + 'max:255', ], 'items.*.name' => [ - 'required' + 'required', ], 'items.*.quantity' => [ - 'required' + 'required', ], 'items.*.price' => [ - 'required' - ] + 'required', + ], ]; if ($this->isMethod('PUT')) { $rules['invoice_number'] = [ 'required', - new UniqueNumber(Invoice::class, $this->route('invoice')->id) + new UniqueNumber(Invoice::class, $this->route('invoice')->id), ]; } diff --git a/app/Http/Requests/ItemsRequest.php b/app/Http/Requests/ItemsRequest.php index 4b8632ca..ba98aaa0 100644 --- a/app/Http/Requests/ItemsRequest.php +++ b/app/Http/Requests/ItemsRequest.php @@ -1,4 +1,5 @@ [ - 'required' + 'required', ], 'price' => [ - 'required' + 'required', ], 'unit_id' => [ - 'nullable' + 'nullable', ], 'description' => [ - 'nullable' - ] + 'nullable', + ], ]; } } diff --git a/app/Http/Requests/MailEnvironmentRequest.php b/app/Http/Requests/MailEnvironmentRequest.php index 0f3ad149..87ff2869 100644 --- a/app/Http/Requests/MailEnvironmentRequest.php +++ b/app/Http/Requests/MailEnvironmentRequest.php @@ -28,119 +28,124 @@ class MailEnvironmentRequest extends FormRequest return [ 'mail_driver' => [ 'required', - 'string' + 'string', ], 'mail_host' => [ 'required', - 'string' + 'string', ], 'mail_port' => [ - 'required' + 'required', ], 'mail_encryption' => [ 'required', - 'string' + 'string', ], 'from_name' => [ 'required', - 'string' + 'string', ], 'from_mail' => [ 'required', - 'string' + 'string', ], ]; + break; case 'mailgun': return [ 'mail_driver' => [ 'required', - 'string' + 'string', ], 'mail_mailgun_domain' => [ 'required', - 'string' + 'string', ], 'mail_mailgun_secret' => [ 'required', - 'string' + 'string', ], 'mail_mailgun_endpoint' => [ 'required', - 'string' + 'string', ], 'from_name' => [ 'required', - 'string' + 'string', ], 'from_mail' => [ 'required', - 'string' + 'string', ], ]; + break; case 'ses': return [ 'mail_driver' => [ 'required', - 'string' + 'string', ], 'mail_host' => [ 'required', - 'string' + 'string', ], 'mail_port' => [ - 'required' + 'required', ], 'mail_ses_key' => [ 'required', - 'string' + 'string', ], 'mail_ses_secret' => [ 'required', - 'string' + 'string', ], 'mail_encryption' => [ 'required', - 'string' + 'string', ], 'from_name' => [ 'required', - 'string' + 'string', ], 'from_mail' => [ 'required', - 'string' + 'string', ], ]; + break; case 'mail': return [ 'from_name' => [ 'required', - 'string' + 'string', ], 'from_mail' => [ 'required', - 'string' - ] + 'string', + ], ]; + break; case 'sendmail': return [ 'from_name' => [ 'required', - 'string' + 'string', ], 'from_mail' => [ 'required', - 'string' - ] + 'string', + ], ]; + break; } } diff --git a/app/Http/Requests/NotesRequest.php b/app/Http/Requests/NotesRequest.php index f765122e..8463ff39 100644 --- a/app/Http/Requests/NotesRequest.php +++ b/app/Http/Requests/NotesRequest.php @@ -26,7 +26,7 @@ class NotesRequest extends FormRequest return [ 'type' => ['required'], 'name' => ['required'], - 'notes' => ['required'] + 'notes' => ['required'], ]; } } diff --git a/app/Http/Requests/PaymentMethodRequest.php b/app/Http/Requests/PaymentMethodRequest.php index c3a79057..8f3766e0 100644 --- a/app/Http/Requests/PaymentMethodRequest.php +++ b/app/Http/Requests/PaymentMethodRequest.php @@ -27,14 +27,14 @@ class PaymentMethodRequest extends FormRequest $data = [ 'name' => [ 'required', - 'unique:payment_methods,name' - ] + 'unique:payment_methods,name', + ], ]; if ($this->getMethod() == 'PUT') { $data['name'] = [ 'required', - Rule::unique('payment_methods')->ignore($this->route('payment_method'), 'id') + Rule::unique('payment_methods')->ignore($this->route('payment_method'), 'id'), ]; } diff --git a/app/Http/Requests/PaymentRequest.php b/app/Http/Requests/PaymentRequest.php index 6b8a6f57..2295ac9e 100644 --- a/app/Http/Requests/PaymentRequest.php +++ b/app/Http/Requests/PaymentRequest.php @@ -27,17 +27,17 @@ class PaymentRequest extends FormRequest { $rules = [ 'payment_date' => [ - 'required' + 'required', ], 'user_id' => [ - 'required' + 'required', ], 'amount' => [ - 'required' + 'required', ], 'payment_number' => [ 'required', - new UniqueNumber(Payment::class) + new UniqueNumber(Payment::class), ], 'invoice_id' => [ 'nullable', @@ -53,7 +53,7 @@ class PaymentRequest extends FormRequest if ($this->isMethod('PUT')) { $rules['payment_number'] = [ 'required', - new UniqueNumber(Payment::class, $this->route('payment')->id) + new UniqueNumber(Payment::class, $this->route('payment')->id), ]; } diff --git a/app/Http/Requests/ProfileRequest.php b/app/Http/Requests/ProfileRequest.php index 43890c88..d2ddca19 100644 --- a/app/Http/Requests/ProfileRequest.php +++ b/app/Http/Requests/ProfileRequest.php @@ -1,9 +1,10 @@ [ - 'required' + 'required', ], 'password' => [ 'nullable', - 'min:8' + 'min:8', ], 'email' => [ 'required', 'email', - Rule::unique('users')->ignore(Auth::id(), 'id') - ] + Rule::unique('users')->ignore(Auth::id(), 'id'), + ], ]; } } diff --git a/app/Http/Requests/Request.php b/app/Http/Requests/Request.php index 036bac03..e7df98c7 100644 --- a/app/Http/Requests/Request.php +++ b/app/Http/Requests/Request.php @@ -1,4 +1,5 @@ [ - 'required' + 'required', ], 'body' => [ - 'required' + 'required', ], 'from' => [ - 'required' + 'required', ], 'to' => [ - 'required' - ] + 'required', + ], ]; } } diff --git a/app/Http/Requests/SendInvoiceRequest.php b/app/Http/Requests/SendInvoiceRequest.php index 623a7334..077e8047 100644 --- a/app/Http/Requests/SendInvoiceRequest.php +++ b/app/Http/Requests/SendInvoiceRequest.php @@ -25,17 +25,17 @@ class SendInvoiceRequest extends FormRequest { return [ 'body' => [ - 'required' + 'required', ], 'subject' => [ - 'required' + 'required', ], 'from' => [ - 'required' + 'required', ], 'to' => [ - 'required' - ] + 'required', + ], ]; } } diff --git a/app/Http/Requests/SendPaymentRequest.php b/app/Http/Requests/SendPaymentRequest.php index fa7c8308..87745b94 100644 --- a/app/Http/Requests/SendPaymentRequest.php +++ b/app/Http/Requests/SendPaymentRequest.php @@ -25,17 +25,17 @@ class SendPaymentRequest extends FormRequest { return [ 'subject' => [ - 'required' + 'required', ], 'body' => [ - 'required' + 'required', ], 'from' => [ - 'required' + 'required', ], 'to' => [ - 'required' - ] + 'required', + ], ]; } } diff --git a/app/Http/Requests/SettingKeyRequest.php b/app/Http/Requests/SettingKeyRequest.php index 1302b817..582b3c0a 100644 --- a/app/Http/Requests/SettingKeyRequest.php +++ b/app/Http/Requests/SettingKeyRequest.php @@ -25,8 +25,8 @@ class SettingKeyRequest extends FormRequest { return [ 'key' => [ - 'required' - ] + 'required', + ], ]; } } diff --git a/app/Http/Requests/SettingRequest.php b/app/Http/Requests/SettingRequest.php index e1d99020..4996c74a 100644 --- a/app/Http/Requests/SettingRequest.php +++ b/app/Http/Requests/SettingRequest.php @@ -25,11 +25,11 @@ class SettingRequest extends FormRequest { return [ 'key' => [ - 'required' + 'required', ], 'value' => [ - 'required' - ] + 'required', + ], ]; } } diff --git a/app/Http/Requests/TaxTypeRequest.php b/app/Http/Requests/TaxTypeRequest.php index 27ecc128..219ccd5e 100644 --- a/app/Http/Requests/TaxTypeRequest.php +++ b/app/Http/Requests/TaxTypeRequest.php @@ -25,20 +25,20 @@ class TaxTypeRequest extends FormRequest { return [ 'name' => [ - 'required' + 'required', ], 'percent' => [ - 'required' + 'required', ], 'description' => [ - 'nullable' + 'nullable', ], 'compound_tax' => [ - 'nullable' + 'nullable', ], 'collective_tax' => [ - 'nullable' - ] + 'nullable', + ], ]; } } diff --git a/app/Http/Requests/UnitRequest.php b/app/Http/Requests/UnitRequest.php index 986b0a26..7c64b7d4 100644 --- a/app/Http/Requests/UnitRequest.php +++ b/app/Http/Requests/UnitRequest.php @@ -27,14 +27,14 @@ class UnitRequest extends FormRequest $data = [ 'name' => [ 'required', - 'unique:units,name' - ] + 'unique:units,name', + ], ]; if ($this->getMethod() == 'PUT') { $data['name'] = [ 'required', - Rule::unique('units')->ignore($this->route('unit'), 'id') + Rule::unique('units')->ignore($this->route('unit'), 'id'), ]; } diff --git a/app/Http/Requests/UpdateSettingsRequest.php b/app/Http/Requests/UpdateSettingsRequest.php index 71e98ed7..34411ad7 100644 --- a/app/Http/Requests/UpdateSettingsRequest.php +++ b/app/Http/Requests/UpdateSettingsRequest.php @@ -25,11 +25,11 @@ class UpdateSettingsRequest extends FormRequest { return [ 'settings' => [ - 'required' + 'required', ], 'settings.*' => [ - 'required' - ] + 'required', + ], ]; } } diff --git a/app/Http/Requests/UserRequest.php b/app/Http/Requests/UserRequest.php index 1cd8b617..717baf15 100644 --- a/app/Http/Requests/UserRequest.php +++ b/app/Http/Requests/UserRequest.php @@ -26,31 +26,31 @@ class UserRequest extends FormRequest { $rules = [ 'name' => [ - 'required' + 'required', ], 'email' => [ 'required', 'email', - Rule::unique('users') + Rule::unique('users'), ], 'phone' => [ - 'nullable' + 'nullable', ], 'password' => [ 'required', - 'min:8' - ] + 'min:8', + ], ]; if ($this->getMethod() == 'PUT') { $rules['email'] = [ 'required', 'email', - Rule::unique('users')->ignore($this->user) + Rule::unique('users')->ignore($this->user), ]; $rules['password'] = [ 'nullable', - 'min:8' + 'min:8', ]; } diff --git a/app/Jobs/CreateBackupJob.php b/app/Jobs/CreateBackupJob.php index 75fd176f..b45fe0fe 100644 --- a/app/Jobs/CreateBackupJob.php +++ b/app/Jobs/CreateBackupJob.php @@ -12,7 +12,10 @@ use Spatie\Backup\Tasks\Backup\BackupJobFactory; class CreateBackupJob implements ShouldQueue { - use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; + use Dispatchable; + use InteractsWithQueue; + use Queueable; + use SerializesModels; protected $data; @@ -23,7 +26,7 @@ class CreateBackupJob implements ShouldQueue */ public function __construct($data = '') { - $this->data = $data; + $this->data = $data; } /** @@ -38,7 +41,7 @@ class CreateBackupJob implements ShouldQueue $prefix = env('DYNAMIC_DISK_PREFIX', 'temp_'); - config(['backup.backup.destination.disks' => [$prefix . $fileDisk->driver]]); + config(['backup.backup.destination.disks' => [$prefix.$fileDisk->driver]]); $backupJob = BackupJobFactory::createFromArray(config('backup')); diff --git a/app/Jobs/GenerateEstimatePdfJob.php b/app/Jobs/GenerateEstimatePdfJob.php index 8f7c792f..91030eae 100644 --- a/app/Jobs/GenerateEstimatePdfJob.php +++ b/app/Jobs/GenerateEstimatePdfJob.php @@ -10,9 +10,13 @@ use Illuminate\Queue\SerializesModels; class GenerateEstimatePdfJob implements ShouldQueue { - use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; + use Dispatchable; + use InteractsWithQueue; + use Queueable; + use SerializesModels; public $estimate; + public $deleteExistingFile; /** diff --git a/app/Jobs/GenerateInvoicePdfJob.php b/app/Jobs/GenerateInvoicePdfJob.php index 9ca6f924..42d29bd8 100644 --- a/app/Jobs/GenerateInvoicePdfJob.php +++ b/app/Jobs/GenerateInvoicePdfJob.php @@ -10,9 +10,13 @@ use Illuminate\Queue\SerializesModels; class GenerateInvoicePdfJob implements ShouldQueue { - use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; + use Dispatchable; + use InteractsWithQueue; + use Queueable; + use SerializesModels; public $invoice; + public $deleteExistingFile; /** @@ -34,7 +38,7 @@ class GenerateInvoicePdfJob implements ShouldQueue public function handle() { $this->invoice->generatePDF('invoice', $this->invoice->invoice_number, $this->deleteExistingFile); - + return 0; } } diff --git a/app/Jobs/GeneratePaymentPdfJob.php b/app/Jobs/GeneratePaymentPdfJob.php index 13a9342a..ffe4f923 100644 --- a/app/Jobs/GeneratePaymentPdfJob.php +++ b/app/Jobs/GeneratePaymentPdfJob.php @@ -10,9 +10,13 @@ use Illuminate\Queue\SerializesModels; class GeneratePaymentPdfJob implements ShouldQueue { - use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; + use Dispatchable; + use InteractsWithQueue; + use Queueable; + use SerializesModels; public $payment; + public $deleteExistingFile; /** diff --git a/app/Listeners/Updates/Listener.php b/app/Listeners/Updates/Listener.php index 8a4995f5..1294f716 100644 --- a/app/Listeners/Updates/Listener.php +++ b/app/Listeners/Updates/Listener.php @@ -5,13 +5,13 @@ namespace Crater\Listeners\Updates; // Implementation taken from Akaunting - https://github.com/akaunting/akaunting class Listener { - const VERSION = ''; + public const VERSION = ''; /** * Check if should listen. * * @param $event - * @return boolean + * @return bool */ protected function isListenerFired($event) { diff --git a/app/Listeners/Updates/v1/Version110.php b/app/Listeners/Updates/v1/Version110.php index 517fcd70..d80ea5a7 100644 --- a/app/Listeners/Updates/v1/Version110.php +++ b/app/Listeners/Updates/v1/Version110.php @@ -2,16 +2,14 @@ namespace Crater\Listeners\Updates\v1; -use Illuminate\Contracts\Queue\ShouldQueue; -use Illuminate\Queue\InteractsWithQueue; use Crater\Events\UpdateFinished; use Crater\Listeners\Updates\Listener; -use Crater\Models\Setting; use Crater\Models\Currency; +use Crater\Models\Setting; class Version110 extends Listener { - const VERSION = '1.1.0'; + public const VERSION = '1.1.0'; /** * Create the event listener. @@ -42,59 +40,59 @@ class Version110 extends Listener Setting::setSetting('version', static::VERSION); } - private function addCurrencies() { - + private function addCurrencies() + { $currencies = [ '13' => [ - 'symbol' => 'S$' + 'symbol' => 'S$', ], '16' => [ - 'symbol' => '₫' + 'symbol' => '₫', ], '17' => [ - 'symbol' => 'Fr.' + 'symbol' => 'Fr.', ], '21' => [ - 'symbol' => '฿' + 'symbol' => '฿', ], '22' => [ - 'symbol' => '₦' + 'symbol' => '₦', ], '26' => [ - 'symbol' => 'HK$' + 'symbol' => 'HK$', ], '35' => [ - 'symbol' => 'NAƒ' + 'symbol' => 'NAƒ', ], '38' => [ - 'symbol' => 'GH₵' + 'symbol' => 'GH₵', ], '39' => [ - 'symbol' => 'Лв.' + 'symbol' => 'Лв.', ], '42' => [ - 'symbol' => 'RON' + 'symbol' => 'RON', ], '44' => [ - 'symbol' => 'SِAR' + 'symbol' => 'SِAR', ], '46' => [ - 'symbol' => 'Rf' + 'symbol' => 'Rf', ], '47' => [ - 'symbol' => '₡' + 'symbol' => '₡', ], '54' => [ - 'symbol' => '‎د.ت' + 'symbol' => '‎د.ت', ], '55' => [ - 'symbol' => '₽' + 'symbol' => '₽', ], '57' => [ - 'symbol' => 'ر.ع.' + 'symbol' => 'ر.ع.', ], '58' => [ - 'symbol' => '₴' + 'symbol' => '₴', ], ]; @@ -109,7 +107,7 @@ class Version110 extends Listener 'symbol' => 'KWD ', 'precision' => '3', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ]); } } diff --git a/app/Listeners/Updates/v2/Version200.php b/app/Listeners/Updates/v2/Version200.php index ebf95bc5..d506c203 100644 --- a/app/Listeners/Updates/v2/Version200.php +++ b/app/Listeners/Updates/v2/Version200.php @@ -2,17 +2,14 @@ namespace Crater\Listeners\Updates\v2; -use Illuminate\Contracts\Queue\ShouldQueue; -use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Database\Schema\Blueprint; -use Crater\Listeners\Updates\Listener; use Crater\Events\UpdateFinished; +use Crater\Listeners\Updates\Listener; use Crater\Models\Setting; -use Crater\Models\Address; +use Illuminate\Database\Schema\Blueprint; class Version200 extends Listener { - const VERSION = '2.0.0'; + public const VERSION = '2.0.0'; /** * Create the event listener. @@ -52,7 +49,8 @@ class Version200 extends Listener $this->updateVersion(); } - private function replaceStateAndCityName() { + private function replaceStateAndCityName() + { \Schema::table('addresses', function (Blueprint $table) { $table->string('state')->nullable(); $table->string('city')->nullable(); @@ -61,12 +59,12 @@ class Version200 extends Listener $addresses = \Crater\Models\Address::all(); foreach ($addresses as $add) { $city = \Crater\City::find($add->city_id); - if($city) { + if ($city) { $add->city = $city->name; } $state = \Crater\State::find($add->state_id); - if($state) { + if ($state) { $add->state = $state->name; } @@ -74,7 +72,8 @@ class Version200 extends Listener } } - private function dropForeignKey() { + private function dropForeignKey() + { \Schema::table('addresses', function (Blueprint $table) { $table->dropForeign('addresses_state_id_foreign'); $table->dropForeign('addresses_city_id_foreign'); @@ -83,7 +82,8 @@ class Version200 extends Listener }); } - private function dropSchemas() { + private function dropSchemas() + { \Schema::disableForeignKeyConstraints(); \Schema::dropIfExists('states'); @@ -92,7 +92,8 @@ class Version200 extends Listener \Schema::enableForeignKeyConstraints(); } - private function deleteFiles() { + private function deleteFiles() + { \File::delete( database_path('migrations/2017_05_06_172817_create_cities_table.php'), database_path('migrations/2017_05_06_173711_create_states_table.php'), @@ -103,7 +104,8 @@ class Version200 extends Listener ); } - private function updateVersion() { + private function updateVersion() + { Setting::setSetting('version', static::VERSION); } } diff --git a/app/Listeners/Updates/v2/Version201.php b/app/Listeners/Updates/v2/Version201.php index c8b16247..88850336 100644 --- a/app/Listeners/Updates/v2/Version201.php +++ b/app/Listeners/Updates/v2/Version201.php @@ -2,16 +2,14 @@ namespace Crater\Listeners\Updates\v2; -use Illuminate\Contracts\Queue\ShouldQueue; -use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Database\Schema\Blueprint; use Crater\Events\UpdateFinished; use Crater\Listeners\Updates\Listener; use Crater\Models\Setting; +use Illuminate\Database\Schema\Blueprint; class Version201 extends Listener { - const VERSION = '2.0.1'; + public const VERSION = '2.0.1'; /** * Create the event listener. @@ -45,20 +43,21 @@ class Version201 extends Listener Setting::setSetting('version', static::VERSION); } - private function removeLanguageFiles() { + private function removeLanguageFiles() + { $en = resource_path('assets/js/plugins/en.js'); $es = resource_path('assets/js/plugins/es.js'); $fr = resource_path('assets/js/plugins/fr.js'); - if(file_exists($en)) { + if (file_exists($en)) { unlink($en); } - if(file_exists($es)) { + if (file_exists($es)) { unlink($es); } - if(file_exists($fr)) { + if (file_exists($fr)) { unlink($fr); } } diff --git a/app/Listeners/Updates/v2/Version202.php b/app/Listeners/Updates/v2/Version202.php index 2c46eb77..5503c32b 100644 --- a/app/Listeners/Updates/v2/Version202.php +++ b/app/Listeners/Updates/v2/Version202.php @@ -2,15 +2,13 @@ namespace Crater\Listeners\Updates\v2; -use Illuminate\Contracts\Queue\ShouldQueue; -use Illuminate\Queue\InteractsWithQueue; use Crater\Events\UpdateFinished; use Crater\Listeners\Updates\Listener; use Crater\Models\Setting; class Version202 extends Listener { - const VERSION = '2.0.2'; + public const VERSION = '2.0.2'; /** * Create the event listener. diff --git a/app/Listeners/Updates/v2/Version210.php b/app/Listeners/Updates/v2/Version210.php index 9a788b12..2a1f0162 100644 --- a/app/Listeners/Updates/v2/Version210.php +++ b/app/Listeners/Updates/v2/Version210.php @@ -2,16 +2,14 @@ namespace Crater\Listeners\Updates\v2; -use Illuminate\Contracts\Queue\ShouldQueue; -use Illuminate\Queue\InteractsWithQueue; use Crater\Events\UpdateFinished; use Crater\Listeners\Updates\Listener; -use Crater\Models\Setting; use Crater\Models\CompanySetting; +use Crater\Models\Setting; class Version210 extends Listener { - const VERSION = '2.1.0'; + public const VERSION = '2.1.0'; /** * Create the event listener. @@ -50,7 +48,7 @@ class Version210 extends Listener 'estimate_prefix' => 'EST', 'estimate_auto_generate' => 'YES', 'payment_prefix' => 'PAY', - 'payment_auto_generate' => 'YES' + 'payment_auto_generate' => 'YES', ]; foreach ($settings as $key => $value) { diff --git a/app/Listeners/Updates/v3/Version300.php b/app/Listeners/Updates/v3/Version300.php index 4c8a935b..cadd9738 100644 --- a/app/Listeners/Updates/v3/Version300.php +++ b/app/Listeners/Updates/v3/Version300.php @@ -2,21 +2,19 @@ namespace Crater\Listeners\Updates\v3; -use Illuminate\Contracts\Queue\ShouldQueue; -use Illuminate\Queue\InteractsWithQueue; +use Crater\Listeners\Updates\Listener; +use Crater\Models\Currency; +use Crater\Models\Item; +use Crater\Models\Payment; +use Crater\Models\PaymentMethod; use Crater\Models\Setting; use Crater\Models\Unit; -use Crater\Models\PaymentMethod; -use Crater\Models\Currency; -use Crater\Models\Payment; -use Crater\Models\Item; use Crater\Models\User; -use Crater\Listeners\Updates\Listener; use Illuminate\Database\Schema\Blueprint; class Version300 extends Listener { - const VERSION = '3.0.0'; + public const VERSION = '3.0.0'; /** * Create the event listener. @@ -122,7 +120,7 @@ class Version300 extends Listener 'symbol' => 'RSD', 'precision' => '2', 'thousand_separator' => '.', - 'decimal_separator' => ',' + 'decimal_separator' => ',', ]); } diff --git a/app/Listeners/Updates/v3/Version310.php b/app/Listeners/Updates/v3/Version310.php index ddce553a..9be0767f 100644 --- a/app/Listeners/Updates/v3/Version310.php +++ b/app/Listeners/Updates/v3/Version310.php @@ -2,20 +2,15 @@ namespace Crater\Listeners\Updates\v3; -use Illuminate\Contracts\Queue\ShouldQueue; -use Illuminate\Queue\InteractsWithQueue; -use Crater\Listeners\Updates\Listener; -use Illuminate\Database\Schema\Blueprint; -use Crater\Events\UpdateFinished; -use Crater\Models\Setting; -use Crater\Models\Currency; -use Schema; use Artisan; +use Crater\Events\UpdateFinished; +use Crater\Listeners\Updates\Listener; +use Crater\Models\Currency; +use Crater\Models\Setting; class Version310 extends Listener { - const VERSION = '3.1.0'; - + public const VERSION = '3.1.0'; /** * Handle the event. @@ -32,7 +27,7 @@ class Version310 extends Listener Currency::firstOrCreate( [ 'name' => 'Kyrgyzstani som', - 'code' => 'KGS' + 'code' => 'KGS', ], [ 'name' => 'Kyrgyzstani som', @@ -40,7 +35,7 @@ class Version310 extends Listener 'symbol' => 'С̲ ', 'precision' => '2', 'thousand_separator' => '.', - 'decimal_separator' => ',' + 'decimal_separator' => ',', ] ); diff --git a/app/Listeners/Updates/v3/Version311.php b/app/Listeners/Updates/v3/Version311.php index 8540d8b0..e9005216 100644 --- a/app/Listeners/Updates/v3/Version311.php +++ b/app/Listeners/Updates/v3/Version311.php @@ -2,15 +2,14 @@ namespace Crater\Listeners\Updates\v3; -use Crater\Listeners\Updates\Listener; -use Crater\Events\UpdateFinished; -use Crater\Models\Setting; -use Crater\Models\Currency; use Artisan; +use Crater\Events\UpdateFinished; +use Crater\Listeners\Updates\Listener; +use Crater\Models\Setting; class Version311 extends Listener { - const VERSION = '3.1.1'; + public const VERSION = '3.1.1'; /** * Handle the event. diff --git a/app/Mail/EstimateViewedMail.php b/app/Mail/EstimateViewedMail.php index 5ffbd78f..8e862001 100644 --- a/app/Mail/EstimateViewedMail.php +++ b/app/Mail/EstimateViewedMail.php @@ -3,13 +3,13 @@ namespace Crater\Mail; use Illuminate\Bus\Queueable; -use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; class EstimateViewedMail extends Mailable { - use Queueable, SerializesModels; + use Queueable; + use SerializesModels; public $data; @@ -32,6 +32,7 @@ class EstimateViewedMail extends Mailable { $email = $this->data['user']['email']; $name = $this->data['user']['name']; + return $this->from($email, $name) ->markdown('emails.viewed.estimate', ['data', $this->data]); } diff --git a/app/Mail/InvoiceViewedMail.php b/app/Mail/InvoiceViewedMail.php index 3375dc96..4f5125b0 100644 --- a/app/Mail/InvoiceViewedMail.php +++ b/app/Mail/InvoiceViewedMail.php @@ -3,13 +3,13 @@ namespace Crater\Mail; use Illuminate\Bus\Queueable; -use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; class InvoiceViewedMail extends Mailable { - use Queueable, SerializesModels; + use Queueable; + use SerializesModels; public $data; @@ -32,6 +32,7 @@ class InvoiceViewedMail extends Mailable { $email = $this->data['user']['email']; $name = $this->data['user']['name']; + return $this->from($email, $name) ->markdown('emails.viewed.invoice', ['data', $this->data]); } diff --git a/app/Mail/SendEstimateMail.php b/app/Mail/SendEstimateMail.php index 460cdf95..22fb5b38 100644 --- a/app/Mail/SendEstimateMail.php +++ b/app/Mail/SendEstimateMail.php @@ -1,4 +1,5 @@ $this->data['subject'], 'body' => $this->data['body'], 'mailable_type' => Estimate::class, - 'mailable_id' => $this->data['estimate']['id'] + 'mailable_id' => $this->data['estimate']['id'], ]); $mailContent = $this->from($this->data['from'], config('mail.from.name')) ->subject($this->data['subject']) ->markdown('emails.send.estimate', ['data', $this->data]); - if ($this->data['attach']['data']) + if ($this->data['attach']['data']) { $mailContent->attachData( - $this->data['attach']['data']->output(), - $this->data['estimate']['estimate_number'] . '.pdf' + $this->data['attach']['data']->output(), + $this->data['estimate']['estimate_number'].'.pdf' ); - + } + return $mailContent; } } diff --git a/app/Mail/SendInvoiceMail.php b/app/Mail/SendInvoiceMail.php index b93c4eff..c5267de9 100644 --- a/app/Mail/SendInvoiceMail.php +++ b/app/Mail/SendInvoiceMail.php @@ -1,4 +1,5 @@ $this->data['subject'], 'body' => $this->data['body'], 'mailable_type' => Invoice::class, - 'mailable_id' => $this->data['invoice']['id'] + 'mailable_id' => $this->data['invoice']['id'], ]); - + $mailContent = $this->from($this->data['from'], config('mail.from.name')) ->subject($this->data['subject']) ->markdown('emails.send.invoice', ['data', $this->data]); - if ($this->data['attach']['data']) + if ($this->data['attach']['data']) { $mailContent->attachData( - $this->data['attach']['data']->output(), - $this->data['invoice']['invoice_number'] . '.pdf' + $this->data['attach']['data']->output(), + $this->data['invoice']['invoice_number'].'.pdf' ); - + } + return $mailContent; } } diff --git a/app/Mail/SendPaymentMail.php b/app/Mail/SendPaymentMail.php index c7140c6a..01e42b92 100644 --- a/app/Mail/SendPaymentMail.php +++ b/app/Mail/SendPaymentMail.php @@ -5,13 +5,13 @@ namespace Crater\Mail; use Crater\Models\EmailLog; use Crater\Models\Payment; use Illuminate\Bus\Queueable; -use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; class SendPaymentMail extends Mailable { - use Queueable, SerializesModels; + use Queueable; + use SerializesModels; public $data = []; @@ -38,19 +38,20 @@ class SendPaymentMail extends Mailable 'subject' => $this->data['subject'], 'body' => $this->data['body'], 'mailable_type' => Payment::class, - 'mailable_id' => $this->data['payment']['id'] + 'mailable_id' => $this->data['payment']['id'], ]); $mailContent = $this->from($this->data['from'], config('mail.from.name')) ->subject($this->data['subject']) ->markdown('emails.send.payment', ['data', $this->data]); - if ($this->data['attach']['data']) + if ($this->data['attach']['data']) { $mailContent->attachData( - $this->data['attach']['data']->output(), - $this->data['payment']['payment_number'] . '.pdf' + $this->data['attach']['data']->output(), + $this->data['payment']['payment_number'].'.pdf' ); - + } + return $mailContent; } } diff --git a/app/Mail/TestMail.php b/app/Mail/TestMail.php index 135e7d9f..8e7548d0 100644 --- a/app/Mail/TestMail.php +++ b/app/Mail/TestMail.php @@ -1,15 +1,18 @@ subject($this->subject)->markdown('emails.test')->with([ - 'my_message' => $this->message + 'my_message' => $this->message, ]); } } diff --git a/app/Models/Address.php b/app/Models/Address.php index 8fb8453e..8a699e53 100644 --- a/app/Models/Address.php +++ b/app/Models/Address.php @@ -1,17 +1,15 @@ $key, 'company_id' => $company_id, - 'value' => $value + 'value' => $value, ] ); } diff --git a/app/Models/Country.php b/app/Models/Country.php index 32883fea..e169da30 100644 --- a/app/Models/Country.php +++ b/app/Models/Country.php @@ -1,7 +1,7 @@ 'array' + 'options' => 'array', ]; public function setDateAnswerAttribute($value) @@ -76,8 +73,8 @@ class CustomField extends Model public function scopeWhereSearch($query, $search) { $query->where(function ($query) use ($search) { - $query->where('label', 'LIKE', '%' . $search . '%') - ->orWhere('name', 'LIKE', '%' . $search . '%'); + $query->where('label', 'LIKE', '%'.$search.'%') + ->orWhere('name', 'LIKE', '%'.$search.'%'); }); } @@ -135,7 +132,7 @@ class CustomField extends Model 'estimate_shipping_address_format', 'estimate_billing_address_format', 'payment_company_address_format', - 'payment_from_customer_address_format' + 'payment_from_customer_address_format', ]; $settings = CompanySetting::getSettings($settings, $this->company_id); diff --git a/app/Models/CustomFieldValue.php b/app/Models/CustomFieldValue.php index 959a5c54..8f339577 100644 --- a/app/Models/CustomFieldValue.php +++ b/app/Models/CustomFieldValue.php @@ -3,21 +3,19 @@ namespace Crater\Models; use Carbon\Carbon; -use Illuminate\Database\Eloquent\Model; -use Crater\Models\Company; -use Crater\Models\CustomField; use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\Model; class CustomFieldValue extends Model { use HasFactory; protected $guarded = [ - 'id' + 'id', ]; protected $appends = [ - 'defaultAnswer' + 'defaultAnswer', ]; public function setDateAnswerAttribute($value) diff --git a/app/Models/Estimate.php b/app/Models/Estimate.php index 4c8db2d4..ee98cfa9 100644 --- a/app/Models/Estimate.php +++ b/app/Models/Estimate.php @@ -3,44 +3,42 @@ namespace Crater\Models; use App; -use Crater\Models\EstimateTemplate; -use Crater\Models\Company; -use Crater\Models\Tax; -use Illuminate\Database\Eloquent\Model; -use Crater\Models\CompanySetting; +use Barryvdh\DomPDF\Facade as PDF; use Carbon\Carbon; use Crater\Mail\SendEstimateMail; +use Crater\Traits\GeneratesPdfTrait; use Crater\Traits\HasCustomFieldsTrait; -use Vinkla\Hashids\Facades\Hashids; use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\Facades\Auth; use Spatie\MediaLibrary\HasMedia; use Spatie\MediaLibrary\InteractsWithMedia; -use Crater\Traits\GeneratesPdfTrait; -use Barryvdh\DomPDF\Facade as PDF; -use Illuminate\Support\Facades\Auth; +use Vinkla\Hashids\Facades\Hashids; class Estimate extends Model implements HasMedia { - use HasFactory, InteractsWithMedia, GeneratesPdfTrait; + use HasFactory; + use InteractsWithMedia; + use GeneratesPdfTrait; use HasCustomFieldsTrait; - const STATUS_DRAFT = 'DRAFT'; - const STATUS_SENT = 'SENT'; - const STATUS_VIEWED = 'VIEWED'; - const STATUS_EXPIRED = 'EXPIRED'; - const STATUS_ACCEPTED = 'ACCEPTED'; - const STATUS_REJECTED = 'REJECTED'; + public const STATUS_DRAFT = 'DRAFT'; + public const STATUS_SENT = 'SENT'; + public const STATUS_VIEWED = 'VIEWED'; + public const STATUS_EXPIRED = 'EXPIRED'; + public const STATUS_ACCEPTED = 'ACCEPTED'; + public const STATUS_REJECTED = 'REJECTED'; protected $dates = [ 'created_at', 'updated_at', - 'deleted_at' + 'deleted_at', ]; protected $appends = [ 'formattedExpiryDate', 'formattedEstimateDate', - 'estimatePdfUrl' + 'estimatePdfUrl', ]; protected $guarded = ['id']; @@ -69,13 +67,13 @@ class Estimate extends Model implements HasMedia public function getEstimatePdfUrlAttribute() { - return url('/estimates/pdf/' . $this->unique_hash); + return url('/estimates/pdf/'.$this->unique_hash); } public static function getNextEstimateNumber($value) { // Get the last created order - $lastOrder = Estimate::where('estimate_number', 'LIKE', $value . '-%') + $lastOrder = Estimate::where('estimate_number', 'LIKE', $value.'-%') ->orderBy('estimate_number', 'desc') ->first(); @@ -83,7 +81,7 @@ class Estimate extends Model implements HasMedia $numberLength = CompanySetting::getSetting('estimate_number_length', request()->header('company')); $numberLengthText = "%0{$numberLength}d"; - if (!$lastOrder) { + if (! $lastOrder) { // We get here if there is no order at all // If there is no number set it to 0, which will be 1 at the end. $number = 0; @@ -140,12 +138,14 @@ class Estimate extends Model implements HasMedia public function getEstimateNumAttribute() { $position = $this->strposX($this->estimate_number, "-", 1) + 1; + return substr($this->estimate_number, $position); } public function getEstimatePrefixAttribute() { $prefix = explode("-", $this->estimate_number)[0]; + return $prefix; } @@ -167,12 +167,14 @@ class Estimate extends Model implements HasMedia public function getFormattedExpiryDateAttribute($value) { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); + return Carbon::parse($this->expiry_date)->format($dateFormat); } public function getFormattedEstimateDateAttribute($value) { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); + return Carbon::parse($this->estimate_date)->format($dateFormat); } @@ -203,9 +205,9 @@ class Estimate extends Model implements HasMedia { foreach (explode(' ', $search) as $term) { $query->whereHas('user', function ($query) use ($term) { - $query->where('name', 'LIKE', '%' . $term . '%') - ->orWhere('contact_name', 'LIKE', '%' . $term . '%') - ->orWhere('company_name', 'LIKE', '%' . $term . '%'); + $query->where('name', 'LIKE', '%'.$term.'%') + ->orWhere('contact_name', 'LIKE', '%'.$term.'%') + ->orWhere('company_name', 'LIKE', '%'.$term.'%'); }); } } @@ -300,7 +302,7 @@ class Estimate extends Model implements HasMedia self::createItems($estimate, $request); - if ($request->has('taxes') && (!empty($request->taxes))) { + if ($request->has('taxes') && (! empty($request->taxes))) { self::createTaxes($estimate, $request); } @@ -314,7 +316,7 @@ class Estimate extends Model implements HasMedia 'items.taxes', 'user', 'estimateTemplate', - 'taxes' + 'taxes', ]) ->find($estimate->id); } @@ -330,7 +332,7 @@ class Estimate extends Model implements HasMedia self::createItems($this, $request); - if ($request->has('taxes') && (!empty($request->taxes))) { + if ($request->has('taxes') && (! empty($request->taxes))) { self::createTaxes($this, $request); } @@ -342,7 +344,7 @@ class Estimate extends Model implements HasMedia 'items.taxes', 'user', 'estimateTemplate', - 'taxes' + 'taxes', ]) ->find($this->id); } @@ -394,7 +396,7 @@ class Estimate extends Model implements HasMedia } return [ - 'success' => true + 'success' => true, ]; } @@ -407,9 +409,9 @@ class Estimate extends Model implements HasMedia if ($this->tax_per_item === 'YES') { foreach ($this->items as $item) { foreach ($item->taxes as $tax) { - if (!in_array($tax->name, $taxTypes)) { + if (! in_array($tax->name, $taxTypes)) { array_push($taxTypes, $tax->name); - array_push($labels, $tax->name . ' (' . $tax->percent . '%)'); + array_push($labels, $tax->name.' ('.$tax->percent.'%)'); } } } @@ -446,10 +448,10 @@ class Estimate extends Model implements HasMedia 'billing_address' => $this->getCustomerBillingAddress(), 'notes' => $this->getNotes(), 'labels' => $labels, - 'taxes' => $taxes + 'taxes' => $taxes, ]); - return PDF::loadView('app.pdf.estimate.' . $estimateTemplate->view); + return PDF::loadView('app.pdf.estimate.'.$estimateTemplate->view); } public function getCompanyAddress() @@ -505,7 +507,7 @@ class Estimate extends Model implements HasMedia '{ESTIMATE_EXPIRY_DATE}' => $this->formattedExpiryDate, '{ESTIMATE_NUMBER}' => $this->estimate_number, '{ESTIMATE_REF_NUMBER}' => $this->reference_number, - '{ESTIMATE_LINK}' => url('/customer/estimates/pdf/' . $this->unique_hash) + '{ESTIMATE_LINK}' => url('/customer/estimates/pdf/'.$this->unique_hash), ]; } } diff --git a/app/Models/EstimateItem.php b/app/Models/EstimateItem.php index eb0755a1..75c2419e 100644 --- a/app/Models/EstimateItem.php +++ b/app/Models/EstimateItem.php @@ -1,15 +1,14 @@ 'float', 'quantity' => 'float', 'discount_val' => 'integer', - 'tax' => 'integer' + 'tax' => 'integer', ]; public function estimate() diff --git a/app/Models/EstimateTemplate.php b/app/Models/EstimateTemplate.php index 0fd05ac9..968bc63e 100644 --- a/app/Models/EstimateTemplate.php +++ b/app/Models/EstimateTemplate.php @@ -1,13 +1,14 @@ company_id); + return Carbon::parse($this->expense_date)->format($dateFormat); } public function getFormattedCreatedAtAttribute($value) { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); + return Carbon::parse($this->created_at)->format($dateFormat); } @@ -83,14 +83,14 @@ class Expense extends Model implements HasMedia { foreach (explode(' ', $search) as $term) { $query->whereHas('category', function ($query) use ($term) { - $query->where('name', 'LIKE', '%' . $term . '%'); + $query->where('name', 'LIKE', '%'.$term.'%'); }); } } public function scopeWhereNotes($query, $search) { - $query->where('notes', 'LIKE', '%' . $search . '%'); + $query->where('notes', 'LIKE', '%'.$search.'%'); } public function scopeWhereCategory($query, $categoryId) @@ -145,9 +145,9 @@ class Expense extends Model implements HasMedia { foreach (explode(' ', $search) as $term) { $query->whereHas('category', function ($query) use ($term) { - $query->where('name', 'LIKE', '%' . $term . '%'); + $query->where('name', 'LIKE', '%'.$term.'%'); }) - ->orWhere('notes', 'LIKE', '%' . $term . '%'); + ->orWhere('notes', 'LIKE', '%'.$term.'%'); } } diff --git a/app/Models/ExpenseCategory.php b/app/Models/ExpenseCategory.php index 326c3a97..2d938e3a 100644 --- a/app/Models/ExpenseCategory.php +++ b/app/Models/ExpenseCategory.php @@ -1,15 +1,15 @@ company_id); + return Carbon::parse($this->created_at)->format($dateFormat); } @@ -47,7 +48,7 @@ class ExpenseCategory extends Model public function scopeWhereSearch($query, $search) { - $query->where('name', 'LIKE', '%' . $search . '%'); + $query->where('name', 'LIKE', '%'.$search.'%'); } public function scopeApplyFilters($query, array $filters) diff --git a/app/Models/FileDisk.php b/app/Models/FileDisk.php index 73ce1b6a..dbef4361 100644 --- a/app/Models/FileDisk.php +++ b/app/Models/FileDisk.php @@ -3,18 +3,17 @@ namespace Crater\Models; use Crater\Carbon; -use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\Model; class FileDisk extends Model { - CONST DISK_TYPE_SYSTEM = 'SYSTEM'; - CONST DISK_TYPE_REMOTE = 'REMOTE'; - use HasFactory; + public const DISK_TYPE_SYSTEM = 'SYSTEM'; + public const DISK_TYPE_REMOTE = 'REMOTE'; protected $guarded = [ - 'id' + 'id', ]; public function setCredentialsAttribute($value) @@ -22,12 +21,12 @@ class FileDisk extends Model $this->attributes['credentials'] = json_encode($value); } - public function scopeWhereOrder($query, $orderByField, $orderBy) + public function scopeWhereOrder($query, $orderByField, $orderBy) { $query->orderBy($orderByField, $orderBy); } - public function scopeFileDisksBetween($query, $start, $end) + public function scopeFileDisksBetween($query, $start, $end) { return $query->whereBetween( 'file_disks.created_at', @@ -38,8 +37,8 @@ class FileDisk extends Model public function scopeWhereSearch($query, $search) { foreach (explode(' ', $search) as $term) { - $query->where('name', 'LIKE', '%' . $term . '%') - ->orWhere('driver', 'LIKE', '%' . $term . '%'); + $query->where('name', 'LIKE', '%'.$term.'%') + ->orWhere('driver', 'LIKE', '%'.$term.'%'); } } @@ -48,6 +47,7 @@ class FileDisk extends Model if ($limit == 'all') { return collect(['data' => $query->get()]); } + return $query->paginate($limit); } @@ -89,18 +89,17 @@ class FileDisk extends Model { $prefix = env('DYNAMIC_DISK_PREFIX', 'temp_'); - config(['filesystems.default' => $prefix . $driver]); + config(['filesystems.default' => $prefix.$driver]); - $disks = config('filesystems.disks.' . $driver); + $disks = config('filesystems.disks.'.$driver); foreach ($disks as $key => $value) { - if ($credentials->has($key)) { $disks[$key] = $credentials[$key]; } } - config(['filesystems.disks.' . $prefix . $driver => $disks]); + config(['filesystems.disks.'.$prefix.$driver => $disks]); } public static function validateCredentials($credentials, $disk) @@ -113,16 +112,16 @@ class FileDisk extends Model try { $root = ''; - if($disk == 'dropbox'){ + if ($disk == 'dropbox') { $root = $credentials['root'].'/'; } - \Storage::disk($prefix . $disk)->put($root.'crater_temp.text', 'Check Credentials'); + \Storage::disk($prefix.$disk)->put($root.'crater_temp.text', 'Check Credentials'); - if(\Storage::disk($prefix . $disk)->exists($root.'crater_temp.text')) { + if (\Storage::disk($prefix.$disk)->exists($root.'crater_temp.text')) { $exists = true; - \Storage::disk($prefix . $disk)->delete($root.'crater_temp.text'); + \Storage::disk($prefix.$disk)->delete($root.'crater_temp.text'); } - } catch(\Exception $e) { + } catch (\Exception $e) { $exists = false; } @@ -165,7 +164,7 @@ class FileDisk extends Model 'driver' => $request->driver, ]; - if(!$this->setAsDefault()) { + if (! $this->setAsDefault()) { if ($request->set_as_default) { self::updateDefaultDisks(); } diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 8bd43050..dc4f8469 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -3,44 +3,40 @@ namespace Crater\Models; use App; -use Crater\Models\Company; -use Crater\Models\CompanySetting; -use Crater\Models\Currency; -use Crater\Models\Tax; -use Illuminate\Database\Eloquent\Model; -use Crater\Models\InvoiceTemplate; -use Crater\Models\Payment; +use Barryvdh\DomPDF\Facade as PDF; use Carbon\Carbon; -use Crater\Traits\HasCustomFieldsTrait; use Crater\Mail\SendInvoiceMail; +use Crater\Traits\GeneratesPdfTrait; +use Crater\Traits\HasCustomFieldsTrait; use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\Facades\Auth; use Spatie\MediaLibrary\HasMedia; use Spatie\MediaLibrary\InteractsWithMedia; use Vinkla\Hashids\Facades\Hashids; -use Crater\Traits\GeneratesPdfTrait; -use Barryvdh\DomPDF\Facade as PDF; -use Illuminate\Support\Facades\Auth; class Invoice extends Model implements HasMedia { - use HasFactory, InteractsWithMedia, GeneratesPdfTrait; + use HasFactory; + use InteractsWithMedia; + use GeneratesPdfTrait; use HasCustomFieldsTrait; - const STATUS_DRAFT = 'DRAFT'; - const STATUS_SENT = 'SENT'; - const STATUS_VIEWED = 'VIEWED'; - const STATUS_OVERDUE = 'OVERDUE'; - const STATUS_COMPLETED = 'COMPLETED'; + public const STATUS_DRAFT = 'DRAFT'; + public const STATUS_SENT = 'SENT'; + public const STATUS_VIEWED = 'VIEWED'; + public const STATUS_OVERDUE = 'OVERDUE'; + public const STATUS_COMPLETED = 'COMPLETED'; - const STATUS_DUE = 'DUE'; - const STATUS_UNPAID = 'UNPAID'; - const STATUS_PARTIALLY_PAID = 'PARTIALLY_PAID'; - const STATUS_PAID = 'PAID'; + public const STATUS_DUE = 'DUE'; + public const STATUS_UNPAID = 'UNPAID'; + public const STATUS_PARTIALLY_PAID = 'PARTIALLY_PAID'; + public const STATUS_PAID = 'PAID'; protected $dates = [ 'created_at', 'updated_at', - 'deleted_at' + 'deleted_at', ]; protected $casts = [ @@ -52,14 +48,14 @@ class Invoice extends Model implements HasMedia ]; protected $guarded = [ - 'id' + 'id', ]; protected $appends = [ 'formattedCreatedAt', 'formattedInvoiceDate', 'formattedDueDate', - 'invoicePdfUrl' + 'invoicePdfUrl', ]; public function setInvoiceDateAttribute($value) @@ -79,7 +75,7 @@ class Invoice extends Model implements HasMedia public static function getNextInvoiceNumber($value) { // Get the last created order - $lastOrder = Invoice::where('invoice_number', 'LIKE', $value . '-%') + $lastOrder = Invoice::where('invoice_number', 'LIKE', $value.'-%') ->orderBy('invoice_number', 'desc') ->first(); @@ -87,7 +83,7 @@ class Invoice extends Model implements HasMedia $numberLength = CompanySetting::getSetting('invoice_number_length', request()->header('company')); $numberLengthText = "%0{$numberLength}d"; - if (!$lastOrder) { + if (! $lastOrder) { // We get here if there is no order at all // If there is no number set it to 0, which will be 1 at the end. $number = 0; @@ -152,7 +148,7 @@ class Invoice extends Model implements HasMedia public function getInvoicePdfUrlAttribute() { - return url('/invoices/pdf/' . $this->unique_hash); + return url('/invoices/pdf/'.$this->unique_hash); } public function getPreviousStatus() @@ -186,30 +182,35 @@ class Invoice extends Model implements HasMedia public function getInvoiceNumAttribute() { $position = $this->strposX($this->invoice_number, "-", 1) + 1; + return substr($this->invoice_number, $position); } public function getInvoicePrefixAttribute() { $prefix = explode("-", $this->invoice_number)[0]; + return $prefix; } public function getFormattedCreatedAtAttribute($value) { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); + return Carbon::parse($this->created_at)->format($dateFormat); } public function getFormattedDueDateAttribute($value) { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); + return Carbon::parse($this->due_date)->format($dateFormat); } public function getFormattedInvoiceDateAttribute($value) { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); + return Carbon::parse($this->invoice_date)->format($dateFormat); } @@ -227,13 +228,13 @@ class Invoice extends Model implements HasMedia { return $query->whereIn('invoices.paid_status', [ self::STATUS_UNPAID, - self::STATUS_PARTIALLY_PAID + self::STATUS_PARTIALLY_PAID, ]); } public function scopeWhereInvoiceNumber($query, $invoiceNumber) { - return $query->where('invoices.invoice_number', 'LIKE', '%' . $invoiceNumber . '%'); + return $query->where('invoices.invoice_number', 'LIKE', '%'.$invoiceNumber.'%'); } public function scopeInvoicesBetween($query, $start, $end) @@ -248,9 +249,9 @@ class Invoice extends Model implements HasMedia { foreach (explode(' ', $search) as $term) { $query->whereHas('user', function ($query) use ($term) { - $query->where('name', 'LIKE', '%' . $term . '%') - ->orWhere('contact_name', 'LIKE', '%' . $term . '%') - ->orWhere('company_name', 'LIKE', '%' . $term . '%'); + $query->where('name', 'LIKE', '%'.$term.'%') + ->orWhere('contact_name', 'LIKE', '%'.$term.'%') + ->orWhere('company_name', 'LIKE', '%'.$term.'%'); }); } } @@ -356,7 +357,7 @@ class Invoice extends Model implements HasMedia self::createItems($invoice, $request); - if ($request->has('taxes') && (!empty($request->taxes))) { + if ($request->has('taxes') && (! empty($request->taxes))) { self::createTaxes($invoice, $request); } @@ -368,7 +369,7 @@ class Invoice extends Model implements HasMedia 'items', 'user', 'invoiceTemplate', - 'taxes' + 'taxes', ]) ->find($invoice->id); @@ -393,7 +394,7 @@ class Invoice extends Model implements HasMedia $data['paid_status'] = Invoice::STATUS_PAID; } elseif ($this->due_amount < 0 && $this->paid_status != Invoice::STATUS_UNPAID) { return response()->json([ - 'error' => 'invalid_due_amount' + 'error' => 'invalid_due_amount', ]); } elseif ($data['due_amount'] != 0 && $this->paid_status == Invoice::STATUS_PAID) { $data['status'] = $this->getPreviousStatus(); @@ -408,7 +409,7 @@ class Invoice extends Model implements HasMedia self::createItems($this, $request); - if ($request->has('taxes') && (!empty($request->taxes))) { + if ($request->has('taxes') && (! empty($request->taxes))) { self::createTaxes($this, $request); } @@ -420,7 +421,7 @@ class Invoice extends Model implements HasMedia 'items', 'user', 'invoiceTemplate', - 'taxes' + 'taxes', ]) ->find($this->id); @@ -444,7 +445,7 @@ class Invoice extends Model implements HasMedia \Mail::to($data['to'])->send(new SendInvoiceMail($data)); return [ - 'success' => true + 'success' => true, ]; } @@ -469,7 +470,7 @@ class Invoice extends Model implements HasMedia public static function createTaxes($invoice, $request) { - if ($request->has('taxes') && (!empty($request->taxes))) { + if ($request->has('taxes') && (! empty($request->taxes))) { foreach ($request->taxes as $tax) { $tax['company_id'] = $request->header('company'); @@ -489,9 +490,9 @@ class Invoice extends Model implements HasMedia if ($this->tax_per_item === 'YES') { foreach ($this->items as $item) { foreach ($item->taxes as $tax) { - if (!in_array($tax->name, $taxTypes)) { + if (! in_array($tax->name, $taxTypes)) { array_push($taxTypes, $tax->name); - array_push($labels, $tax->name . ' (' . $tax->percent . '%)'); + array_push($labels, $tax->name.' ('.$tax->percent.'%)'); } } } @@ -528,10 +529,10 @@ class Invoice extends Model implements HasMedia 'notes' => $this->getNotes(), 'logo' => $logo ?? null, 'labels' => $labels, - 'taxes' => $taxes + 'taxes' => $taxes, ]); - return PDF::loadView('app.pdf.invoice.' . $invoiceTemplate->view); + return PDF::loadView('app.pdf.invoice.'.$invoiceTemplate->view); } public function getEmailAttachmentSetting() @@ -587,7 +588,7 @@ class Invoice extends Model implements HasMedia '{INVOICE_DUE_DATE}' => $this->formattedDueDate, '{INVOICE_NUMBER}' => $this->invoice_number, '{INVOICE_REF_NUMBER}' => $this->reference_number, - '{INVOICE_LINK}' => url('/customer/invoices/pdf/' . $this->unique_hash) + '{INVOICE_LINK}' => url('/customer/invoices/pdf/'.$this->unique_hash), ]; } } diff --git a/app/Models/InvoiceItem.php b/app/Models/InvoiceItem.php index a8eb445d..a8ea8b0c 100644 --- a/app/Models/InvoiceItem.php +++ b/app/Models/InvoiceItem.php @@ -1,12 +1,10 @@ 'float', 'quantity' => 'float', 'discount_val' => 'integer', - 'tax' => 'integer' + 'tax' => 'integer', ]; public function invoice() diff --git a/app/Models/InvoiceTemplate.php b/app/Models/InvoiceTemplate.php index 18bb1514..4bfa6c35 100644 --- a/app/Models/InvoiceTemplate.php +++ b/app/Models/InvoiceTemplate.php @@ -1,9 +1,9 @@ 'integer' + 'price' => 'integer', ]; protected $appends = [ - 'formattedCreatedAt' + 'formattedCreatedAt', ]; public function unit() @@ -99,14 +95,15 @@ class Item extends Model public function getFormattedCreatedAtAttribute($value) { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); + return Carbon::parse($this->created_at)->format($dateFormat); } public function taxes() { return $this->hasMany(Tax::class) - ->where('invoice_item_id', NULL) - ->where('estimate_item_id', NULL); + ->where('invoice_item_id', null) + ->where('estimate_item_id', null); } public function scopeWhereCompany($query, $company_id) @@ -121,7 +118,7 @@ class Item extends Model public function estimateItems() { - return $this->hasMany( EstimateItem::class); + return $this->hasMany(EstimateItem::class); } public static function createItem($request) diff --git a/app/Models/Note.php b/app/Models/Note.php index a382805e..b618ab3c 100644 --- a/app/Models/Note.php +++ b/app/Models/Note.php @@ -26,7 +26,7 @@ class Note extends Model public function scopeWhereSearch($query, $search) { - $query->where('name', 'LIKE', '%' . $search . '%'); + $query->where('name', 'LIKE', '%'.$search.'%'); } public function scopeWhereType($query, $type) diff --git a/app/Models/Payment.php b/app/Models/Payment.php index 69a316b9..d20f360e 100644 --- a/app/Models/Payment.php +++ b/app/Models/Payment.php @@ -2,35 +2,31 @@ namespace Crater\Models; -use App; -use Crater\Models\CompanySetting; -use Crater\Models\User; -use Crater\Models\Invoice; -use Crater\Models\Company; +use Barryvdh\DomPDF\Facade as PDF; use Carbon\Carbon; -use Illuminate\Database\Eloquent\Model; -use Crater\Models\PaymentMethod; -use Crater\Traits\HasCustomFieldsTrait; +use Crater\Jobs\GeneratePaymentPdfJob; use Crater\Mail\SendPaymentMail; -use Vinkla\Hashids\Facades\Hashids; +use Crater\Traits\GeneratesPdfTrait; +use Crater\Traits\HasCustomFieldsTrait; use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\Facades\Auth; use Spatie\MediaLibrary\HasMedia; use Spatie\MediaLibrary\InteractsWithMedia; -use Crater\Traits\GeneratesPdfTrait; -use Barryvdh\DomPDF\Facade as PDF; -use Crater\Jobs\GeneratePaymentPdfJob; -use Illuminate\Support\Facades\Auth; +use Vinkla\Hashids\Facades\Hashids; class Payment extends Model implements HasMedia { - use HasFactory, InteractsWithMedia, GeneratesPdfTrait; + use HasFactory; + use InteractsWithMedia; + use GeneratesPdfTrait; use HasCustomFieldsTrait; - const PAYMENT_MODE_CHECK = 'CHECK'; - const PAYMENT_MODE_OTHER = 'OTHER'; - const PAYMENT_MODE_CASH = 'CASH'; - const PAYMENT_MODE_CREDIT_CARD = 'CREDIT_CARD'; - const PAYMENT_MODE_BANK_TRANSFER = 'BANK_TRANSFER'; + public const PAYMENT_MODE_CHECK = 'CHECK'; + public const PAYMENT_MODE_OTHER = 'OTHER'; + public const PAYMENT_MODE_CASH = 'CASH'; + public const PAYMENT_MODE_CREDIT_CARD = 'CREDIT_CARD'; + public const PAYMENT_MODE_BANK_TRANSFER = 'BANK_TRANSFER'; protected $dates = ['created_at', 'updated_at']; @@ -39,7 +35,7 @@ class Payment extends Model implements HasMedia protected $appends = [ 'formattedCreatedAt', 'formattedPaymentDate', - 'paymentPdfUrl' + 'paymentPdfUrl', ]; protected static function booted() @@ -63,29 +59,33 @@ class Payment extends Model implements HasMedia public function getPaymentPrefixAttribute() { $prefix = explode("-", $this->payment_number)[0]; + return $prefix; } public function getFormattedCreatedAtAttribute($value) { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); + return Carbon::parse($this->created_at)->format($dateFormat); } public function getFormattedPaymentDateAttribute($value) { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); + return Carbon::parse($this->payment_date)->format($dateFormat); } public function getPaymentPdfUrlAttribute() { - return url('/payments/pdf/' . $this->unique_hash); + return url('/payments/pdf/'.$this->unique_hash); } public function getPaymentNumAttribute() { $position = $this->strposX($this->payment_number, "-", 1) + 1; + return substr($this->payment_number, $position); } @@ -130,7 +130,7 @@ class Payment extends Model implements HasMedia \Mail::to($data['to'])->send(new SendPaymentMail($data)); return [ - 'success' => true + 'success' => true, ]; } @@ -151,10 +151,10 @@ class Payment extends Model implements HasMedia $invoice->due_amount = (int)$invoice->due_amount - (int)$request->amount; if ($invoice->due_amount < 0) { return [ - 'error' => 'invalid_amount' + 'error' => 'invalid_amount', ]; } - $invoice->paid_status = Invoice::STATUS_PARTIALLY_PAID; + $invoice->paid_status = Invoice::STATUS_PARTIALLY_PAID; } $invoice->save(); } @@ -192,7 +192,7 @@ class Payment extends Model implements HasMedia if ($invoice->due_amount < 0) { return [ - 'error' => 'invalid_amount' + 'error' => 'invalid_amount', ]; } @@ -251,6 +251,7 @@ class Payment extends Model implements HasMedia return true; } + private function strposX($haystack, $needle, $number) { if ($number == '1') { @@ -269,7 +270,7 @@ class Payment extends Model implements HasMedia public static function getNextPaymentNumber($value) { // Get the last created order - $payment = Payment::where('payment_number', 'LIKE', $value . '-%') + $payment = Payment::where('payment_number', 'LIKE', $value.'-%') ->orderBy('payment_number', 'desc') ->first(); @@ -277,7 +278,7 @@ class Payment extends Model implements HasMedia $numberLength = CompanySetting::getSetting('payment_number_length', request()->header('company')); $numberLengthText = "%0{$numberLength}d"; - if (!$payment) { + if (! $payment) { // We get here if there is no order at all // If there is no number set it to 0, which will be 1 at the end. $number = 0; @@ -299,16 +300,16 @@ class Payment extends Model implements HasMedia { foreach (explode(' ', $search) as $term) { $query->whereHas('user', function ($query) use ($term) { - $query->where('name', 'LIKE', '%' . $term . '%') - ->orWhere('contact_name', 'LIKE', '%' . $term . '%') - ->orWhere('company_name', 'LIKE', '%' . $term . '%'); + $query->where('name', 'LIKE', '%'.$term.'%') + ->orWhere('contact_name', 'LIKE', '%'.$term.'%') + ->orWhere('company_name', 'LIKE', '%'.$term.'%'); }); } } public function scopePaymentNumber($query, $paymentNumber) { - return $query->where('payments.payment_number', 'LIKE', '%' . $paymentNumber . '%'); + return $query->where('payments.payment_number', 'LIKE', '%'.$paymentNumber.'%'); } public function scopePaymentMethod($query, $paymentMethodId) @@ -390,7 +391,7 @@ class Payment extends Model implements HasMedia 'company_address' => $this->getCompanyAddress(), 'billing_address' => $this->getCustomerBillingAddress(), 'notes' => $this->getNotes(), - 'logo' => $logo ?? null + 'logo' => $logo ?? null, ]); return PDF::loadView('app.pdf.payment.payment'); @@ -442,7 +443,7 @@ class Payment extends Model implements HasMedia '{PAYMENT_MODE}' => $this->paymentMethod ? $this->paymentMethod->name : null, '{PAYMENT_NUMBER}' => $this->payment_number, '{PAYMENT_AMOUNT}' => $this->reference_number, - '{PAYMENT_LINK}' => $this->paymentPdfUrl + '{PAYMENT_LINK}' => $this->paymentPdfUrl, ]; } } diff --git a/app/Models/PaymentMethod.php b/app/Models/PaymentMethod.php index 15e89137..e84dbff8 100644 --- a/app/Models/PaymentMethod.php +++ b/app/Models/PaymentMethod.php @@ -2,8 +2,6 @@ namespace Crater\Models; -use Crater\Models\Company; -use Crater\Models\Payment; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; @@ -35,7 +33,7 @@ class PaymentMethod extends Model public function scopeWhereSearch($query, $search) { - $query->where('name', 'LIKE', '%' . $search . '%'); + $query->where('name', 'LIKE', '%'.$search.'%'); } public function scopeApplyFilters($query, array $filters) diff --git a/app/Models/Setting.php b/app/Models/Setting.php index 20bb678b..0326538b 100644 --- a/app/Models/Setting.php +++ b/app/Models/Setting.php @@ -1,4 +1,5 @@ value = $setting; $old->save(); + return; } diff --git a/app/Models/Tax.php b/app/Models/Tax.php index 9d5af74f..04e4d95f 100644 --- a/app/Models/Tax.php +++ b/app/Models/Tax.php @@ -1,20 +1,16 @@ 'integer', - 'percent' => 'float' + 'percent' => 'float', ]; public function taxType() @@ -82,7 +78,7 @@ class Tax extends Model 'invoice_date', [$start->format('Y-m-d'), $end->format('Y-m-d')] ); - }) + }) ->orWhereHas('invoiceItem.invoice', function ($query) use ($start, $end) { $query->where('paid_status', Invoice::STATUS_PAID) ->whereBetween( diff --git a/app/Models/TaxType.php b/app/Models/TaxType.php index fe5384d4..8d6d1a0f 100644 --- a/app/Models/TaxType.php +++ b/app/Models/TaxType.php @@ -2,24 +2,24 @@ namespace Crater\Models; -use Illuminate\Database\Eloquent\Model; -use Crater\Models\Tax; use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\Model; class TaxType extends Model { use HasFactory; + protected $fillable = [ 'name', 'percent', 'company_id', 'compound_tax', 'collective_tax', - 'description' + 'description', ]; protected $casts = [ - 'percent' => 'float' + 'percent' => 'float', ]; public function taxes() @@ -67,7 +67,7 @@ class TaxType extends Model public function scopeWhereSearch($query, $search) { - $query->where('name', 'LIKE', '%' . $search . '%'); + $query->where('name', 'LIKE', '%'.$search.'%'); } public function scopePaginateData($query, $limit) diff --git a/app/Models/Unit.php b/app/Models/Unit.php index 1adaf095..6caee67b 100644 --- a/app/Models/Unit.php +++ b/app/Models/Unit.php @@ -2,14 +2,13 @@ namespace Crater\Models; -use Crater\Models\Company; -use Illuminate\Database\Eloquent\Model; -use Crater\Models\Item; use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\Model; class Unit extends Model { use HasFactory; + protected $fillable = ['name', 'company_id']; public function items() diff --git a/app/Models/User.php b/app/Models/User.php index d67e7200..95307a92 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -2,30 +2,24 @@ namespace Crater\Models; -use Crater\Models\CompanySetting; -use Crater\Models\Currency; -use Crater\Models\Estimate; -use Crater\Models\Invoice; -use Crater\Models\UserSetting; -use Illuminate\Notifications\Notifiable; -use Illuminate\Foundation\Auth\User as Authenticatable; use Carbon\Carbon; -use Crater\Models\Address; -use Crater\Models\Payment; -use Crater\Models\Expense; -use Crater\Models\Company; -use Crater\Traits\HasCustomFieldsTrait; use Crater\Notifications\MailResetPasswordNotification; +use Crater\Traits\HasCustomFieldsTrait; use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Foundation\Auth\User as Authenticatable; +use Illuminate\Notifications\Notifiable; use Illuminate\Support\Facades\Auth; -use Spatie\MediaLibrary\HasMedia; -use Spatie\MediaLibrary\InteractsWithMedia; use Illuminate\Support\Facades\Hash; use Laravel\Sanctum\HasApiTokens; +use Spatie\MediaLibrary\HasMedia; +use Spatie\MediaLibrary\InteractsWithMedia; class User extends Authenticatable implements HasMedia { - use HasApiTokens, Notifiable, InteractsWithMedia, HasCustomFieldsTrait; + use HasApiTokens; + use Notifiable; + use InteractsWithMedia; + use HasCustomFieldsTrait; use HasFactory; /** @@ -49,7 +43,7 @@ class User extends Authenticatable implements HasMedia 'contact_name', 'website', 'enable_portal', - 'creator_id' + 'creator_id', ]; /** @@ -63,12 +57,12 @@ class User extends Authenticatable implements HasMedia ]; protected $with = [ - 'currency' + 'currency', ]; protected $appends = [ 'formattedCreatedAt', - 'avatar' + 'avatar', ]; /** @@ -99,12 +93,14 @@ class User extends Authenticatable implements HasMedia $remember = $request->remember; $email = $request->email; $password = $request->password; - return (\Auth::attempt(array('email' => $email, 'password' => $password), $remember)); + + return (\Auth::attempt(['email' => $email, 'password' => $password], $remember)); } public function getFormattedCreatedAtAttribute($value) { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); + return Carbon::parse($this->created_at)->format($dateFormat); } @@ -180,31 +176,31 @@ class User extends Authenticatable implements HasMedia { foreach (explode(' ', $search) as $term) { $query->where(function ($query) use ($term) { - $query->where('name', 'LIKE', '%' . $term . '%') - ->orWhere('email', 'LIKE', '%' . $term . '%') - ->orWhere('phone', 'LIKE', '%' . $term . '%'); + $query->where('name', 'LIKE', '%'.$term.'%') + ->orWhere('email', 'LIKE', '%'.$term.'%') + ->orWhere('phone', 'LIKE', '%'.$term.'%'); }); } } public function scopeWhereContactName($query, $contactName) { - return $query->where('contact_name', 'LIKE', '%' . $contactName . '%'); + return $query->where('contact_name', 'LIKE', '%'.$contactName.'%'); } public function scopeWhereDisplayName($query, $displayName) { - return $query->where('name', 'LIKE', '%' . $displayName . '%'); + return $query->where('name', 'LIKE', '%'.$displayName.'%'); } public function scopeWherePhone($query, $phone) { - return $query->where('phone', 'LIKE', '%' . $phone . '%'); + return $query->where('phone', 'LIKE', '%'.$phone.'%'); } public function scopeWhereEmail($query, $email) { - return $query->where('email', 'LIKE', '%' . $email . '%'); + return $query->where('email', 'LIKE', '%'.$email.'%'); } public function scopeCustomer($query) @@ -290,7 +286,6 @@ class User extends Authenticatable implements HasMedia public static function deleteCustomers($ids) { foreach ($ids as $id) { - $customer = self::find($id); if ($customer->estimates()->exists()) { @@ -335,7 +330,7 @@ class User extends Authenticatable implements HasMedia 'company_name', 'contact_name', 'website', - 'enable_portal' + 'enable_portal', ]); $data['creator_id'] = Auth::id(); @@ -374,7 +369,7 @@ class User extends Authenticatable implements HasMedia 'company_name', 'contact_name', 'website', - 'enable_portal' + 'enable_portal', ]); $data['role'] = 'customer'; @@ -410,7 +405,7 @@ class User extends Authenticatable implements HasMedia ], [ 'key' => $key, - 'value' => $value + 'value' => $value, ] ); } diff --git a/app/Models/UserSetting.php b/app/Models/UserSetting.php index c0f138c8..81b9661e 100644 --- a/app/Models/UserSetting.php +++ b/app/Models/UserSetting.php @@ -2,7 +2,6 @@ namespace Crater\Models; -use Crater\Models\User; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; diff --git a/app/Notifications/MailResetPasswordNotification.php b/app/Notifications/MailResetPasswordNotification.php index 195c38e6..b9f14586 100644 --- a/app/Notifications/MailResetPasswordNotification.php +++ b/app/Notifications/MailResetPasswordNotification.php @@ -1,12 +1,12 @@ token ); + $link = url("/reset-password/".$this->token); - return ( new MailMessage ) + return ( new MailMessage() ) ->subject('Reset Password Notification') - ->line("Hello! You are receiving this email because we received a password reset request for your account." ) - ->action('Reset Password', $link ) - ->line("This password reset link will expire in ".config('auth.passwords.users.expire')." minutes" ) - ->line("If you did not request a password reset, no further action is required." ); + ->line("Hello! You are receiving this email because we received a password reset request for your account.") + ->action('Reset Password', $link) + ->line("This password reset link will expire in ".config('auth.passwords.users.expire')." minutes") + ->line("If you did not request a password reset, no further action is required."); } /** diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index c00df5a2..aaa232a5 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -1,8 +1,9 @@ 2) { - $number = explode("-",$value); + $number = explode("-", $value); $uniqueNumber = $number[0].'-'.sprintf('%06d', intval($number[1])); } else { $uniqueNumber = $value; diff --git a/app/Space/DateFormatter.php b/app/Space/DateFormatter.php index 35981ea3..a3c95bb2 100644 --- a/app/Space/DateFormatter.php +++ b/app/Space/DateFormatter.php @@ -1,4 +1,5 @@ "Y M d", - "moment_format" => "YYYY MMM DD" + "moment_format" => "YYYY MMM DD", ], [ "carbon_format" => "d M Y", - "moment_format" => "DD MMM YYYY" + "moment_format" => "DD MMM YYYY", ], [ "carbon_format" => "d/m/Y", - "moment_format" => "DD/MM/YYYY" + "moment_format" => "DD/MM/YYYY", ], [ "carbon_format" => "d.m.Y", - "moment_format" => "DD.MM.YYYY" + "moment_format" => "DD.MM.YYYY", ], [ "carbon_format" => "d-m-Y", - "moment_format" => "DD-MM-YYYY" + "moment_format" => "DD-MM-YYYY", ], [ "carbon_format" => "m/d/Y", - "moment_format" => "MM/DD/YYYY" + "moment_format" => "MM/DD/YYYY", ], [ "carbon_format" => "Y/m/d", - "moment_format" => " YYYY/MM/DD" + "moment_format" => " YYYY/MM/DD", ], [ "carbon_format" => "Y-m-d", - "moment_format" => "YYYY-MM-DD" + "moment_format" => "YYYY-MM-DD", ], ]; @@ -45,11 +46,11 @@ class DateFormatter $new = []; foreach (static::$formats as $format) { - $new[] = array( + $new[] = [ "display_date" => Carbon::now()->format($format['carbon_format']) , "carbon_format_value" => $format['carbon_format'], - "moment_format_value" => $format['moment_format'] - ); + "moment_format_value" => $format['moment_format'], + ]; } return $new; diff --git a/app/Space/EnvironmentManager.php b/app/Space/EnvironmentManager.php index c7c05094..f220acf4 100755 --- a/app/Space/EnvironmentManager.php +++ b/app/Space/EnvironmentManager.php @@ -2,13 +2,12 @@ namespace Crater\Space; +use Crater\Http\Requests\DatabaseEnvironmentRequest; +use Crater\Http\Requests\DiskEnvironmentRequest; +use Crater\Http\Requests\MailEnvironmentRequest; use Exception; use Illuminate\Http\Request; -use Crater\Http\Requests\DatabaseEnvironmentRequest; -use Crater\Http\Requests\MailEnvironmentRequest; -use Crater\Http\Requests\DiskEnvironmentRequest; use Illuminate\Support\Facades\DB; -use Illuminate\Support\Facades\Artisan; class EnvironmentManager { @@ -39,8 +38,8 @@ class EnvironmentManager $newDatabaseData = 'DB_CONNECTION='.$request->database_connection."\n"; - if($request->has('database_username') && $request->has('database_password')) { - if(env('DB_USERNAME') && env('DB_HOST')){ + if ($request->has('database_username') && $request->has('database_password')) { + if (env('DB_USERNAME') && env('DB_HOST')) { $oldDatabaseData = $oldDatabaseData. 'DB_HOST='.config('database.connections.'.config('database.default').'.host')."\n". 'DB_PORT='.config('database.connections.'.config('database.default').'.port')."\n". @@ -59,8 +58,7 @@ class EnvironmentManager 'DB_USERNAME='.$request->database_username."\n". 'DB_PASSWORD="'.$request->database_password."\"\n\n"; } else { - - if(env('DB_USERNAME') && env('DB_HOST')){ + if (env('DB_USERNAME') && env('DB_HOST')) { $oldDatabaseData = $oldDatabaseData. 'DB_HOST='.config('database.connections.'.config('database.default').'.host')."\n". 'DB_PORT='.config('database.connections.'.config('database.default').'.port')."\n". @@ -77,23 +75,20 @@ class EnvironmentManager } try { - $this->checkDatabaseConnection($request); - if(\Schema::hasTable('users') ) { + if (\Schema::hasTable('users')) { return [ - 'error' => 'database_should_be_empty' + 'error' => 'database_should_be_empty', ]; } - } catch (Exception $e) { - return [ - 'error_message' => $e->getMessage() + 'error_message' => $e->getMessage(), ]; } - try { + try { file_put_contents($this->envPath, str_replace( $oldDatabaseData, $newDatabaseData, @@ -115,18 +110,17 @@ class EnvironmentManager file_put_contents($this->envPath, str_replace( 'SESSION_DOMAIN='.config('session.domain'), - 'SESSION_DOMAIN='.explode(':',$request->app_domain)[0], + 'SESSION_DOMAIN='.explode(':', $request->app_domain)[0], file_get_contents($this->envPath) )); - } catch (Exception $e) { return [ - 'error' => 'database_variables_save_error' + 'error' => 'database_variables_save_error', ]; } return [ - 'success' => 'database_variables_save_successfully' + 'success' => 'database_variables_save_successfully', ]; } @@ -142,16 +136,16 @@ class EnvironmentManager $settings = config("database.connections.$connection"); $connectionArray = array_merge($settings, [ - 'driver' => $connection, + 'driver' => $connection, 'database' => $request->database_name, ]); - if($request->has('database_username') && $request->has('database_password')) { + if ($request->has('database_username') && $request->has('database_password')) { $connectionArray = array_merge($connectionArray, [ 'username' => $request->database_username, 'password' => $request->database_password, - 'host' => $request->database_hostname, - 'port' => $request->database_port, + 'host' => $request->database_hostname, + 'port' => $request->database_port, ]); } @@ -166,25 +160,24 @@ class EnvironmentManager return DB::connection()->getPdo(); } - /** - * Save the mail content to the .env file. - * - * @param Request $request - * @return array - */ + /** + * Save the mail content to the .env file. + * + * @param Request $request + * @return array + */ public function saveMailVariables(MailEnvironmentRequest $request) { $mailData = $this->getMailData($request); try { - file_put_contents($this->envPath, str_replace( $mailData['old_mail_data'], $mailData['new_mail_data'], file_get_contents($this->envPath) )); - if($mailData['extra_old_mail_data']) { + if ($mailData['extra_old_mail_data']) { file_put_contents($this->envPath, str_replace( $mailData['extra_old_mail_data'], $mailData['extra_mail_data'], @@ -197,15 +190,14 @@ class EnvironmentManager FILE_APPEND ); } - } catch (Exception $e) { return [ - 'error' => 'mail_variables_save_error' + 'error' => 'mail_variables_save_error', ]; } return [ - 'success' => 'mail_variables_save_successfully' + 'success' => 'mail_variables_save_successfully', ]; } @@ -217,7 +209,7 @@ class EnvironmentManager $oldMailData = ""; $newMailData = ""; - if(env('MAIL_FROM_ADDRESS') !== NULL && env('MAIL_FROM_NAME') !== NULL ) { + if (env('MAIL_FROM_ADDRESS') !== null && env('MAIL_FROM_NAME') !== null) { $mailFromCredential = 'MAIL_FROM_ADDRESS='.config('mail.from.address')."\n". 'MAIL_FROM_NAME="'.config('mail.from.name')."\"\n\n"; @@ -267,12 +259,12 @@ class EnvironmentManager 'MAIL_FROM_ADDRESS='.$request->from_mail."\n". 'MAIL_FROM_NAME="'.$request->from_name."\"\n\n"; - $extraMailData= + $extraMailData = 'MAILGUN_DOMAIN='.$request->mail_mailgun_domain."\n". 'MAILGUN_SECRET='.$request->mail_mailgun_secret."\n". 'MAILGUN_ENDPOINT='.$request->mail_mailgun_endpoint."\n"; - if(env('MAILGUN_DOMAIN') !== NULL && env('MAILGUN_SECRET') !== NULL && env('MAILGUN_ENDPOINT') !== NULL) { + if (env('MAILGUN_DOMAIN') !== null && env('MAILGUN_SECRET') !== null && env('MAILGUN_ENDPOINT') !== null) { $extraOldMailData = 'MAILGUN_DOMAIN='.config('services.mailgun.domain')."\n". 'MAILGUN_SECRET='.config('services.mailgun.secret')."\n". @@ -301,11 +293,11 @@ class EnvironmentManager 'MAIL_FROM_ADDRESS='.$request->from_mail."\n". 'MAIL_FROM_NAME="'.$request->from_name."\"\n\n"; - $extraMailData= + $extraMailData = 'SES_KEY='.$request->mail_ses_key."\n". 'SES_SECRET='.$request->mail_ses_secret."\n"; - if(env('SES_KEY') !== NULL && env('SES_SECRET') !== NULL ) { + if (env('SES_KEY') !== null && env('SES_SECRET') !== null) { $extraOldMailData = 'SES_KEY='.config('services.ses.key')."\n". 'SES_SECRET='.config('services.ses.secret')."\n"; @@ -362,23 +354,22 @@ class EnvironmentManager 'old_mail_data' => $oldMailData, 'new_mail_data' => $newMailData, 'extra_mail_data' => $extraMailData, - 'extra_old_mail_data' => $extraOldMailData + 'extra_old_mail_data' => $extraOldMailData, ]; } - /** - * Save the disk content to the .env file. - * - * @param Request $request - * @return array - */ + /** + * Save the disk content to the .env file. + * + * @param Request $request + * @return array + */ public function saveDiskVariables(DiskEnvironmentRequest $request) { $diskData = $this->getDiskData($request); try { - - if(!$diskData['old_default_driver']){ + if (! $diskData['old_default_driver']) { file_put_contents($this->envPath, $diskData['default_driver'], FILE_APPEND); } else { file_put_contents($this->envPath, str_replace( @@ -388,25 +379,23 @@ class EnvironmentManager )); } - if(!$diskData['old_disk_data']){ + if (! $diskData['old_disk_data']) { file_put_contents($this->envPath, $diskData['new_disk_data'], FILE_APPEND); } else { - file_put_contents($this->envPath, str_replace( $diskData['old_disk_data'], $diskData['new_disk_data'], file_get_contents($this->envPath) )); } - } catch (Exception $e) { return [ - 'error' => 'disk_variables_save_error' + 'error' => 'disk_variables_save_error', ]; } return [ - 'success' => 'disk_variables_save_successfully' + 'success' => 'disk_variables_save_successfully', ]; } @@ -417,8 +406,8 @@ class EnvironmentManager $oldDiskData = ""; $newDiskData = ""; - if($request->default_driver) { - if(env('FILESYSTEM_DRIVER') !== NULL) { + if ($request->default_driver) { + if (env('FILESYSTEM_DRIVER') !== null) { $defaultDriver = "\n".'FILESYSTEM_DRIVER='.$request->default_driver."\n"; $oldDefaultDriver = @@ -431,7 +420,7 @@ class EnvironmentManager switch ($request->selected_driver) { case 's3': - if(env('AWS_KEY') !== NULL){ + if (env('AWS_KEY') !== null) { $oldDiskData = "\n". 'AWS_KEY='.config('filesystems.disks.s3.key')."\n". 'AWS_SECRET="'.config('filesystems.disks.s3.secret')."\"\n". @@ -450,14 +439,14 @@ class EnvironmentManager break; case 'doSpaces': - if(env('DO_SPACES_KEY') !== NULL){ + if (env('DO_SPACES_KEY') !== null) { $oldDiskData = "\n". 'DO_SPACES_KEY='.config('filesystems.disks.doSpaces.key')."\n". 'DO_SPACES_SECRET="'.config('filesystems.disks.doSpaces.secret')."\"\n". 'DO_SPACES_REGION='.config('filesystems.disks.doSpaces.region')."\n". 'DO_SPACES_BUCKET='.config('filesystems.disks.doSpaces.bucket')."\n". 'DO_SPACES_ENDPOINT='.config('filesystems.disks.doSpaces.endpoint')."\n"; - 'DO_SPACES_ROOT='.config('filesystems.disks.doSpaces.root')."\n"; + 'DO_SPACES_ROOT='.config('filesystems.disks.doSpaces.root')."\n"; } $newDiskData = "\n". @@ -471,7 +460,7 @@ class EnvironmentManager break; case 'dropbox': - if(env('DROPBOX_TOKEN') !== NULL){ + if (env('DROPBOX_TOKEN') !== null) { $oldDiskData = "\n". 'DROPBOX_TOKEN='.config('filesystems.disks.dropbox.token')."\n". 'DROPBOX_KEY='.config('filesystems.disks.dropbox.key')."\n". @@ -494,7 +483,7 @@ class EnvironmentManager 'old_disk_data' => $oldDiskData, 'new_disk_data' => $newDiskData, 'default_driver' => $defaultDriver, - 'old_default_driver' => $oldDefaultDriver + 'old_default_driver' => $oldDefaultDriver, ]; } } diff --git a/app/Space/PermissionsChecker.php b/app/Space/PermissionsChecker.php index 5a0b7584..d06773e2 100755 --- a/app/Space/PermissionsChecker.php +++ b/app/Space/PermissionsChecker.php @@ -30,7 +30,7 @@ class PermissionsChecker public function check(array $folders) { foreach ($folders as $folder => $permission) { - if (!($this->getPermission($folder) >= $permission)) { + if (! ($this->getPermission($folder) >= $permission)) { $this->addFileAndSetErrors($folder, $permission, false); } else { $this->addFile($folder, $permission, true); diff --git a/app/Space/RequirementsChecker.php b/app/Space/RequirementsChecker.php index 43103517..f63992f6 100755 --- a/app/Space/RequirementsChecker.php +++ b/app/Space/RequirementsChecker.php @@ -34,6 +34,7 @@ class RequirementsChecker $results['errors'] = true; } } + break; // check apache requirements case 'apache': @@ -49,6 +50,7 @@ class RequirementsChecker } } } + break; } } diff --git a/app/Space/SiteApi.php b/app/Space/SiteApi.php index b58fb6d7..89dd349d 100644 --- a/app/Space/SiteApi.php +++ b/app/Space/SiteApi.php @@ -2,25 +2,24 @@ namespace Crater\Space; +use Crater\Models\Setting; use GuzzleHttp\Client; use GuzzleHttp\Exception\RequestException; -use Crater\Models\Setting; // Implementation taken from Akaunting - https://github.com/akaunting/akaunting trait SiteApi { - - protected static function getRemote($url, $data = array()) + protected static function getRemote($url, $data = []) { $base = 'https://craterapp.com/'; $client = new Client(['verify' => false, 'base_uri' => $base]); - $headers['headers'] = array( - 'Accept' => 'application/json', - 'Referer' => url('/'), - 'crater' => Setting::getSetting('version') - ); + $headers['headers'] = [ + 'Accept' => 'application/json', + 'Referer' => url('/'), + 'crater' => Setting::getSetting('version'), + ]; $data['http_errors'] = false; diff --git a/app/Space/TimeZones.php b/app/Space/TimeZones.php index 07d0b381..d83a5b9a 100644 --- a/app/Space/TimeZones.php +++ b/app/Space/TimeZones.php @@ -1,4 +1,5 @@ 100, 'track_redirects' => true]); @@ -36,7 +36,7 @@ class Updater foreach (json_decode($extensions) as $extension) { $extensionData[$extension] = phpversion($extension) ? true : false; } - $extensionData['php'. '('.$data->version->minimum_php_version.')'] = version_compare(phpversion(), $data->version->minimum_php_version, ">="); + $extensionData['php'.'('.$data->version->minimum_php_version.')'] = version_compare(phpversion(), $data->version->minimum_php_version, ">="); $data->version->extensions = $extensionData; } @@ -49,9 +49,9 @@ class Updater $path = null; if (env('APP_ENV') === 'development') { - $url = 'downloads/file/' . $new_version . '?type=update&is_dev=1&is_cmd='. $is_cmd; + $url = 'downloads/file/'.$new_version.'?type=update&is_dev=1&is_cmd='.$is_cmd; } else { - $url = 'downloads/file/' . $new_version . '?type=update&is_cmd='. $is_cmd; + $url = 'downloads/file/'.$new_version.'?type=update&is_cmd='.$is_cmd; } $response = static::getRemote($url, ['timeout' => 100, 'track_redirects' => true]); @@ -62,8 +62,8 @@ class Updater 'success' => false, 'error' => 'Download Exception', 'data' => [ - 'path' => $path - ] + 'path' => $path, + ], ]; } @@ -72,18 +72,18 @@ class Updater } // Create temp directory - $temp_dir = storage_path('app/temp-' . md5(mt_rand())); + $temp_dir = storage_path('app/temp-'.md5(mt_rand())); - if (!File::isDirectory($temp_dir)) { + if (! File::isDirectory($temp_dir)) { File::makeDirectory($temp_dir); } - $zip_file_path = $temp_dir . '/upload.zip'; + $zip_file_path = $temp_dir.'/upload.zip'; // Add content to the Zip file $uploaded = is_int(file_put_contents($zip_file_path, $data)) ? true : false; - if (!$uploaded) { + if (! $uploaded) { return false; } @@ -92,13 +92,13 @@ class Updater public static function unzip($zip_file_path) { - if(!file_exists($zip_file_path)) { + if (! file_exists($zip_file_path)) { throw new \Exception('Zip file not found'); } - $temp_extract_dir = storage_path('app/temp2-' . md5(mt_rand())); + $temp_extract_dir = storage_path('app/temp2-'.md5(mt_rand())); - if (!File::isDirectory($temp_extract_dir)) { + if (! File::isDirectory($temp_extract_dir)) { File::makeDirectory($temp_extract_dir); } // Unzip the file @@ -118,7 +118,7 @@ class Updater public static function copyFiles($temp_extract_dir) { - if (!File::copyDirectory($temp_extract_dir . '/Crater', base_path())) { + if (! File::copyDirectory($temp_extract_dir.'/Crater', base_path())) { return false; } @@ -132,7 +132,7 @@ class Updater { $files = json_decode($json); - foreach($files as $file) { + foreach ($files as $file) { \File::delete(base_path($file)); } @@ -153,7 +153,7 @@ class Updater return [ 'success' => true, 'error' => false, - 'data' => [] + 'data' => [], ]; } } diff --git a/app/Space/helpers.php b/app/Space/helpers.php index 0c80b52b..bd17a0a1 100644 --- a/app/Space/helpers.php +++ b/app/Space/helpers.php @@ -1,4 +1,5 @@ '.$currency->symbol.''.$format_money; } + return $currency_with_symbol; } @@ -110,14 +111,14 @@ function clean_slug($model, $title, $id = 0) $allSlugs = getRelatedSlugs($model, $slug, $id); // If we haven't used it before then we are all good. - if (!$allSlugs->contains('slug', $slug)) { + if (! $allSlugs->contains('slug', $slug)) { return $slug; } // Just append numbers like a savage until we find not used. for ($i = 1; $i <= 10; $i++) { - $newSlug = $slug . '_' . $i; - if (!$allSlugs->contains('slug', $newSlug)) { + $newSlug = $slug.'_'.$i; + if (! $allSlugs->contains('slug', $newSlug)) { return $newSlug; } } @@ -127,7 +128,7 @@ function clean_slug($model, $title, $id = 0) function getRelatedSlugs($type, $slug, $id = 0) { - return CustomField::select('slug')->where('slug', 'like', $slug . '%') + return CustomField::select('slug')->where('slug', 'like', $slug.'%') ->where('model_type', $type) ->where('id', '<>', $id) ->get(); diff --git a/app/Traits/GeneratesPdfTrait.php b/app/Traits/GeneratesPdfTrait.php index 2da5d7ae..78fa8c61 100644 --- a/app/Traits/GeneratesPdfTrait.php +++ b/app/Traits/GeneratesPdfTrait.php @@ -4,9 +4,8 @@ namespace Crater\Traits; use Carbon\Carbon; use Crater\Models\Address; -use Crater\Models\FileDisk; use Crater\Models\CompanySetting; -use Illuminate\Support\Facades\Auth; +use Crater\Models\FileDisk; use Illuminate\Support\Facades\App; trait GeneratesPdfTrait @@ -14,10 +13,10 @@ trait GeneratesPdfTrait public function getGeneratedPDFOrStream($collection_name) { $pdf = $this->getGeneratedPDF($collection_name); - if($pdf && file_exists($pdf['path'])) { + if ($pdf && file_exists($pdf['path'])) { return response()->make(file_get_contents($pdf['path']), 200, [ - 'Content-Type' => 'application/pdf', - 'Content-Disposition' => 'inline; filename="'.$pdf['file_name'].'.pdf"' + 'Content-Type' => 'application/pdf', + 'Content-Disposition' => 'inline; filename="'.$pdf['file_name'].'.pdf"', ]); } @@ -28,8 +27,8 @@ trait GeneratesPdfTrait $pdf = $this->getPDFData(); return response()->make($pdf->stream(), 200, [ - 'Content-Type' => 'application/pdf', - 'Content-Disposition' => 'inline; filename="'.$this[$collection_name.'_number'].'.pdf"' + 'Content-Type' => 'application/pdf', + 'Content-Disposition' => 'inline; filename="'.$this[$collection_name.'_number'].'.pdf"', ]); } @@ -41,7 +40,7 @@ trait GeneratesPdfTrait if ($media) { $file_disk = FileDisk::find($media->custom_properties['file_disk_id']); - if (!$file_disk) { + if (! $file_disk) { return false; } @@ -49,7 +48,7 @@ trait GeneratesPdfTrait $path = null; - if($file_disk->driver == 'local'){ + if ($file_disk->driver == 'local') { $path = $media->getPath(); } else { $path = $media->getTemporaryUrl(Carbon::now()->addMinutes(5)); @@ -57,22 +56,21 @@ trait GeneratesPdfTrait return collect([ 'path' => $path, - 'file_name' => $media->file_name + 'file_name' => $media->file_name, ]); } - } catch(\Exception $e){ + } catch (\Exception $e) { return false; } return false; } - public function generatePDF($collection_name, $file_name, $deleteExistingFile = false) { $save_pdf_to_disk = CompanySetting::getSetting('save_pdf_to_disk', $this->company_id); - if($save_pdf_to_disk == 'NO') { + if ($save_pdf_to_disk == 'NO') { return 0; } @@ -84,7 +82,7 @@ trait GeneratesPdfTrait \Storage::disk('local')->put('temp/'.$collection_name.'/'.$this->id.'/temp.pdf', $pdf->output()); - if($deleteExistingFile) { + if ($deleteExistingFile) { $this->clearMediaCollection($collection_name); } diff --git a/app/Traits/HasCustomFieldsTrait.php b/app/Traits/HasCustomFieldsTrait.php index f7677c57..f7de7aa0 100644 --- a/app/Traits/HasCustomFieldsTrait.php +++ b/app/Traits/HasCustomFieldsTrait.php @@ -2,10 +2,7 @@ namespace Crater\Traits; - -use Carbon\Carbon; use Crater\Models\CustomField; -use Crater\Models\CustomFieldValue; trait HasCustomFieldsTrait { @@ -23,7 +20,7 @@ trait HasCustomFieldsTrait 'type' => $customField->type, 'custom_field_id' => $customField->id, 'company_id' => $customField->company_id, - getCustomFieldValueKey($customField->type) => $field['value'] + getCustomFieldValueKey($customField->type) => $field['value'], ]; $this->fields()->create($customFieldValue); @@ -37,7 +34,7 @@ trait HasCustomFieldsTrait $customFieldValue = $this->fields()->firstOrCreate([ 'custom_field_id' => $customField->id, 'type' => $customField->type, - 'company_id' => $this->company_id + 'company_id' => $this->company_id, ]); $type = getCustomFieldValueKey($customField->type); diff --git a/composer.json b/composer.json index 0e390717..c93db91f 100644 --- a/composer.json +++ b/composer.json @@ -31,6 +31,7 @@ "barryvdh/laravel-ide-helper": "^2.6", "beyondcode/laravel-dump-server": "^1.0", "facade/ignition": "^2.3.6", + "friendsofphp/php-cs-fixer": "^3.0", "fzaninotto/faker": "^1.9.1", "jasonmccreary/laravel-test-assertions": "^1.0", "mockery/mockery": "^1.3.1", diff --git a/composer.lock b/composer.lock index 47fea05c..d57b96df 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "57c880e3231c7ba69db2e1c4f9734b8c", + "content-hash": "9d462bef6d76e80b0de5d85984ee4a8f", "packages": [ { "name": "asm89/stack-cors", @@ -7190,6 +7190,78 @@ ], "time": "2021-03-25T17:01:18+00:00" }, + { + "name": "doctrine/annotations", + "version": "1.13.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f", + "reference": "e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^6.0 || ^8.1", + "phpstan/phpstan": "^0.12.20", + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", + "symfony/cache": "^4.4 || ^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/1.13.1" + }, + "time": "2021-05-16T18:07:53+00:00" + }, { "name": "doctrine/instantiator", "version": "1.4.0", @@ -7503,6 +7575,94 @@ ], "time": "2021-03-19T12:00:00+00:00" }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v3.0.0-beta.2", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", + "reference": "9225f5d06f5c3ee24b89348cd3dff69c9b3c1ede" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/9225f5d06f5c3ee24b89348cd3dff69c9b3c1ede", + "reference": "9225f5d06f5c3ee24b89348cd3dff69c9b3c1ede", + "shasum": "" + }, + "require": { + "composer/semver": "^3.2", + "composer/xdebug-handler": "^1.4", + "doctrine/annotations": "^1.12", + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^7.1.3 || ^8.0", + "php-cs-fixer/diff": "^2.0", + "symfony/console": "^4.4.20 || ^5.1.3", + "symfony/event-dispatcher": "^4.4.20 || ^5.0", + "symfony/filesystem": "^4.4.20 || ^5.0", + "symfony/finder": "^4.4.20 || ^5.0", + "symfony/options-resolver": "^4.4.20 || ^5.0", + "symfony/polyfill-php72": "^1.22", + "symfony/process": "^4.4.20 || ^5.0", + "symfony/stopwatch": "^4.4.20 || ^5.0" + }, + "require-dev": { + "justinrainbow/json-schema": "^5.2", + "keradus/cli-executor": "^1.4", + "mikey179/vfsstream": "^1.6.8", + "php-coveralls/php-coveralls": "^2.4.3", + "php-cs-fixer/accessible-object": "^1.1", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", + "phpspec/prophecy": "^1.10.3", + "phpspec/prophecy-phpunit": "^1.1 || ^2.0", + "phpunit/phpunit": "^7.5.20 || ^8.5.14 || ^9.5", + "phpunitgoodpractices/polyfill": "^1.5", + "phpunitgoodpractices/traits": "^1.9.1", + "symfony/phpunit-bridge": "^5.2.4", + "symfony/yaml": "^4.4.20 || ^5.0" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters.", + "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "support": { + "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.0.0-beta.2" + }, + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2021-04-06T18:43:43+00:00" + }, { "name": "fzaninotto/faker", "version": "v1.9.2", @@ -8528,6 +8688,58 @@ "description": "Library for handling version information and constraints", "time": "2021-02-23T14:00:09+00:00" }, + { + "name": "php-cs-fixer/diff", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/diff.git", + "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/29dc0d507e838c4580d018bd8b5cb412474f7ec3", + "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", + "symfony/process": "^3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "sebastian/diff v3 backport support for PHP 5.6+", + "homepage": "https://github.com/PHP-CS-Fixer", + "keywords": [ + "diff" + ], + "support": { + "issues": "https://github.com/PHP-CS-Fixer/diff/issues", + "source": "https://github.com/PHP-CS-Fixer/diff/tree/v2.0.2" + }, + "time": "2020-10-14T08:32:19+00:00" + }, { "name": "phpdocumentor/reflection-common", "version": "2.2.0", @@ -9134,6 +9346,55 @@ ], "time": "2020-12-04T05:05:53+00:00" }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/master" + }, + "time": "2016-08-06T20:24:11+00:00" + }, { "name": "react/promise", "version": "v2.8.0", @@ -10242,6 +10503,137 @@ ], "time": "2021-03-28T14:30:26+00:00" }, + { + "name": "symfony/options-resolver", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce", + "reference": "5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php73": "~1.0", + "symfony/polyfill-php80": "^1.15" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "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": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T12:56:27+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v5.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "d99310c33e833def36419c284f60e8027d359678" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/d99310c33e833def36419c284f60e8027d359678", + "reference": "d99310c33e833def36419c284f60e8027d359678", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/service-contracts": "^1.0|^2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "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": "Provides a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v5.3.0-BETA1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-29T15:28:41+00:00" + }, { "name": "theseer/tokenizer", "version": "1.2.0", @@ -10298,5 +10690,5 @@ "php": "^7.4 || ^8.0" }, "platform-dev": [], - "plugin-api-version": "1.1.0" + "plugin-api-version": "2.0.0" } diff --git a/config/app.php b/config/app.php index 696fac46..89e4ed1c 100644 --- a/config/app.php +++ b/config/app.php @@ -167,7 +167,7 @@ return [ Crater\Providers\EventServiceProvider::class, Crater\Providers\RouteServiceProvider::class, Crater\Providers\DropboxServiceProvider::class, - Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class + Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class, ], /* diff --git a/config/backup.php b/config/backup.php index 7caa47a3..d8a14550 100644 --- a/config/backup.php +++ b/config/backup.php @@ -29,7 +29,7 @@ return [ 'exclude' => [ base_path('vendor'), base_path('node_modules'), - base_path('.git') + base_path('.git'), ], /* @@ -102,7 +102,7 @@ return [ * The disk names on which the backups will be stored. */ 'disks' => [ - 'local' + 'local', ], ], @@ -235,7 +235,7 @@ return [ ], 'queue' => [ - 'name' => env('BACKUP_QUEUE_NAME', 'backup') - ] + 'name' => env('BACKUP_QUEUE_NAME', 'backup'), + ], ]; diff --git a/config/broadcasting.php b/config/broadcasting.php index 6e0c36ca..374f196e 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -37,7 +37,7 @@ return [ 'app_id' => env('PUSHER_APP_ID'), 'options' => [ 'cluster' => 'ap2', - 'encrypted' => true + 'encrypted' => true, ], ], diff --git a/config/crater.php b/config/crater.php index 609a30ab..1a6a9739 100644 --- a/config/crater.php +++ b/config/crater.php @@ -11,21 +11,21 @@ return [ * List of languages supported by Crater. */ 'languages' => [ - ["code"=>"ar", "name" => "Arabic"], - ["code"=>"nl", "name" => "Dutch"], - ["code"=>"en", "name" => "English"], - ["code"=>"fr", "name" => "French"], - ["code"=>"de", "name" => "German"], - ["code"=>"ja", "name" => "Japanese"], - ["code"=>"it", "name" => "Italian"], - ["code"=>"lv", "name" => "Latvian"], - ["code"=>"pt_BR", "name" => "Portuguese (Brazilian)"], - ["code"=>"sr", "name" => "Serbian Latin"], - ["code"=>"ko", "name" => "Korean"], - ["code"=>"es", "name" => "Spanish"], - ["code"=>"sv", "name"=> "Svenska"], - ["code"=>"sk", "name"=> "Slovak"], - ["code"=>"vi", "name"=> "Tiếng Việt"] + ["code" => "ar", "name" => "Arabic"], + ["code" => "nl", "name" => "Dutch"], + ["code" => "en", "name" => "English"], + ["code" => "fr", "name" => "French"], + ["code" => "de", "name" => "German"], + ["code" => "ja", "name" => "Japanese"], + ["code" => "it", "name" => "Italian"], + ["code" => "lv", "name" => "Latvian"], + ["code" => "pt_BR", "name" => "Portuguese (Brazilian)"], + ["code" => "sr", "name" => "Serbian Latin"], + ["code" => "ko", "name" => "Korean"], + ["code" => "es", "name" => "Spanish"], + ["code" => "sv", "name" => "Svenska"], + ["code" => "sk", "name" => "Slovak"], + ["code" => "vi", "name" => "Tiếng Việt"], ], /* @@ -44,5 +44,5 @@ return [ ['key' => 'october-september', 'value' => '10-9'], ['key' => 'november-october' , 'value' => '11-10'], ['key' => 'december-november', 'value' => '12-11'], - ] + ], ]; diff --git a/config/dompdf.php b/config/dompdf.php index 68b35ec8..7f89d862 100644 --- a/config/dompdf.php +++ b/config/dompdf.php @@ -1,6 +1,6 @@ false, // Throw an Exception on warnings from dompdf 'orientation' => 'portrait', - 'defines' => array( + 'defines' => [ /** * The location of the DOMPDF font directory * @@ -238,7 +238,7 @@ return array( * Use the more-than-experimental HTML5 Lib parser */ "enable_html5_parser" => true, - ), + ], -); +]; diff --git a/config/filesystems.php b/config/filesystems.php index 72adfc56..d8f32c73 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -51,7 +51,7 @@ return [ 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), - 'url' => env('APP_URL') . '/storage', + 'url' => env('APP_URL').'/storage', 'visibility' => 'public', ], @@ -61,12 +61,12 @@ return [ 'secret' => env('AWS_SECRET'), 'region' => env('AWS_REGION'), 'bucket' => env('AWS_BUCKET'), - 'root' => env('AWS_ROOT') + 'root' => env('AWS_ROOT'), ], 'media' => [ 'driver' => 'local', - 'root' => public_path('media'), + 'root' => public_path('media'), ], 'doSpaces' => [ diff --git a/config/hashids.php b/config/hashids.php index ddb863a4..9264ce9d 100644 --- a/config/hashids.php +++ b/config/hashids.php @@ -43,17 +43,17 @@ return [ Invoice::class => [ 'salt' => Invoice::class.config('app.key'), 'length' => '20', - 'alphabet' => 'XKyIAR7mgt8jD2vbqPrOSVenNGpiYLx4M61T' + 'alphabet' => 'XKyIAR7mgt8jD2vbqPrOSVenNGpiYLx4M61T', ], Estimate::class => [ 'salt' => Estimate::class.config('app.key'), 'length' => '20', - 'alphabet' => 'yLJWP79M8rYVqbn1NXjulO6IUDdvekRQGo40' + 'alphabet' => 'yLJWP79M8rYVqbn1NXjulO6IUDdvekRQGo40', ], Payment::class => [ 'salt' => Payment::class.config('app.key'), 'length' => '20', - 'alphabet' => 'asqtW3eDRIxB65GYl7UVLS1dybn9XrKTZ4zO' + 'alphabet' => 'asqtW3eDRIxB65GYl7UVLS1dybn9XrKTZ4zO', ], ], diff --git a/config/hashing.php b/config/hashing.php index 477d7eeb..00ed9e74 100644 --- a/config/hashing.php +++ b/config/hashing.php @@ -1,4 +1,5 @@ 2, 'time' => 2, ], -]; \ No newline at end of file +]; diff --git a/config/image.php b/config/image.php index b106809e..67983819 100644 --- a/config/image.php +++ b/config/image.php @@ -1,6 +1,6 @@ 'gd' + 'driver' => 'gd', -); +]; diff --git a/config/installer.php b/config/installer.php index 09b6d3f9..a058318f 100755 --- a/config/installer.php +++ b/config/installer.php @@ -43,8 +43,8 @@ return [ | */ 'permissions' => [ - 'storage/framework/' => '775', - 'storage/logs/' => '775', - 'bootstrap/cache/' => '775', + 'storage/framework/' => '775', + 'storage/logs/' => '775', + 'bootstrap/cache/' => '775', ], ]; diff --git a/config/logging.php b/config/logging.php index d210d8e2..c179887f 100644 --- a/config/logging.php +++ b/config/logging.php @@ -1,6 +1,8 @@ 'critical', ], 'papertrail' => [ - 'driver' => 'monolog', + 'driver' => 'monolog', 'level' => 'debug', 'handler' => SyslogUdpHandler::class, 'handler_with' => [ @@ -75,4 +77,4 @@ return [ 'level' => 'debug', ], ], -]; \ No newline at end of file +]; diff --git a/config/session.php b/config/session.php index e26bfa66..da692f3b 100644 --- a/config/session.php +++ b/config/session.php @@ -126,7 +126,7 @@ return [ 'cookie' => env( 'SESSION_COOKIE', - Str::slug(env('APP_NAME', 'laravel'), '_') . '_session' + Str::slug(env('APP_NAME', 'laravel'), '_').'_session' ), /* diff --git a/database/factories/AddressFactory.php b/database/factories/AddressFactory.php index 93fda69d..edc68fa8 100644 --- a/database/factories/AddressFactory.php +++ b/database/factories/AddressFactory.php @@ -33,7 +33,7 @@ class AddressFactory extends Factory 'phone' => $this->faker->phoneNumber, 'fax' => $this->faker->phoneNumber, 'type' => $this->faker->randomElement([Address::BILLING_TYPE, Address::SHIPPING_TYPE]), - 'user_id' => User::factory() + 'user_id' => User::factory(), ]; } } diff --git a/database/factories/CompanyFactory.php b/database/factories/CompanyFactory.php index e59b0af7..70d9abf5 100644 --- a/database/factories/CompanyFactory.php +++ b/database/factories/CompanyFactory.php @@ -23,7 +23,7 @@ class CompanyFactory extends Factory { return [ 'unique_hash' => str_random(60), - 'name' => $this->faker->name + 'name' => $this->faker->name, ]; } } diff --git a/database/factories/CustomFieldFactory.php b/database/factories/CustomFieldFactory.php index 6b9b605d..ff046b9d 100644 --- a/database/factories/CustomFieldFactory.php +++ b/database/factories/CustomFieldFactory.php @@ -27,7 +27,7 @@ class CustomFieldFactory extends Factory 'label' => $this->faker->name, 'order' => $this->faker->randomDigitNotNull, 'is_required' => $this->faker->randomElement([true, false]), - 'model_type'=> $this->faker->randomElement(['Customer', 'Invoice', 'Estimate', 'Expense', 'Payment']), + 'model_type' => $this->faker->randomElement(['Customer', 'Invoice', 'Estimate', 'Expense', 'Payment']), 'slug' => function (array $item) { return clean_slug($item['model_type'], $item['label']); }, diff --git a/database/factories/CustomFieldValueFactory.php b/database/factories/CustomFieldValueFactory.php index f31dde85..60847178 100644 --- a/database/factories/CustomFieldValueFactory.php +++ b/database/factories/CustomFieldValueFactory.php @@ -2,8 +2,8 @@ namespace Database\Factories; -use Crater\Models\CustomFieldValue; use Crater\Models\CustomField; +use Crater\Models\CustomFieldValue; use Crater\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; diff --git a/database/factories/EmailLogFactory.php b/database/factories/EmailLogFactory.php index 8f7754b8..d4e86a49 100644 --- a/database/factories/EmailLogFactory.php +++ b/database/factories/EmailLogFactory.php @@ -32,7 +32,7 @@ class EmailLogFactory extends Factory 'mailable_type' => $this->faker->randomElement([Invoice::class, Estimate::class, Payment::class]), 'mailable_id' => function (array $log) { return $log['mailable_type']::factory(); - } + }, ]; } } diff --git a/database/factories/EstimateItemFactory.php b/database/factories/EstimateItemFactory.php index 72e34559..b07ac3e1 100644 --- a/database/factories/EstimateItemFactory.php +++ b/database/factories/EstimateItemFactory.php @@ -46,7 +46,7 @@ class EstimateItemFactory extends Factory }, 'discount' => function (array $estimate) { return $estimate['discount_type'] == 'percentage' ? (($estimate['discount_val'] * $estimate['total']) / 100) : $estimate['discount_val']; - } + }, ]; } } diff --git a/database/factories/ExpenseCategoryFactory.php b/database/factories/ExpenseCategoryFactory.php index f5d18934..a319e5fa 100644 --- a/database/factories/ExpenseCategoryFactory.php +++ b/database/factories/ExpenseCategoryFactory.php @@ -25,7 +25,7 @@ class ExpenseCategoryFactory extends Factory return [ 'name' => $this->faker->word, 'company_id' => User::where('role', 'super admin')->first()->company_id, - 'description' => $this->faker->text + 'description' => $this->faker->text, ]; } } diff --git a/database/factories/ExpenseFactory.php b/database/factories/ExpenseFactory.php index 6ecbbab8..732ae9b0 100644 --- a/database/factories/ExpenseFactory.php +++ b/database/factories/ExpenseFactory.php @@ -3,8 +3,8 @@ namespace Database\Factories; use Crater\Models\Expense; -use Crater\Models\User; use Crater\Models\ExpenseCategory; +use Crater\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; class ExpenseFactory extends Factory @@ -29,7 +29,7 @@ class ExpenseFactory extends Factory 'company_id' => User::where('role', 'super admin')->first()->company_id, 'amount' => $this->faker->randomDigitNotNull, 'notes' => $this->faker->text, - 'attachment_receipt' => null + 'attachment_receipt' => null, ]; } } diff --git a/database/factories/FileDiskFactory.php b/database/factories/FileDiskFactory.php index 8b689d4f..d5227812 100644 --- a/database/factories/FileDiskFactory.php +++ b/database/factories/FileDiskFactory.php @@ -25,10 +25,10 @@ class FileDiskFactory extends Factory 'name' => $this->faker->word, 'driver' => 'local', 'set_as_default' => false, - 'credentials' => [ + 'credentials' => [ 'driver' => 'local', 'root' => storage_path('app'), - ] + ], ]; } diff --git a/database/factories/InvoiceFactory.php b/database/factories/InvoiceFactory.php index f2f0f9c0..9f0c58e4 100644 --- a/database/factories/InvoiceFactory.php +++ b/database/factories/InvoiceFactory.php @@ -3,8 +3,8 @@ namespace Database\Factories; use Crater\Models\Invoice; -use Crater\Models\User; use Crater\Models\InvoiceTemplate; +use Crater\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; class InvoiceFactory extends Factory @@ -121,7 +121,7 @@ class InvoiceFactory extends Factory return $invoice['total']; }, 'notes' => $this->faker->text(80), - 'unique_hash' => str_random(60) + 'unique_hash' => str_random(60), ]; } } diff --git a/database/factories/ItemFactory.php b/database/factories/ItemFactory.php index 36ec5fab..d57c5e6c 100644 --- a/database/factories/ItemFactory.php +++ b/database/factories/ItemFactory.php @@ -3,8 +3,8 @@ namespace Database\Factories; use Crater\Models\Item; -use Crater\Models\User; use Crater\Models\Unit; +use Crater\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; class ItemFactory extends Factory @@ -28,7 +28,7 @@ class ItemFactory extends Factory 'description' => $this->faker->text, 'company_id' => User::where('role', 'super admin')->first()->company_id, 'price' => $this->faker->randomDigitNotNull, - 'unit_id' => Unit::factory() + 'unit_id' => Unit::factory(), ]; } } diff --git a/database/factories/NoteFactory.php b/database/factories/NoteFactory.php index 9574cfd8..d6956081 100644 --- a/database/factories/NoteFactory.php +++ b/database/factories/NoteFactory.php @@ -24,7 +24,7 @@ class NoteFactory extends Factory return [ 'type' => $this->faker->randomElement(['Invoice', 'Estimate', 'Payment']), 'name' => $this->faker->word, - 'notes' => $this->faker->text + 'notes' => $this->faker->text, ]; } } diff --git a/database/factories/PaymentFactory.php b/database/factories/PaymentFactory.php index 91a910cf..04351f78 100644 --- a/database/factories/PaymentFactory.php +++ b/database/factories/PaymentFactory.php @@ -28,7 +28,7 @@ class PaymentFactory extends Factory 'payment_date' => $this->faker->date('Y-m-d', 'now'), 'notes' => $this->faker->text(80), 'amount' => $this->faker->randomDigitNotNull, - 'payment_number' => 'PAY-' . Payment::getNextPaymentNumber('PAY'), + 'payment_number' => 'PAY-'.Payment::getNextPaymentNumber('PAY'), ]; } } diff --git a/database/factories/TaxFactory.php b/database/factories/TaxFactory.php index 3a5fbb29..268e954a 100644 --- a/database/factories/TaxFactory.php +++ b/database/factories/TaxFactory.php @@ -32,7 +32,7 @@ class TaxFactory extends Factory return TaxType::find($item['tax_type_id'])->name; }, 'company_id' => User::where('role', 'super admin')->first()->company_id, - 'amount' => $this->faker->randomDigitNotNull + 'amount' => $this->faker->randomDigitNotNull, ]; } } diff --git a/database/factories/TaxTypeFactory.php b/database/factories/TaxTypeFactory.php index 1c3429dd..e886eb08 100644 --- a/database/factories/TaxTypeFactory.php +++ b/database/factories/TaxTypeFactory.php @@ -24,11 +24,11 @@ class TaxTypeFactory extends Factory { return [ 'name' => $this->faker->word, - 'company_id' => User::where('role','super admin')->first()->company_id, + 'company_id' => User::where('role', 'super admin')->first()->company_id, 'percent' => $this->faker->numberBetween($min = 0, $max = 100), 'description' => $this->faker->text, 'compound_tax' => 0, - 'collective_tax' => 0 + 'collective_tax' => 0, ]; } } diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 32ded32d..d02e9db0 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -34,7 +34,7 @@ class UserFactory extends Factory 'company_id' => User::find(1)->company_id, 'role' => 'super admin', 'password' => Hash::make('secret'), - 'currency_id' => Currency::first()->id + 'currency_id' => Currency::first()->id, ]; } } diff --git a/database/migrations/2014_10_11_071840_create_companies_table.php b/database/migrations/2014_10_11_071840_create_companies_table.php index 60909c8c..8e948313 100644 --- a/database/migrations/2014_10_11_071840_create_companies_table.php +++ b/database/migrations/2014_10_11_071840_create_companies_table.php @@ -1,8 +1,8 @@ increments('id'); $table->string('name'); diff --git a/database/migrations/2017_04_11_081227_create_items_table.php b/database/migrations/2017_04_11_081227_create_items_table.php index e2d6c96a..ba912e21 100644 --- a/database/migrations/2017_04_11_081227_create_items_table.php +++ b/database/migrations/2017_04_11_081227_create_items_table.php @@ -1,8 +1,8 @@ engine = 'InnoDB'; - $table->increments('id')->index(); - $table->string('code'); - $table->string('name'); - $table->integer('phonecode'); - }); + $table->engine = 'InnoDB'; + $table->increments('id')->index(); + $table->string('code'); + $table->string('name'); + $table->integer('phonecode'); + }); } /** diff --git a/database/migrations/2017_10_02_123501_create_estimate_items_table.php b/database/migrations/2017_10_02_123501_create_estimate_items_table.php index 5d059886..bddd5e3f 100644 --- a/database/migrations/2017_10_02_123501_create_estimate_items_table.php +++ b/database/migrations/2017_10_02_123501_create_estimate_items_table.php @@ -1,8 +1,8 @@ increments('id'); $table->string('name'); diff --git a/database/migrations/2019_09_03_135234_create_payments_table.php b/database/migrations/2019_09_03_135234_create_payments_table.php index 51ca1eb4..2ac1893b 100644 --- a/database/migrations/2019_09_03_135234_create_payments_table.php +++ b/database/migrations/2019_09_03_135234_create_payments_table.php @@ -1,8 +1,8 @@ role == 'admin') { $user->update([ - 'role' => 'super admin' + 'role' => 'super admin', ]); // Update language @@ -74,7 +72,7 @@ class UpdateCraterVersion400 extends Migration $publicDisk = [ 'driver' => 'local', 'root' => storage_path('app/public'), - 'url' => env('APP_URL') . '/storage', + 'url' => env('APP_URL').'/storage', 'visibility' => 'public', ]; @@ -130,7 +128,7 @@ class UpdateCraterVersion400 extends Migration 'estimate_shipping_address_format' => $shippingAddressFormat, 'estimate_billing_address_format' => $billingAddressFormat, 'payment_company_address_format' => $companyAddressFormat, - 'payment_from_customer_address_format' => $paymentFromCustomerAddress + 'payment_from_customer_address_format' => $paymentFromCustomerAddress, ]; CompanySetting::setSettings($settings, $user->company_id); diff --git a/database/migrations/2020_12_08_133131_update_crater_version_401.php b/database/migrations/2020_12_08_133131_update_crater_version_401.php index 43b3bd0b..d39a91f9 100644 --- a/database/migrations/2020_12_08_133131_update_crater_version_401.php +++ b/database/migrations/2020_12_08_133131_update_crater_version_401.php @@ -2,8 +2,6 @@ use Crater\Models\Setting; use Illuminate\Database\Migrations\Migration; -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Support\Facades\Schema; class UpdateCraterVersion401 extends Migration { diff --git a/database/migrations/2020_12_23_061302_update_crater_version_402.php b/database/migrations/2020_12_23_061302_update_crater_version_402.php index 1346eb56..d6a58543 100644 --- a/database/migrations/2020_12_23_061302_update_crater_version_402.php +++ b/database/migrations/2020_12_23_061302_update_crater_version_402.php @@ -2,8 +2,6 @@ use Crater\Models\Setting; use Illuminate\Database\Migrations\Migration; -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Support\Facades\Schema; class UpdateCraterVersion402 extends Migration { diff --git a/database/migrations/2020_12_31_100816_update_crater_version_403.php b/database/migrations/2020_12_31_100816_update_crater_version_403.php index 72e49f35..609a4b9b 100644 --- a/database/migrations/2020_12_31_100816_update_crater_version_403.php +++ b/database/migrations/2020_12_31_100816_update_crater_version_403.php @@ -2,8 +2,6 @@ use Crater\Models\Setting; use Illuminate\Database\Migrations\Migration; -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Support\Facades\Schema; class UpdateCraterVersion403 extends Migration { diff --git a/database/migrations/2021_01_22_085644_update_crater_version_404.php b/database/migrations/2021_01_22_085644_update_crater_version_404.php index d1b4950c..656cf77e 100644 --- a/database/migrations/2021_01_22_085644_update_crater_version_404.php +++ b/database/migrations/2021_01_22_085644_update_crater_version_404.php @@ -2,8 +2,6 @@ use Crater\Models\Setting; use Illuminate\Database\Migrations\Migration; -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Support\Facades\Schema; class UpdateCraterVersion404 extends Migration { diff --git a/database/migrations/2021_03_23_145012_add_number_length_setting.php b/database/migrations/2021_03_23_145012_add_number_length_setting.php index c2fba160..0a0a8a2b 100644 --- a/database/migrations/2021_03_23_145012_add_number_length_setting.php +++ b/database/migrations/2021_03_23_145012_add_number_length_setting.php @@ -1,8 +1,8 @@ delete(); - $countries = array( - array('id' => 1,'code' => 'AF' ,'name' => "Afghanistan",'phonecode' => 93), - array('id' => 2,'code' => 'AL' ,'name' => "Albania",'phonecode' => 355), - array('id' => 3,'code' => 'DZ' ,'name' => "Algeria",'phonecode' => 213), - array('id' => 4,'code' => 'AS' ,'name' => "American Samoa",'phonecode' => 1684), - array('id' => 5,'code' => 'AD' ,'name' => "Andorra",'phonecode' => 376), - array('id' => 6,'code' => 'AO' ,'name' => "Angola",'phonecode' => 244), - array('id' => 7,'code' => 'AI' ,'name' => "Anguilla",'phonecode' => 1264), - array('id' => 8,'code' => 'AQ' ,'name' => "Antarctica",'phonecode' => 0), - array('id' => 9,'code' => 'AG' ,'name' => "Antigua And Barbuda",'phonecode' => 1268), - array('id' => 10,'code' => 'AR','name' => "Argentina",'phonecode' => 54), - array('id' => 11,'code' => 'AM','name' => "Armenia",'phonecode' => 374), - array('id' => 12,'code' => 'AW','name' => "Aruba",'phonecode' => 297), - array('id' => 13,'code' => 'AU','name' => "Australia",'phonecode' => 61), - array('id' => 14,'code' => 'AT','name' => "Austria",'phonecode' => 43), - array('id' => 15,'code' => 'AZ','name' => "Azerbaijan",'phonecode' => 994), - array('id' => 16,'code' => 'BS','name' => "Bahamas The",'phonecode' => 1242), - array('id' => 17,'code' => 'BH','name' => "Bahrain",'phonecode' => 973), - array('id' => 18,'code' => 'BD','name' => "Bangladesh",'phonecode' => 880), - array('id' => 19,'code' => 'BB','name' => "Barbados",'phonecode' => 1246), - array('id' => 20,'code' => 'BY','name' => "Belarus",'phonecode' => 375), - array('id' => 21,'code' => 'BE','name' => "Belgium",'phonecode' => 32), - array('id' => 22,'code' => 'BZ','name' => "Belize",'phonecode' => 501), - array('id' => 23,'code' => 'BJ','name' => "Benin",'phonecode' => 229), - array('id' => 24,'code' => 'BM','name' => "Bermuda",'phonecode' => 1441), - array('id' => 25,'code' => 'BT','name' => "Bhutan",'phonecode' => 975), - array('id' => 26,'code' => 'BO','name' => "Bolivia",'phonecode' => 591), - array('id' => 27,'code' => 'BA','name' => "Bosnia and Herzegovina",'phonecode' => 387), - array('id' => 28,'code' => 'BW','name' => "Botswana",'phonecode' => 267), - array('id' => 29,'code' => 'BV','name' => "Bouvet Island",'phonecode' => 0), - array('id' => 30,'code' => 'BR','name' => "Brazil",'phonecode' => 55), - array('id' => 31,'code' => 'IO','name' => "British Indian Ocean Territory",'phonecode' => 246), - array('id' => 32,'code' => 'BN','name' => "Brunei",'phonecode' => 673), - array('id' => 33,'code' => 'BG','name' => "Bulgaria",'phonecode' => 359), - array('id' => 34,'code' => 'BF','name' => "Burkina Faso",'phonecode' => 226), - array('id' => 35,'code' => 'BI','name' => "Burundi",'phonecode' => 257), - array('id' => 36,'code' => 'KH','name' => "Cambodia",'phonecode' => 855), - array('id' => 37,'code' => 'CM','name' => "Cameroon",'phonecode' => 237), - array('id' => 38,'code' => 'CA','name' => "Canada",'phonecode' => 1), - array('id' => 39,'code' => 'CV','name' => "Cape Verde",'phonecode' => 238), - array('id' => 40,'code' => 'KY','name' => "Cayman Islands",'phonecode' => 1345), - array('id' => 41,'code' => 'CF','name' => "Central African Republic",'phonecode' => 236), - array('id' => 42,'code' => 'TD','name' => "Chad",'phonecode' => 235), - array('id' => 43,'code' => 'CL','name' => "Chile",'phonecode' => 56), - array('id' => 44,'code' => 'CN','name' => "China",'phonecode' => 86), - array('id' => 45,'code' => 'CX','name' => "Christmas Island",'phonecode' => 61), - array('id' => 46,'code' => 'CC','name' => "Cocos (Keeling) Islands",'phonecode' => 672), - array('id' => 47,'code' => 'CO','name' => "Colombia",'phonecode' => 57), - array('id' => 48,'code' => 'KM','name' => "Comoros",'phonecode' => 269), - array('id' => 49,'code' => 'CG','name' => "Congo",'phonecode' => 242), - array('id' => 50,'code' => 'CD','name' => "Congo The Democratic Republic Of The",'phonecode' => 242), - array('id' => 51,'code' => 'CK','name' => "Cook Islands",'phonecode' => 682), - array('id' => 52,'code' => 'CR','name' => "Costa Rica",'phonecode' => 506), - array('id' => 53,'code' => 'CI','name' => "Cote D Ivoire (Ivory Coast)",'phonecode' => 225), - array('id' => 54,'code' => 'HR','name' => "Croatia (Hrvatska)",'phonecode' => 385), - array('id' => 55,'code' => 'CU','name' => "Cuba",'phonecode' => 53), - array('id' => 56,'code' => 'CY','name' => "Cyprus",'phonecode' => 357), - array('id' => 57,'code' => 'CZ','name' => "Czech Republic",'phonecode' => 420), - array('id' => 58,'code' => 'DK','name' => "Denmark",'phonecode' => 45), - array('id' => 59,'code' => 'DJ','name' => "Djibouti",'phonecode' => 253), - array('id' => 60,'code' => 'DM','name' => "Dominica",'phonecode' => 1767), - array('id' => 61,'code' => 'DO','name' => "Dominican Republic",'phonecode' => 1809), - array('id' => 62,'code' => 'TP','name' => "East Timor",'phonecode' => 670), - array('id' => 63,'code' => 'EC','name' => "Ecuador",'phonecode' => 593), - array('id' => 64,'code' => 'EG','name' => "Egypt",'phonecode' => 20), - array('id' => 65,'code' => 'SV','name' => "El Salvador",'phonecode' => 503), - array('id' => 66,'code' => 'GQ','name' => "Equatorial Guinea",'phonecode' => 240), - array('id' => 67,'code' => 'ER','name' => "Eritrea",'phonecode' => 291), - array('id' => 68,'code' => 'EE','name' => "Estonia",'phonecode' => 372), - array('id' => 69,'code' => 'ET','name' => "Ethiopia",'phonecode' => 251), - array('id' => 70,'code' => 'XA','name' => "External Territories of Australia",'phonecode' => 61), - array('id' => 71,'code' => 'FK','name' => "Falkland Islands",'phonecode' => 500), - array('id' => 72,'code' => 'FO','name' => "Faroe Islands",'phonecode' => 298), - array('id' => 73,'code' => 'FJ','name' => "Fiji Islands",'phonecode' => 679), - array('id' => 74,'code' => 'FI','name' => "Finland",'phonecode' => 358), - array('id' => 75,'code' => 'FR','name' => "France",'phonecode' => 33), - array('id' => 76,'code' => 'GF','name' => "French Guiana",'phonecode' => 594), - array('id' => 77,'code' => 'PF','name' => "French Polynesia",'phonecode' => 689), - array('id' => 78,'code' => 'TF','name' => "French Southern Territories",'phonecode' => 0), - array('id' => 79,'code' => 'GA','name' => "Gabon",'phonecode' => 241), - array('id' => 80,'code' => 'GM','name' => "Gambia The",'phonecode' => 220), - array('id' => 81,'code' => 'GE','name' => "Georgia",'phonecode' => 995), - array('id' => 82,'code' => 'DE','name' => "Germany",'phonecode' => 49), - array('id' => 83,'code' => 'GH','name' => "Ghana",'phonecode' => 233), - array('id' => 84,'code' => 'GI','name' => "Gibraltar",'phonecode' => 350), - array('id' => 85,'code' => 'GR','name' => "Greece",'phonecode' => 30), - array('id' => 86,'code' => 'GL','name' => "Greenland",'phonecode' => 299), - array('id' => 87,'code' => 'GD','name' => "Grenada",'phonecode' => 1473), - array('id' => 88,'code' => 'GP','name' => "Guadeloupe",'phonecode' => 590), - array('id' => 89,'code' => 'GU','name' => "Guam",'phonecode' => 1671), - array('id' => 90,'code' => 'GT','name' => "Guatemala",'phonecode' => 502), - array('id' => 91,'code' => 'XU','name' => "Guernsey and Alderney",'phonecode' => 44), - array('id' => 92,'code' => 'GN','name' => "Guinea",'phonecode' => 224), - array('id' => 93,'code' => 'GW','name' => "Guinea-Bissau",'phonecode' => 245), - array('id' => 94,'code' => 'GY','name' => "Guyana",'phonecode' => 592), - array('id' => 95,'code' => 'HT','name' => "Haiti",'phonecode' => 509), - array('id' => 96,'code' => 'HM','name' => "Heard and McDonald Islands",'phonecode' => 0), - array('id' => 97,'code' => 'HN','name' => "Honduras",'phonecode' => 504), - array('id' => 98,'code' => 'HK','name' => "Hong Kong S.A.R.",'phonecode' => 852), - array('id' => 99,'code' => 'HU','name' => "Hungary",'phonecode' => 36), - array('id' => 100,'code' => 'IS','name' => "Iceland",'phonecode' => 354), - array('id' => 101,'code' => 'IN','name' => "India",'phonecode' => 91), - array('id' => 102,'code' => 'ID','name' => "Indonesia",'phonecode' => 62), - array('id' => 103,'code' => 'IR','name' => "Iran",'phonecode' => 98), - array('id' => 104,'code' => 'IQ','name' => "Iraq",'phonecode' => 964), - array('id' => 105,'code' => 'IE','name' => "Ireland",'phonecode' => 353), - array('id' => 106,'code' => 'IL','name' => "Israel",'phonecode' => 972), - array('id' => 107,'code' => 'IT','name' => "Italy",'phonecode' => 39), - array('id' => 108,'code' => 'JM','name' => "Jamaica",'phonecode' => 1876), - array('id' => 109,'code' => 'JP','name' => "Japan",'phonecode' => 81), - array('id' => 110,'code' => 'XJ','name' => "Jersey",'phonecode' => 44), - array('id' => 111,'code' => 'JO','name' => "Jordan",'phonecode' => 962), - array('id' => 112,'code' => 'KZ','name' => "Kazakhstan",'phonecode' => 7), - array('id' => 113,'code' => 'KE','name' => "Kenya",'phonecode' => 254), - array('id' => 114,'code' => 'KI','name' => "Kiribati",'phonecode' => 686), - array('id' => 115,'code' => 'KP','name' => "Korea North",'phonecode' => 850), - array('id' => 116,'code' => 'KR','name' => "Korea South",'phonecode' => 82), - array('id' => 117,'code' => 'KW','name' => "Kuwait",'phonecode' => 965), - array('id' => 118,'code' => 'KG','name' => "Kyrgyzstan",'phonecode' => 996), - array('id' => 119,'code' => 'LA','name' => "Laos",'phonecode' => 856), - array('id' => 120,'code' => 'LV','name' => "Latvia",'phonecode' => 371), - array('id' => 121,'code' => 'LB','name' => "Lebanon",'phonecode' => 961), - array('id' => 122,'code' => 'LS','name' => "Lesotho",'phonecode' => 266), - array('id' => 123,'code' => 'LR','name' => "Liberia",'phonecode' => 231), - array('id' => 124,'code' => 'LY','name' => "Libya",'phonecode' => 218), - array('id' => 125,'code' => 'LI','name' => "Liechtenstein",'phonecode' => 423), - array('id' => 126,'code' => 'LT','name' => "Lithuania",'phonecode' => 370), - array('id' => 127,'code' => 'LU','name' => "Luxembourg",'phonecode' => 352), - array('id' => 128,'code' => 'MO','name' => "Macau S.A.R.",'phonecode' => 853), - array('id' => 129,'code' => 'MK','name' => "Macedonia",'phonecode' => 389), - array('id' => 130,'code' => 'MG','name' => "Madagascar",'phonecode' => 261), - array('id' => 131,'code' => 'MW','name' => "Malawi",'phonecode' => 265), - array('id' => 132,'code' => 'MY','name' => "Malaysia",'phonecode' => 60), - array('id' => 133,'code' => 'MV','name' => "Maldives",'phonecode' => 960), - array('id' => 134,'code' => 'ML','name' => "Mali",'phonecode' => 223), - array('id' => 135,'code' => 'MT','name' => "Malta",'phonecode' => 356), - array('id' => 136,'code' => 'XM','name' => "Man (Isle of)",'phonecode' => 44), - array('id' => 137,'code' => 'MH','name' => "Marshall Islands",'phonecode' => 692), - array('id' => 138,'code' => 'MQ','name' => "Martinique",'phonecode' => 596), - array('id' => 139,'code' => 'MR','name' => "Mauritania",'phonecode' => 222), - array('id' => 140,'code' => 'MU','name' => "Mauritius",'phonecode' => 230), - array('id' => 141,'code' => 'YT','name' => "Mayotte",'phonecode' => 269), - array('id' => 142,'code' => 'MX','name' => "Mexico",'phonecode' => 52), - array('id' => 143,'code' => 'FM','name' => "Micronesia",'phonecode' => 691), - array('id' => 144,'code' => 'MD','name' => "Moldova",'phonecode' => 373), - array('id' => 145,'code' => 'MC','name' => "Monaco",'phonecode' => 377), - array('id' => 146,'code' => 'MN','name' => "Mongolia",'phonecode' => 976), - array('id' => 147,'code' => 'MS','name' => "Montserrat",'phonecode' => 1664), - array('id' => 148,'code' => 'MA','name' => "Morocco",'phonecode' => 212), - array('id' => 149,'code' => 'MZ','name' => "Mozambique",'phonecode' => 258), - array('id' => 150,'code' => 'MM','name' => "Myanmar",'phonecode' => 95), - array('id' => 151,'code' => 'NA','name' => "Namibia",'phonecode' => 264), - array('id' => 152,'code' => 'NR','name' => "Nauru",'phonecode' => 674), - array('id' => 153,'code' => 'NP','name' => "Nepal",'phonecode' => 977), - array('id' => 154,'code' => 'AN','name' => "Netherlands Antilles",'phonecode' => 599), - array('id' => 155,'code' => 'NL','name' => "Netherlands The",'phonecode' => 31), - array('id' => 156,'code' => 'NC','name' => "New Caledonia",'phonecode' => 687), - array('id' => 157,'code' => 'NZ','name' => "New Zealand",'phonecode' => 64), - array('id' => 158,'code' => 'NI','name' => "Nicaragua",'phonecode' => 505), - array('id' => 159,'code' => 'NE','name' => "Niger",'phonecode' => 227), - array('id' => 160,'code' => 'NG','name' => "Nigeria",'phonecode' => 234), - array('id' => 161,'code' => 'NU','name' => "Niue",'phonecode' => 683), - array('id' => 162,'code' => 'NF','name' => "Norfolk Island",'phonecode' => 672), - array('id' => 163,'code' => 'MP','name' => "Northern Mariana Islands",'phonecode' => 1670), - array('id' => 164,'code' => 'NO','name' => "Norway",'phonecode' => 47), - array('id' => 165,'code' => 'OM','name' => "Oman",'phonecode' => 968), - array('id' => 166,'code' => 'PK','name' => "Pakistan",'phonecode' => 92), - array('id' => 167,'code' => 'PW','name' => "Palau",'phonecode' => 680), - array('id' => 168,'code' => 'PS','name' => "Palestinian Territory Occupied",'phonecode' => 970), - array('id' => 169,'code' => 'PA','name' => "Panama",'phonecode' => 507), - array('id' => 170,'code' => 'PG','name' => "Papua new Guinea",'phonecode' => 675), - array('id' => 171,'code' => 'PY','name' => "Paraguay",'phonecode' => 595), - array('id' => 172,'code' => 'PE','name' => "Peru",'phonecode' => 51), - array('id' => 173,'code' => 'PH','name' => "Philippines",'phonecode' => 63), - array('id' => 174,'code' => 'PN','name' => "Pitcairn Island",'phonecode' => 0), - array('id' => 175,'code' => 'PL','name' => "Poland",'phonecode' => 48), - array('id' => 176,'code' => 'PT','name' => "Portugal",'phonecode' => 351), - array('id' => 177,'code' => 'PR','name' => "Puerto Rico",'phonecode' => 1787), - array('id' => 178,'code' => 'QA','name' => "Qatar",'phonecode' => 974), - array('id' => 179,'code' => 'RE','name' => "Reunion",'phonecode' => 262), - array('id' => 180,'code' => 'RO','name' => "Romania",'phonecode' => 40), - array('id' => 181,'code' => 'RU','name' => "Russia",'phonecode' => 70), - array('id' => 182,'code' => 'RW','name' => "Rwanda",'phonecode' => 250), - array('id' => 183,'code' => 'SH','name' => "Saint Helena",'phonecode' => 290), - array('id' => 184,'code' => 'KN','name' => "Saint Kitts And Nevis",'phonecode' => 1869), - array('id' => 185,'code' => 'LC','name' => "Saint Lucia",'phonecode' => 1758), - array('id' => 186,'code' => 'PM','name' => "Saint Pierre and Miquelon",'phonecode' => 508), - array('id' => 187,'code' => 'VC','name' => "Saint Vincent And The Grenadines",'phonecode' => 1784), - array('id' => 188,'code' => 'WS','name' => "Samoa",'phonecode' => 684), - array('id' => 189,'code' => 'SM','name' => "San Marino",'phonecode' => 378), - array('id' => 190,'code' => 'ST','name' => "Sao Tome and Principe",'phonecode' => 239), - array('id' => 191,'code' => 'SA','name' => "Saudi Arabia",'phonecode' => 966), - array('id' => 192,'code' => 'SN','name' => "Senegal",'phonecode' => 221), - array('id' => 193,'code' => 'RS','name' => "Serbia",'phonecode' => 381), - array('id' => 194,'code' => 'SC','name' => "Seychelles",'phonecode' => 248), - array('id' => 195,'code' => 'SL','name' => "Sierra Leone",'phonecode' => 232), - array('id' => 196,'code' => 'SG','name' => "Singapore",'phonecode' => 65), - array('id' => 197,'code' => 'SK','name' => "Slovakia",'phonecode' => 421), - array('id' => 198,'code' => 'SI','name' => "Slovenia",'phonecode' => 386), - array('id' => 199,'code' => 'XG','name' => "Smaller Territories of the UK",'phonecode' => 44), - array('id' => 200,'code' => 'SB','name' => "Solomon Islands",'phonecode' => 677), - array('id' => 201,'code' => 'SO','name' => "Somalia",'phonecode' => 252), - array('id' => 202,'code' => 'ZA','name' => "South Africa",'phonecode' => 27), - array('id' => 203,'code' => 'GS','name' => "South Georgia",'phonecode' => 0), - array('id' => 204,'code' => 'SS','name' => "South Sudan",'phonecode' => 211), - array('id' => 205,'code' => 'ES','name' => "Spain",'phonecode' => 34), - array('id' => 206,'code' => 'LK','name' => "Sri Lanka",'phonecode' => 94), - array('id' => 207,'code' => 'SD','name' => "Sudan",'phonecode' => 249), - array('id' => 208,'code' => 'SR','name' => "Suriname",'phonecode' => 597), - array('id' => 209,'code' => 'SJ','name' => "Svalbard And Jan Mayen Islands",'phonecode' => 47), - array('id' => 210,'code' => 'SZ','name' => "Swaziland",'phonecode' => 268), - array('id' => 211,'code' => 'SE','name' => "Sweden",'phonecode' => 46), - array('id' => 212,'code' => 'CH','name' => "Switzerland",'phonecode' => 41), - array('id' => 213,'code' => 'SY','name' => "Syria",'phonecode' => 963), - array('id' => 214,'code' => 'TW','name' => "Taiwan",'phonecode' => 886), - array('id' => 215,'code' => 'TJ','name' => "Tajikistan",'phonecode' => 992), - array('id' => 216,'code' => 'TZ','name' => "Tanzania",'phonecode' => 255), - array('id' => 217,'code' => 'TH','name' => "Thailand",'phonecode' => 66), - array('id' => 218,'code' => 'TG','name' => "Togo",'phonecode' => 228), - array('id' => 219,'code' => 'TK','name' => "Tokelau",'phonecode' => 690), - array('id' => 220,'code' => 'TO','name' => "Tonga",'phonecode' => 676), - array('id' => 221,'code' => 'TT','name' => "Trinidad And Tobago",'phonecode' => 1868), - array('id' => 222,'code' => 'TN','name' => "Tunisia",'phonecode' => 216), - array('id' => 223,'code' => 'TR','name' => "Turkey",'phonecode' => 90), - array('id' => 224,'code' => 'TM','name' => "Turkmenistan",'phonecode' => 7370), - array('id' => 225,'code' => 'TC','name' => "Turks And Caicos Islands",'phonecode' => 1649), - array('id' => 226,'code' => 'TV','name' => "Tuvalu",'phonecode' => 688), - array('id' => 227,'code' => 'UG','name' => "Uganda",'phonecode' => 256), - array('id' => 228,'code' => 'UA','name' => "Ukraine",'phonecode' => 380), - array('id' => 229,'code' => 'AE','name' => "United Arab Emirates",'phonecode' => 971), - array('id' => 230,'code' => 'GB','name' => "United Kingdom",'phonecode' => 44), - array('id' => 231,'code' => 'US','name' => "United States",'phonecode' => 1), - array('id' => 232,'code' => 'UM','name' => "United States Minor Outlying Islands",'phonecode' => 1), - array('id' => 233,'code' => 'UY','name' => "Uruguay",'phonecode' => 598), - array('id' => 234,'code' => 'UZ','name' => "Uzbekistan",'phonecode' => 998), - array('id' => 235,'code' => 'VU','name' => "Vanuatu",'phonecode' => 678), - array('id' => 236,'code' => 'VA','name' => "Vatican City State (Holy See)",'phonecode' => 39), - array('id' => 237,'code' => 'VE','name' => "Venezuela",'phonecode' => 58), - array('id' => 238,'code' => 'VN','name' => "Vietnam",'phonecode' => 84), - array('id' => 239,'code' => 'VG','name' => "Virgin Islands (British)",'phonecode' => 1284), - array('id' => 240,'code' => 'VI','name' => "Virgin Islands (US)",'phonecode' => 1340), - array('id' => 241,'code' => 'WF','name' => "Wallis And Futuna Islands",'phonecode' => 681), - array('id' => 242,'code' => 'EH','name' => "Western Sahara",'phonecode' => 212), - array('id' => 243,'code' => 'YE','name' => "Yemen",'phonecode' => 967), - array('id' => 244,'code' => 'YU','name' => "Yugoslavia",'phonecode' => 38), - array('id' => 245,'code' => 'ZM','name' => "Zambia",'phonecode' => 260), - array('id' => 246,'code' => 'ZW','name' => "Zimbabwe",'phonecode' => 263), - ); - DB::table('countries')->insert($countries); - } + /** + * Run the database seeds. + * + * @return void + */ + public function run() + { + DB::table('countries')->delete(); + $countries = [ + ['id' => 1,'code' => 'AF' ,'name' => "Afghanistan",'phonecode' => 93], + ['id' => 2,'code' => 'AL' ,'name' => "Albania",'phonecode' => 355], + ['id' => 3,'code' => 'DZ' ,'name' => "Algeria",'phonecode' => 213], + ['id' => 4,'code' => 'AS' ,'name' => "American Samoa",'phonecode' => 1684], + ['id' => 5,'code' => 'AD' ,'name' => "Andorra",'phonecode' => 376], + ['id' => 6,'code' => 'AO' ,'name' => "Angola",'phonecode' => 244], + ['id' => 7,'code' => 'AI' ,'name' => "Anguilla",'phonecode' => 1264], + ['id' => 8,'code' => 'AQ' ,'name' => "Antarctica",'phonecode' => 0], + ['id' => 9,'code' => 'AG' ,'name' => "Antigua And Barbuda",'phonecode' => 1268], + ['id' => 10,'code' => 'AR','name' => "Argentina",'phonecode' => 54], + ['id' => 11,'code' => 'AM','name' => "Armenia",'phonecode' => 374], + ['id' => 12,'code' => 'AW','name' => "Aruba",'phonecode' => 297], + ['id' => 13,'code' => 'AU','name' => "Australia",'phonecode' => 61], + ['id' => 14,'code' => 'AT','name' => "Austria",'phonecode' => 43], + ['id' => 15,'code' => 'AZ','name' => "Azerbaijan",'phonecode' => 994], + ['id' => 16,'code' => 'BS','name' => "Bahamas The",'phonecode' => 1242], + ['id' => 17,'code' => 'BH','name' => "Bahrain",'phonecode' => 973], + ['id' => 18,'code' => 'BD','name' => "Bangladesh",'phonecode' => 880], + ['id' => 19,'code' => 'BB','name' => "Barbados",'phonecode' => 1246], + ['id' => 20,'code' => 'BY','name' => "Belarus",'phonecode' => 375], + ['id' => 21,'code' => 'BE','name' => "Belgium",'phonecode' => 32], + ['id' => 22,'code' => 'BZ','name' => "Belize",'phonecode' => 501], + ['id' => 23,'code' => 'BJ','name' => "Benin",'phonecode' => 229], + ['id' => 24,'code' => 'BM','name' => "Bermuda",'phonecode' => 1441], + ['id' => 25,'code' => 'BT','name' => "Bhutan",'phonecode' => 975], + ['id' => 26,'code' => 'BO','name' => "Bolivia",'phonecode' => 591], + ['id' => 27,'code' => 'BA','name' => "Bosnia and Herzegovina",'phonecode' => 387], + ['id' => 28,'code' => 'BW','name' => "Botswana",'phonecode' => 267], + ['id' => 29,'code' => 'BV','name' => "Bouvet Island",'phonecode' => 0], + ['id' => 30,'code' => 'BR','name' => "Brazil",'phonecode' => 55], + ['id' => 31,'code' => 'IO','name' => "British Indian Ocean Territory",'phonecode' => 246], + ['id' => 32,'code' => 'BN','name' => "Brunei",'phonecode' => 673], + ['id' => 33,'code' => 'BG','name' => "Bulgaria",'phonecode' => 359], + ['id' => 34,'code' => 'BF','name' => "Burkina Faso",'phonecode' => 226], + ['id' => 35,'code' => 'BI','name' => "Burundi",'phonecode' => 257], + ['id' => 36,'code' => 'KH','name' => "Cambodia",'phonecode' => 855], + ['id' => 37,'code' => 'CM','name' => "Cameroon",'phonecode' => 237], + ['id' => 38,'code' => 'CA','name' => "Canada",'phonecode' => 1], + ['id' => 39,'code' => 'CV','name' => "Cape Verde",'phonecode' => 238], + ['id' => 40,'code' => 'KY','name' => "Cayman Islands",'phonecode' => 1345], + ['id' => 41,'code' => 'CF','name' => "Central African Republic",'phonecode' => 236], + ['id' => 42,'code' => 'TD','name' => "Chad",'phonecode' => 235], + ['id' => 43,'code' => 'CL','name' => "Chile",'phonecode' => 56], + ['id' => 44,'code' => 'CN','name' => "China",'phonecode' => 86], + ['id' => 45,'code' => 'CX','name' => "Christmas Island",'phonecode' => 61], + ['id' => 46,'code' => 'CC','name' => "Cocos (Keeling) Islands",'phonecode' => 672], + ['id' => 47,'code' => 'CO','name' => "Colombia",'phonecode' => 57], + ['id' => 48,'code' => 'KM','name' => "Comoros",'phonecode' => 269], + ['id' => 49,'code' => 'CG','name' => "Congo",'phonecode' => 242], + ['id' => 50,'code' => 'CD','name' => "Congo The Democratic Republic Of The",'phonecode' => 242], + ['id' => 51,'code' => 'CK','name' => "Cook Islands",'phonecode' => 682], + ['id' => 52,'code' => 'CR','name' => "Costa Rica",'phonecode' => 506], + ['id' => 53,'code' => 'CI','name' => "Cote D Ivoire (Ivory Coast)",'phonecode' => 225], + ['id' => 54,'code' => 'HR','name' => "Croatia (Hrvatska)",'phonecode' => 385], + ['id' => 55,'code' => 'CU','name' => "Cuba",'phonecode' => 53], + ['id' => 56,'code' => 'CY','name' => "Cyprus",'phonecode' => 357], + ['id' => 57,'code' => 'CZ','name' => "Czech Republic",'phonecode' => 420], + ['id' => 58,'code' => 'DK','name' => "Denmark",'phonecode' => 45], + ['id' => 59,'code' => 'DJ','name' => "Djibouti",'phonecode' => 253], + ['id' => 60,'code' => 'DM','name' => "Dominica",'phonecode' => 1767], + ['id' => 61,'code' => 'DO','name' => "Dominican Republic",'phonecode' => 1809], + ['id' => 62,'code' => 'TP','name' => "East Timor",'phonecode' => 670], + ['id' => 63,'code' => 'EC','name' => "Ecuador",'phonecode' => 593], + ['id' => 64,'code' => 'EG','name' => "Egypt",'phonecode' => 20], + ['id' => 65,'code' => 'SV','name' => "El Salvador",'phonecode' => 503], + ['id' => 66,'code' => 'GQ','name' => "Equatorial Guinea",'phonecode' => 240], + ['id' => 67,'code' => 'ER','name' => "Eritrea",'phonecode' => 291], + ['id' => 68,'code' => 'EE','name' => "Estonia",'phonecode' => 372], + ['id' => 69,'code' => 'ET','name' => "Ethiopia",'phonecode' => 251], + ['id' => 70,'code' => 'XA','name' => "External Territories of Australia",'phonecode' => 61], + ['id' => 71,'code' => 'FK','name' => "Falkland Islands",'phonecode' => 500], + ['id' => 72,'code' => 'FO','name' => "Faroe Islands",'phonecode' => 298], + ['id' => 73,'code' => 'FJ','name' => "Fiji Islands",'phonecode' => 679], + ['id' => 74,'code' => 'FI','name' => "Finland",'phonecode' => 358], + ['id' => 75,'code' => 'FR','name' => "France",'phonecode' => 33], + ['id' => 76,'code' => 'GF','name' => "French Guiana",'phonecode' => 594], + ['id' => 77,'code' => 'PF','name' => "French Polynesia",'phonecode' => 689], + ['id' => 78,'code' => 'TF','name' => "French Southern Territories",'phonecode' => 0], + ['id' => 79,'code' => 'GA','name' => "Gabon",'phonecode' => 241], + ['id' => 80,'code' => 'GM','name' => "Gambia The",'phonecode' => 220], + ['id' => 81,'code' => 'GE','name' => "Georgia",'phonecode' => 995], + ['id' => 82,'code' => 'DE','name' => "Germany",'phonecode' => 49], + ['id' => 83,'code' => 'GH','name' => "Ghana",'phonecode' => 233], + ['id' => 84,'code' => 'GI','name' => "Gibraltar",'phonecode' => 350], + ['id' => 85,'code' => 'GR','name' => "Greece",'phonecode' => 30], + ['id' => 86,'code' => 'GL','name' => "Greenland",'phonecode' => 299], + ['id' => 87,'code' => 'GD','name' => "Grenada",'phonecode' => 1473], + ['id' => 88,'code' => 'GP','name' => "Guadeloupe",'phonecode' => 590], + ['id' => 89,'code' => 'GU','name' => "Guam",'phonecode' => 1671], + ['id' => 90,'code' => 'GT','name' => "Guatemala",'phonecode' => 502], + ['id' => 91,'code' => 'XU','name' => "Guernsey and Alderney",'phonecode' => 44], + ['id' => 92,'code' => 'GN','name' => "Guinea",'phonecode' => 224], + ['id' => 93,'code' => 'GW','name' => "Guinea-Bissau",'phonecode' => 245], + ['id' => 94,'code' => 'GY','name' => "Guyana",'phonecode' => 592], + ['id' => 95,'code' => 'HT','name' => "Haiti",'phonecode' => 509], + ['id' => 96,'code' => 'HM','name' => "Heard and McDonald Islands",'phonecode' => 0], + ['id' => 97,'code' => 'HN','name' => "Honduras",'phonecode' => 504], + ['id' => 98,'code' => 'HK','name' => "Hong Kong S.A.R.",'phonecode' => 852], + ['id' => 99,'code' => 'HU','name' => "Hungary",'phonecode' => 36], + ['id' => 100,'code' => 'IS','name' => "Iceland",'phonecode' => 354], + ['id' => 101,'code' => 'IN','name' => "India",'phonecode' => 91], + ['id' => 102,'code' => 'ID','name' => "Indonesia",'phonecode' => 62], + ['id' => 103,'code' => 'IR','name' => "Iran",'phonecode' => 98], + ['id' => 104,'code' => 'IQ','name' => "Iraq",'phonecode' => 964], + ['id' => 105,'code' => 'IE','name' => "Ireland",'phonecode' => 353], + ['id' => 106,'code' => 'IL','name' => "Israel",'phonecode' => 972], + ['id' => 107,'code' => 'IT','name' => "Italy",'phonecode' => 39], + ['id' => 108,'code' => 'JM','name' => "Jamaica",'phonecode' => 1876], + ['id' => 109,'code' => 'JP','name' => "Japan",'phonecode' => 81], + ['id' => 110,'code' => 'XJ','name' => "Jersey",'phonecode' => 44], + ['id' => 111,'code' => 'JO','name' => "Jordan",'phonecode' => 962], + ['id' => 112,'code' => 'KZ','name' => "Kazakhstan",'phonecode' => 7], + ['id' => 113,'code' => 'KE','name' => "Kenya",'phonecode' => 254], + ['id' => 114,'code' => 'KI','name' => "Kiribati",'phonecode' => 686], + ['id' => 115,'code' => 'KP','name' => "Korea North",'phonecode' => 850], + ['id' => 116,'code' => 'KR','name' => "Korea South",'phonecode' => 82], + ['id' => 117,'code' => 'KW','name' => "Kuwait",'phonecode' => 965], + ['id' => 118,'code' => 'KG','name' => "Kyrgyzstan",'phonecode' => 996], + ['id' => 119,'code' => 'LA','name' => "Laos",'phonecode' => 856], + ['id' => 120,'code' => 'LV','name' => "Latvia",'phonecode' => 371], + ['id' => 121,'code' => 'LB','name' => "Lebanon",'phonecode' => 961], + ['id' => 122,'code' => 'LS','name' => "Lesotho",'phonecode' => 266], + ['id' => 123,'code' => 'LR','name' => "Liberia",'phonecode' => 231], + ['id' => 124,'code' => 'LY','name' => "Libya",'phonecode' => 218], + ['id' => 125,'code' => 'LI','name' => "Liechtenstein",'phonecode' => 423], + ['id' => 126,'code' => 'LT','name' => "Lithuania",'phonecode' => 370], + ['id' => 127,'code' => 'LU','name' => "Luxembourg",'phonecode' => 352], + ['id' => 128,'code' => 'MO','name' => "Macau S.A.R.",'phonecode' => 853], + ['id' => 129,'code' => 'MK','name' => "Macedonia",'phonecode' => 389], + ['id' => 130,'code' => 'MG','name' => "Madagascar",'phonecode' => 261], + ['id' => 131,'code' => 'MW','name' => "Malawi",'phonecode' => 265], + ['id' => 132,'code' => 'MY','name' => "Malaysia",'phonecode' => 60], + ['id' => 133,'code' => 'MV','name' => "Maldives",'phonecode' => 960], + ['id' => 134,'code' => 'ML','name' => "Mali",'phonecode' => 223], + ['id' => 135,'code' => 'MT','name' => "Malta",'phonecode' => 356], + ['id' => 136,'code' => 'XM','name' => "Man (Isle of)",'phonecode' => 44], + ['id' => 137,'code' => 'MH','name' => "Marshall Islands",'phonecode' => 692], + ['id' => 138,'code' => 'MQ','name' => "Martinique",'phonecode' => 596], + ['id' => 139,'code' => 'MR','name' => "Mauritania",'phonecode' => 222], + ['id' => 140,'code' => 'MU','name' => "Mauritius",'phonecode' => 230], + ['id' => 141,'code' => 'YT','name' => "Mayotte",'phonecode' => 269], + ['id' => 142,'code' => 'MX','name' => "Mexico",'phonecode' => 52], + ['id' => 143,'code' => 'FM','name' => "Micronesia",'phonecode' => 691], + ['id' => 144,'code' => 'MD','name' => "Moldova",'phonecode' => 373], + ['id' => 145,'code' => 'MC','name' => "Monaco",'phonecode' => 377], + ['id' => 146,'code' => 'MN','name' => "Mongolia",'phonecode' => 976], + ['id' => 147,'code' => 'MS','name' => "Montserrat",'phonecode' => 1664], + ['id' => 148,'code' => 'MA','name' => "Morocco",'phonecode' => 212], + ['id' => 149,'code' => 'MZ','name' => "Mozambique",'phonecode' => 258], + ['id' => 150,'code' => 'MM','name' => "Myanmar",'phonecode' => 95], + ['id' => 151,'code' => 'NA','name' => "Namibia",'phonecode' => 264], + ['id' => 152,'code' => 'NR','name' => "Nauru",'phonecode' => 674], + ['id' => 153,'code' => 'NP','name' => "Nepal",'phonecode' => 977], + ['id' => 154,'code' => 'AN','name' => "Netherlands Antilles",'phonecode' => 599], + ['id' => 155,'code' => 'NL','name' => "Netherlands The",'phonecode' => 31], + ['id' => 156,'code' => 'NC','name' => "New Caledonia",'phonecode' => 687], + ['id' => 157,'code' => 'NZ','name' => "New Zealand",'phonecode' => 64], + ['id' => 158,'code' => 'NI','name' => "Nicaragua",'phonecode' => 505], + ['id' => 159,'code' => 'NE','name' => "Niger",'phonecode' => 227], + ['id' => 160,'code' => 'NG','name' => "Nigeria",'phonecode' => 234], + ['id' => 161,'code' => 'NU','name' => "Niue",'phonecode' => 683], + ['id' => 162,'code' => 'NF','name' => "Norfolk Island",'phonecode' => 672], + ['id' => 163,'code' => 'MP','name' => "Northern Mariana Islands",'phonecode' => 1670], + ['id' => 164,'code' => 'NO','name' => "Norway",'phonecode' => 47], + ['id' => 165,'code' => 'OM','name' => "Oman",'phonecode' => 968], + ['id' => 166,'code' => 'PK','name' => "Pakistan",'phonecode' => 92], + ['id' => 167,'code' => 'PW','name' => "Palau",'phonecode' => 680], + ['id' => 168,'code' => 'PS','name' => "Palestinian Territory Occupied",'phonecode' => 970], + ['id' => 169,'code' => 'PA','name' => "Panama",'phonecode' => 507], + ['id' => 170,'code' => 'PG','name' => "Papua new Guinea",'phonecode' => 675], + ['id' => 171,'code' => 'PY','name' => "Paraguay",'phonecode' => 595], + ['id' => 172,'code' => 'PE','name' => "Peru",'phonecode' => 51], + ['id' => 173,'code' => 'PH','name' => "Philippines",'phonecode' => 63], + ['id' => 174,'code' => 'PN','name' => "Pitcairn Island",'phonecode' => 0], + ['id' => 175,'code' => 'PL','name' => "Poland",'phonecode' => 48], + ['id' => 176,'code' => 'PT','name' => "Portugal",'phonecode' => 351], + ['id' => 177,'code' => 'PR','name' => "Puerto Rico",'phonecode' => 1787], + ['id' => 178,'code' => 'QA','name' => "Qatar",'phonecode' => 974], + ['id' => 179,'code' => 'RE','name' => "Reunion",'phonecode' => 262], + ['id' => 180,'code' => 'RO','name' => "Romania",'phonecode' => 40], + ['id' => 181,'code' => 'RU','name' => "Russia",'phonecode' => 70], + ['id' => 182,'code' => 'RW','name' => "Rwanda",'phonecode' => 250], + ['id' => 183,'code' => 'SH','name' => "Saint Helena",'phonecode' => 290], + ['id' => 184,'code' => 'KN','name' => "Saint Kitts And Nevis",'phonecode' => 1869], + ['id' => 185,'code' => 'LC','name' => "Saint Lucia",'phonecode' => 1758], + ['id' => 186,'code' => 'PM','name' => "Saint Pierre and Miquelon",'phonecode' => 508], + ['id' => 187,'code' => 'VC','name' => "Saint Vincent And The Grenadines",'phonecode' => 1784], + ['id' => 188,'code' => 'WS','name' => "Samoa",'phonecode' => 684], + ['id' => 189,'code' => 'SM','name' => "San Marino",'phonecode' => 378], + ['id' => 190,'code' => 'ST','name' => "Sao Tome and Principe",'phonecode' => 239], + ['id' => 191,'code' => 'SA','name' => "Saudi Arabia",'phonecode' => 966], + ['id' => 192,'code' => 'SN','name' => "Senegal",'phonecode' => 221], + ['id' => 193,'code' => 'RS','name' => "Serbia",'phonecode' => 381], + ['id' => 194,'code' => 'SC','name' => "Seychelles",'phonecode' => 248], + ['id' => 195,'code' => 'SL','name' => "Sierra Leone",'phonecode' => 232], + ['id' => 196,'code' => 'SG','name' => "Singapore",'phonecode' => 65], + ['id' => 197,'code' => 'SK','name' => "Slovakia",'phonecode' => 421], + ['id' => 198,'code' => 'SI','name' => "Slovenia",'phonecode' => 386], + ['id' => 199,'code' => 'XG','name' => "Smaller Territories of the UK",'phonecode' => 44], + ['id' => 200,'code' => 'SB','name' => "Solomon Islands",'phonecode' => 677], + ['id' => 201,'code' => 'SO','name' => "Somalia",'phonecode' => 252], + ['id' => 202,'code' => 'ZA','name' => "South Africa",'phonecode' => 27], + ['id' => 203,'code' => 'GS','name' => "South Georgia",'phonecode' => 0], + ['id' => 204,'code' => 'SS','name' => "South Sudan",'phonecode' => 211], + ['id' => 205,'code' => 'ES','name' => "Spain",'phonecode' => 34], + ['id' => 206,'code' => 'LK','name' => "Sri Lanka",'phonecode' => 94], + ['id' => 207,'code' => 'SD','name' => "Sudan",'phonecode' => 249], + ['id' => 208,'code' => 'SR','name' => "Suriname",'phonecode' => 597], + ['id' => 209,'code' => 'SJ','name' => "Svalbard And Jan Mayen Islands",'phonecode' => 47], + ['id' => 210,'code' => 'SZ','name' => "Swaziland",'phonecode' => 268], + ['id' => 211,'code' => 'SE','name' => "Sweden",'phonecode' => 46], + ['id' => 212,'code' => 'CH','name' => "Switzerland",'phonecode' => 41], + ['id' => 213,'code' => 'SY','name' => "Syria",'phonecode' => 963], + ['id' => 214,'code' => 'TW','name' => "Taiwan",'phonecode' => 886], + ['id' => 215,'code' => 'TJ','name' => "Tajikistan",'phonecode' => 992], + ['id' => 216,'code' => 'TZ','name' => "Tanzania",'phonecode' => 255], + ['id' => 217,'code' => 'TH','name' => "Thailand",'phonecode' => 66], + ['id' => 218,'code' => 'TG','name' => "Togo",'phonecode' => 228], + ['id' => 219,'code' => 'TK','name' => "Tokelau",'phonecode' => 690], + ['id' => 220,'code' => 'TO','name' => "Tonga",'phonecode' => 676], + ['id' => 221,'code' => 'TT','name' => "Trinidad And Tobago",'phonecode' => 1868], + ['id' => 222,'code' => 'TN','name' => "Tunisia",'phonecode' => 216], + ['id' => 223,'code' => 'TR','name' => "Turkey",'phonecode' => 90], + ['id' => 224,'code' => 'TM','name' => "Turkmenistan",'phonecode' => 7370], + ['id' => 225,'code' => 'TC','name' => "Turks And Caicos Islands",'phonecode' => 1649], + ['id' => 226,'code' => 'TV','name' => "Tuvalu",'phonecode' => 688], + ['id' => 227,'code' => 'UG','name' => "Uganda",'phonecode' => 256], + ['id' => 228,'code' => 'UA','name' => "Ukraine",'phonecode' => 380], + ['id' => 229,'code' => 'AE','name' => "United Arab Emirates",'phonecode' => 971], + ['id' => 230,'code' => 'GB','name' => "United Kingdom",'phonecode' => 44], + ['id' => 231,'code' => 'US','name' => "United States",'phonecode' => 1], + ['id' => 232,'code' => 'UM','name' => "United States Minor Outlying Islands",'phonecode' => 1], + ['id' => 233,'code' => 'UY','name' => "Uruguay",'phonecode' => 598], + ['id' => 234,'code' => 'UZ','name' => "Uzbekistan",'phonecode' => 998], + ['id' => 235,'code' => 'VU','name' => "Vanuatu",'phonecode' => 678], + ['id' => 236,'code' => 'VA','name' => "Vatican City State (Holy See)",'phonecode' => 39], + ['id' => 237,'code' => 'VE','name' => "Venezuela",'phonecode' => 58], + ['id' => 238,'code' => 'VN','name' => "Vietnam",'phonecode' => 84], + ['id' => 239,'code' => 'VG','name' => "Virgin Islands (British)",'phonecode' => 1284], + ['id' => 240,'code' => 'VI','name' => "Virgin Islands (US)",'phonecode' => 1340], + ['id' => 241,'code' => 'WF','name' => "Wallis And Futuna Islands",'phonecode' => 681], + ['id' => 242,'code' => 'EH','name' => "Western Sahara",'phonecode' => 212], + ['id' => 243,'code' => 'YE','name' => "Yemen",'phonecode' => 967], + ['id' => 244,'code' => 'YU','name' => "Yugoslavia",'phonecode' => 38], + ['id' => 245,'code' => 'ZM','name' => "Zambia",'phonecode' => 260], + ['id' => 246,'code' => 'ZW','name' => "Zimbabwe",'phonecode' => 263], + ]; + DB::table('countries')->insert($countries); + } } diff --git a/database/seeders/CurrenciesTableSeeder.php b/database/seeders/CurrenciesTableSeeder.php index 8bb9a826..ec744c4e 100644 --- a/database/seeders/CurrenciesTableSeeder.php +++ b/database/seeders/CurrenciesTableSeeder.php @@ -2,8 +2,8 @@ namespace Database\Seeders; -use Illuminate\Database\Seeder; use Crater\Models\Currency; +use Illuminate\Database\Seeder; class CurrenciesTableSeeder extends Seeder { @@ -21,7 +21,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '$', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'British Pound', @@ -29,7 +29,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '£', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Euro', @@ -38,7 +38,7 @@ class CurrenciesTableSeeder extends Seeder 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ',', - 'swap_currency_symbol' => true + 'swap_currency_symbol' => true, ], [ 'name' => 'South African Rand', @@ -46,7 +46,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'R', 'precision' => '2', 'thousand_separator' => '.', - 'decimal_separator' => ',' + 'decimal_separator' => ',', ], [ 'name' => 'Danish Krone', @@ -55,7 +55,7 @@ class CurrenciesTableSeeder extends Seeder 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ',', - 'swap_currency_symbol' => true + 'swap_currency_symbol' => true, ], [ 'name' => 'Israeli Shekel', @@ -63,7 +63,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'NIS ', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Swedish Krona', @@ -72,7 +72,7 @@ class CurrenciesTableSeeder extends Seeder 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ',', - 'swap_currency_symbol' => true + 'swap_currency_symbol' => true, ], [ 'name' => 'Kenyan Shilling', @@ -80,7 +80,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'KSh ', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Kuwaiti Dinar', @@ -88,7 +88,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'KWD ', 'precision' => '3', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Canadian Dollar', @@ -96,7 +96,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'C$', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Philippine Peso', @@ -104,7 +104,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'P ', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Indian Rupee', @@ -112,7 +112,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '₹', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Australian Dollar', @@ -120,7 +120,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '$', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Singapore Dollar', @@ -128,7 +128,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'S$', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Norske Kroner', @@ -137,7 +137,7 @@ class CurrenciesTableSeeder extends Seeder 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ',', - 'swap_currency_symbol' => true + 'swap_currency_symbol' => true, ], [ 'name' => 'New Zealand Dollar', @@ -145,7 +145,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '$', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Vietnamese Dong', @@ -153,7 +153,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '₫', 'precision' => '0', 'thousand_separator' => '.', - 'decimal_separator' => ',' + 'decimal_separator' => ',', ], [ 'name' => 'Swiss Franc', @@ -161,7 +161,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'Fr.', 'precision' => '2', 'thousand_separator' => '\'', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Guatemalan Quetzal', @@ -169,7 +169,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'Q', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Malaysian Ringgit', @@ -177,7 +177,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'RM', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Brazilian Real', @@ -185,7 +185,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'R$', 'precision' => '2', 'thousand_separator' => '.', - 'decimal_separator' => ',' + 'decimal_separator' => ',', ], [ 'name' => 'Thai Baht', @@ -193,7 +193,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '฿', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Nigerian Naira', @@ -201,7 +201,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '₦', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Argentine Peso', @@ -209,7 +209,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '$', 'precision' => '2', 'thousand_separator' => '.', - 'decimal_separator' => ',' + 'decimal_separator' => ',', ], [ 'name' => 'Bangladeshi Taka', @@ -217,7 +217,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'Tk', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'United Arab Emirates Dirham', @@ -225,7 +225,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'DH ', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Hong Kong Dollar', @@ -233,7 +233,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'HK$', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Indonesian Rupiah', @@ -241,7 +241,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'Rp', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Mexican Peso', @@ -249,7 +249,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '$', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Egyptian Pound', @@ -257,7 +257,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'E£', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Colombian Peso', @@ -265,7 +265,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '$', 'precision' => '2', 'thousand_separator' => '.', - 'decimal_separator' => ',' + 'decimal_separator' => ',', ], [ 'name' => 'West African Franc', @@ -273,7 +273,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'CFA ', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Chinese Renminbi', @@ -281,7 +281,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'RMB ', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Rwandan Franc', @@ -289,7 +289,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'RF ', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Tanzanian Shilling', @@ -297,7 +297,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'TSh ', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Netherlands Antillean Guilder', @@ -305,7 +305,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'NAƒ', 'precision' => '2', 'thousand_separator' => '.', - 'decimal_separator' => ',' + 'decimal_separator' => ',', ], [ 'name' => 'Trinidad and Tobago Dollar', @@ -313,7 +313,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'TT$', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'East Caribbean Dollar', @@ -321,7 +321,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'EC$', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Ghanaian Cedi', @@ -329,7 +329,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '‎GH₵', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Bulgarian Lev', @@ -337,7 +337,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'Лв.', 'precision' => '2', 'thousand_separator' => ' ', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Aruban Florin', @@ -345,7 +345,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'Afl. ', 'precision' => '2', 'thousand_separator' => ' ', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Turkish Lira', @@ -353,7 +353,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'TL ', 'precision' => '2', 'thousand_separator' => '.', - 'decimal_separator' => ',' + 'decimal_separator' => ',', ], [ 'name' => 'Romanian New Leu', @@ -361,7 +361,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'RON', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Croatian Kuna', @@ -369,7 +369,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'kn', 'precision' => '2', 'thousand_separator' => '.', - 'decimal_separator' => ',' + 'decimal_separator' => ',', ], [ 'name' => 'Saudi Riyal', @@ -377,7 +377,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '‎SِAR', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Japanese Yen', @@ -385,7 +385,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '¥', 'precision' => '0', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Maldivian Rufiyaa', @@ -393,7 +393,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'Rf', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Costa Rican Colón', @@ -401,7 +401,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '₡', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Pakistani Rupee', @@ -409,7 +409,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'Rs ', 'precision' => '0', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Polish Zloty', @@ -418,7 +418,7 @@ class CurrenciesTableSeeder extends Seeder 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => ',', - 'swap_currency_symbol' => true + 'swap_currency_symbol' => true, ], [ 'name' => 'Sri Lankan Rupee', @@ -427,7 +427,7 @@ class CurrenciesTableSeeder extends Seeder 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.', - 'swap_currency_symbol' => true + 'swap_currency_symbol' => true, ], [ 'name' => 'Czech Koruna', @@ -436,7 +436,7 @@ class CurrenciesTableSeeder extends Seeder 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => ',', - 'swap_currency_symbol' => true + 'swap_currency_symbol' => true, ], [ 'name' => 'Uruguayan Peso', @@ -444,7 +444,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '$', 'precision' => '2', 'thousand_separator' => '.', - 'decimal_separator' => ',' + 'decimal_separator' => ',', ], [ 'name' => 'Namibian Dollar', @@ -452,7 +452,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '$', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Tunisian Dinar', @@ -460,7 +460,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '‎د.ت', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Russian Ruble', @@ -468,7 +468,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '₽', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Mozambican Metical', @@ -477,7 +477,7 @@ class CurrenciesTableSeeder extends Seeder 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ',', - 'swap_currency_symbol' => true + 'swap_currency_symbol' => true, ], [ 'name' => 'Omani Rial', @@ -485,7 +485,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'ر.ع.', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Ukrainian Hryvnia', @@ -493,7 +493,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '₴', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Macanese Pataca', @@ -501,7 +501,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'MOP$', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Taiwan New Dollar', @@ -509,7 +509,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'NT$', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Dominican Peso', @@ -517,7 +517,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'RD$', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Chilean Peso', @@ -525,7 +525,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => '$', 'precision' => '2', 'thousand_separator' => '.', - 'decimal_separator' => ',' + 'decimal_separator' => ',', ], [ 'name' => 'Serbian Dinar', @@ -533,7 +533,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'RSD', 'precision' => '2', 'thousand_separator' => '.', - 'decimal_separator' => ',' + 'decimal_separator' => ',', ], [ 'name' => 'Kyrgyzstani som', @@ -541,7 +541,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'С̲ ', 'precision' => '2', 'thousand_separator' => '.', - 'decimal_separator' => ',' + 'decimal_separator' => ',', ], [ 'name' => 'Iraqi Dinar', @@ -549,7 +549,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'ع.د', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Peruvian Soles', @@ -557,7 +557,7 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'S/', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], [ 'name' => 'Moroccan Dirham', @@ -565,13 +565,12 @@ class CurrenciesTableSeeder extends Seeder 'symbol' => 'DH', 'precision' => '2', 'thousand_separator' => ',', - 'decimal_separator' => '.' + 'decimal_separator' => '.', ], ]; foreach ($currencies as $currency) { Currency::create($currency); } - } } diff --git a/database/seeders/DefaultSettingsSeeder.php b/database/seeders/DefaultSettingsSeeder.php index c3f6063f..83a23478 100644 --- a/database/seeders/DefaultSettingsSeeder.php +++ b/database/seeders/DefaultSettingsSeeder.php @@ -3,7 +3,6 @@ namespace Database\Seeders; use Crater\Models\CompanySetting; -use Crater\Models\Setting; use Crater\Models\User; use Illuminate\Database\Seeder; diff --git a/database/seeders/DemoSeeder.php b/database/seeders/DemoSeeder.php index 1c83a468..0647ff49 100644 --- a/database/seeders/DemoSeeder.php +++ b/database/seeders/DemoSeeder.php @@ -3,9 +3,9 @@ namespace Database\Seeders; use Crater\Models\Address; -use Illuminate\Database\Seeder; -use Crater\Models\User; use Crater\Models\Setting; +use Crater\Models\User; +use Illuminate\Database\Seeder; class DemoSeeder extends Seeder { diff --git a/database/seeders/EstimateTemplateSeeder.php b/database/seeders/EstimateTemplateSeeder.php index 1490c0ba..a004b208 100644 --- a/database/seeders/EstimateTemplateSeeder.php +++ b/database/seeders/EstimateTemplateSeeder.php @@ -2,8 +2,8 @@ namespace Database\Seeders; -use Illuminate\Database\Seeder; use Crater\Models\EstimateTemplate; +use Illuminate\Database\Seeder; class EstimateTemplateSeeder extends Seeder { @@ -17,19 +17,19 @@ class EstimateTemplateSeeder extends Seeder EstimateTemplate::create([ 'name' => 'Template 1', 'view' => 'estimate1', - 'path' => '/assets/img/PDF/Template1.png' + 'path' => '/assets/img/PDF/Template1.png', ]); EstimateTemplate::create([ 'name' => 'Template 2', 'view' => 'estimate2', - 'path' => '/assets/img/PDF/Template2.png' + 'path' => '/assets/img/PDF/Template2.png', ]); EstimateTemplate::create([ 'name' => 'Template 3', 'view' => 'estimate3', - 'path' => '/assets/img/PDF/Template3.png' + 'path' => '/assets/img/PDF/Template3.png', ]); } } diff --git a/database/seeders/InvoiceTemplateSeeder.php b/database/seeders/InvoiceTemplateSeeder.php index 85a53f09..2fea992c 100644 --- a/database/seeders/InvoiceTemplateSeeder.php +++ b/database/seeders/InvoiceTemplateSeeder.php @@ -2,8 +2,8 @@ namespace Database\Seeders; -use Illuminate\Database\Seeder; use Crater\Models\InvoiceTemplate; +use Illuminate\Database\Seeder; class InvoiceTemplateSeeder extends Seeder { @@ -17,19 +17,19 @@ class InvoiceTemplateSeeder extends Seeder InvoiceTemplate::create([ 'name' => 'Template 1', 'view' => 'invoice1', - 'path' => '/assets/img/PDF/Template1.png' + 'path' => '/assets/img/PDF/Template1.png', ]); InvoiceTemplate::create([ 'name' => ' Template 2', 'view' => 'invoice2', - 'path' => '/assets/img/PDF/Template2.png' + 'path' => '/assets/img/PDF/Template2.png', ]); InvoiceTemplate::create([ 'name' => 'Template 3', 'view' => 'invoice3', - 'path' => '/assets/img/PDF/Template3.png' + 'path' => '/assets/img/PDF/Template3.png', ]); } } diff --git a/database/seeders/PaymentMethodSeeder.php b/database/seeders/PaymentMethodSeeder.php index e2b58178..4add3077 100644 --- a/database/seeders/PaymentMethodSeeder.php +++ b/database/seeders/PaymentMethodSeeder.php @@ -2,8 +2,8 @@ namespace Database\Seeders; -use Illuminate\Database\Seeder; use Crater\Models\PaymentMethod; +use Illuminate\Database\Seeder; class PaymentMethodSeeder extends Seeder { diff --git a/database/seeders/UnitSeeder.php b/database/seeders/UnitSeeder.php index 7ad36487..e060b791 100644 --- a/database/seeders/UnitSeeder.php +++ b/database/seeders/UnitSeeder.php @@ -2,8 +2,8 @@ namespace Database\Seeders; -use Illuminate\Database\Seeder; use Crater\Models\Unit; +use Illuminate\Database\Seeder; class UnitSeeder extends Seeder { diff --git a/database/seeders/UsersTableSeeder.php b/database/seeders/UsersTableSeeder.php index 586f8d9b..1c8a79ff 100644 --- a/database/seeders/UsersTableSeeder.php +++ b/database/seeders/UsersTableSeeder.php @@ -3,10 +3,9 @@ namespace Database\Seeders; use Crater\Models\Company; -use Illuminate\Database\Seeder; -use Crater\Models\User; use Crater\Models\Setting; -use Illuminate\Support\Facades\Hash; +use Crater\Models\User; +use Illuminate\Database\Seeder; class UsersTableSeeder extends Seeder { @@ -21,12 +20,12 @@ class UsersTableSeeder extends Seeder 'email' => 'admin@craterapp.com', 'name' => 'Jane Doe', 'role' => 'super admin', - 'password' => 'crater@123' + 'password' => 'crater@123', ]); $company = Company::create([ 'name' => 'xyz', - 'unique_hash' => str_random(20) + 'unique_hash' => str_random(20), ]); $user->company_id = $company->id; diff --git a/resources/lang/en/pagination.php b/resources/lang/en/pagination.php index fcab34b2..d4814118 100644 --- a/resources/lang/en/pagination.php +++ b/resources/lang/en/pagination.php @@ -14,6 +14,6 @@ return [ */ 'previous' => '« Previous', - 'next' => 'Next »', + 'next' => 'Next »', ]; diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index 95a23e56..8eb4e61d 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -13,77 +13,77 @@ return [ | */ - 'accepted' => 'The :attribute must be accepted.', - 'active_url' => 'The :attribute is not a valid URL.', - 'after' => 'The :attribute must be a date after :date.', - 'alpha' => 'The :attribute may only contain letters.', - 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', - 'alpha_num' => 'The :attribute may only contain letters and numbers.', - 'array' => 'The :attribute must be an array.', - 'before' => 'The :attribute must be a date before :date.', - 'between' => [ + 'accepted' => 'The :attribute must be accepted.', + 'active_url' => 'The :attribute is not a valid URL.', + 'after' => 'The :attribute must be a date after :date.', + 'alpha' => 'The :attribute may only contain letters.', + 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', + 'alpha_num' => 'The :attribute may only contain letters and numbers.', + 'array' => 'The :attribute must be an array.', + 'before' => 'The :attribute must be a date before :date.', + 'between' => [ 'numeric' => 'The :attribute must be between :min and :max.', - 'file' => 'The :attribute must be between :min and :max kilobytes.', - 'string' => 'The :attribute must be between :min and :max characters.', - 'array' => 'The :attribute must have between :min and :max items.', + 'file' => 'The :attribute must be between :min and :max kilobytes.', + 'string' => 'The :attribute must be between :min and :max characters.', + 'array' => 'The :attribute must have between :min and :max items.', ], - 'boolean' => 'The :attribute field must be true or false.', - 'confirmed' => 'The :attribute confirmation does not match.', - 'date' => 'The :attribute is not a valid date.', - 'carbon_date_format' => 'The :attribute does not match the format :format.', - 'moment_date_format' => 'The :attribute does not match the format :format.', - 'different' => 'The :attribute and :other must be different.', - 'digits' => 'The :attribute must be :digits digits.', - 'digits_between' => 'The :attribute must be between :min and :max digits.', - 'dimensions' => 'The :attribute has invalid image dimensions.', - 'distinct' => 'The :attribute field has a duplicate value.', - 'email' => 'The :attribute must be a valid email address.', - 'exists' => 'The selected :attribute is invalid.', - 'file' => 'The :attribute must be a file.', - 'filled' => 'The :attribute field is required.', - 'image' => 'The :attribute must be an image.', - 'in' => 'The selected :attribute is invalid.', - 'in_array' => 'The :attribute field does not exist in :other.', - 'integer' => 'The :attribute must be an integer.', - 'ip' => 'The :attribute must be a valid IP address.', - 'json' => 'The :attribute must be a valid JSON string.', - 'max' => [ + 'boolean' => 'The :attribute field must be true or false.', + 'confirmed' => 'The :attribute confirmation does not match.', + 'date' => 'The :attribute is not a valid date.', + 'carbon_date_format' => 'The :attribute does not match the format :format.', + 'moment_date_format' => 'The :attribute does not match the format :format.', + 'different' => 'The :attribute and :other must be different.', + 'digits' => 'The :attribute must be :digits digits.', + 'digits_between' => 'The :attribute must be between :min and :max digits.', + 'dimensions' => 'The :attribute has invalid image dimensions.', + 'distinct' => 'The :attribute field has a duplicate value.', + 'email' => 'The :attribute must be a valid email address.', + 'exists' => 'The selected :attribute is invalid.', + 'file' => 'The :attribute must be a file.', + 'filled' => 'The :attribute field is required.', + 'image' => 'The :attribute must be an image.', + 'in' => 'The selected :attribute is invalid.', + 'in_array' => 'The :attribute field does not exist in :other.', + 'integer' => 'The :attribute must be an integer.', + 'ip' => 'The :attribute must be a valid IP address.', + 'json' => 'The :attribute must be a valid JSON string.', + 'max' => [ 'numeric' => 'The :attribute may not be greater than :max.', - 'file' => 'The :attribute may not be greater than :max kilobytes.', - 'string' => 'The :attribute may not be greater than :max characters.', - 'array' => 'The :attribute may not have more than :max items.', + 'file' => 'The :attribute may not be greater than :max kilobytes.', + 'string' => 'The :attribute may not be greater than :max characters.', + 'array' => 'The :attribute may not have more than :max items.', ], - 'mimes' => 'The :attribute must be a file of type: :values.', - 'mimetypes' => 'The :attribute must be a file of type: :values.', - 'min' => [ + 'mimes' => 'The :attribute must be a file of type: :values.', + 'mimetypes' => 'The :attribute must be a file of type: :values.', + 'min' => [ 'numeric' => 'The :attribute must be at least :min.', - 'file' => 'The :attribute must be at least :min kilobytes.', - 'string' => 'The :attribute must be at least :min characters.', - 'array' => 'The :attribute must have at least :min items.', + 'file' => 'The :attribute must be at least :min kilobytes.', + 'string' => 'The :attribute must be at least :min characters.', + 'array' => 'The :attribute must have at least :min items.', ], - 'not_in' => 'The selected :attribute is invalid.', - 'numeric' => 'The :attribute must be a number.', - 'present' => 'The :attribute field must be present.', - 'regex' => 'The :attribute format is invalid.', - 'required' => 'The :attribute field is required.', - 'required_if' => 'The :attribute field is required when :other is :value.', - 'required_unless' => 'The :attribute field is required unless :other is in :values.', - 'required_with' => 'The :attribute field is required when :values is present.', - 'required_with_all' => 'The :attribute field is required when :values is present.', - 'required_without' => 'The :attribute field is required when :values is not present.', + 'not_in' => 'The selected :attribute is invalid.', + 'numeric' => 'The :attribute must be a number.', + 'present' => 'The :attribute field must be present.', + 'regex' => 'The :attribute format is invalid.', + 'required' => 'The :attribute field is required.', + 'required_if' => 'The :attribute field is required when :other is :value.', + 'required_unless' => 'The :attribute field is required unless :other is in :values.', + 'required_with' => 'The :attribute field is required when :values is present.', + 'required_with_all' => 'The :attribute field is required when :values is present.', + 'required_without' => 'The :attribute field is required when :values is not present.', 'required_without_all' => 'The :attribute field is required when none of :values are present.', - 'same' => 'The :attribute and :other must match.', - 'size' => [ + 'same' => 'The :attribute and :other must match.', + 'size' => [ 'numeric' => 'The :attribute must be :size.', - 'file' => 'The :attribute must be :size kilobytes.', - 'string' => 'The :attribute must be :size characters.', - 'array' => 'The :attribute must contain :size items.', + 'file' => 'The :attribute must be :size kilobytes.', + 'string' => 'The :attribute must be :size characters.', + 'array' => 'The :attribute must contain :size items.', ], - 'string' => 'The :attribute must be a string.', - 'timezone' => 'The :attribute must be a valid zone.', - 'unique' => 'The :attribute has already been taken.', - 'uploaded' => 'The :attribute failed to upload.', - 'url' => 'The :attribute format is invalid.', + 'string' => 'The :attribute must be a string.', + 'timezone' => 'The :attribute must be a valid zone.', + 'unique' => 'The :attribute has already been taken.', + 'uploaded' => 'The :attribute failed to upload.', + 'url' => 'The :attribute format is invalid.', /* |-------------------------------------------------------------------------- diff --git a/routes/api.php b/routes/api.php index ca34f6a5..2d0f04fc 100644 --- a/routes/api.php +++ b/routes/api.php @@ -2,7 +2,6 @@ use Crater\Http\Controllers\AppVersionController; use Crater\Http\Controllers\V1\Auth\ForgotPasswordController; -use Crater\Http\Controllers\V1\Auth\IsRegisteredController; use Crater\Http\Controllers\V1\Auth\ResetPasswordController; use Crater\Http\Controllers\V1\Backup\BackupsController; use Crater\Http\Controllers\V1\Backup\DownloadBackupController; @@ -22,34 +21,34 @@ use Crater\Http\Controllers\V1\Expense\UploadReceiptController; use Crater\Http\Controllers\V1\General\BootstrapController; use Crater\Http\Controllers\V1\General\CountriesController; use Crater\Http\Controllers\V1\General\CurrenciesController; -use Crater\Http\Controllers\V1\General\NextNumberController; use Crater\Http\Controllers\V1\General\DateFormatsController; use Crater\Http\Controllers\V1\General\FiscalYearsController; use Crater\Http\Controllers\V1\General\LanguagesController; +use Crater\Http\Controllers\V1\General\NextNumberController; use Crater\Http\Controllers\V1\General\NotesController; use Crater\Http\Controllers\V1\General\SearchController; use Crater\Http\Controllers\V1\General\TimezonesController; use Crater\Http\Controllers\V1\Invoice\ChangeInvoiceStatusController; use Crater\Http\Controllers\V1\Invoice\CloneInvoiceController; use Crater\Http\Controllers\V1\Invoice\InvoicesController; -use Crater\Http\Controllers\V1\Invoice\SendInvoiceController; use Crater\Http\Controllers\V1\Invoice\InvoiceTemplatesController; +use Crater\Http\Controllers\V1\Invoice\SendInvoiceController; use Crater\Http\Controllers\V1\Item\ItemsController; use Crater\Http\Controllers\V1\Item\UnitsController; use Crater\Http\Controllers\V1\Mobile\AuthController; use Crater\Http\Controllers\V1\Onboarding\DatabaseConfigurationController; -use Crater\Http\Controllers\V1\Settings\MailConfigurationController; +use Crater\Http\Controllers\V1\Onboarding\FinishController; +use Crater\Http\Controllers\V1\Onboarding\OnboardingWizardController; use Crater\Http\Controllers\V1\Onboarding\PermissionsController; use Crater\Http\Controllers\V1\Onboarding\RequirementsController; -use Crater\Http\Controllers\V1\Onboarding\OnboardingWizardController; -use Crater\Http\Controllers\V1\Onboarding\FinishController; -use Crater\Http\Controllers\V1\Payment\PaymentsController; use Crater\Http\Controllers\V1\Payment\PaymentMethodsController; +use Crater\Http\Controllers\V1\Payment\PaymentsController; use Crater\Http\Controllers\V1\Payment\SendPaymentController; use Crater\Http\Controllers\V1\Settings\CompanyController; use Crater\Http\Controllers\V1\Settings\DiskController; use Crater\Http\Controllers\V1\Settings\GetCompanySettingsController; use Crater\Http\Controllers\V1\Settings\GetUserSettingsController; +use Crater\Http\Controllers\V1\Settings\MailConfigurationController; use Crater\Http\Controllers\V1\Settings\TaxTypesController; use Crater\Http\Controllers\V1\Settings\UpdateCompanySettingsController; use Crater\Http\Controllers\V1\Settings\UpdateUserSettingsController; @@ -80,7 +79,7 @@ use Illuminate\Support\Facades\Route; Route::get('ping', function () { return response()->json([ - 'success' => 'crater-self-hosted' + 'success' => 'crater-self-hosted', ]); })->name('ping'); @@ -100,17 +99,16 @@ Route::prefix('/v1')->group(function () { //---------------------------------- Route::group(['prefix' => 'auth'], function () { - Route::post('login', [AuthController::class, 'login']); Route::post('logout', [AuthController::class, 'logout'])->middleware('auth:sanctum'); // Send reset password mail - Route::post('password/email', [ForgotPasswordController::class, 'sendResetLinkEmail'])->middleware("throttle:10,2");; + Route::post('password/email', [ForgotPasswordController::class, 'sendResetLinkEmail'])->middleware("throttle:10,2"); + ; // handle reset password form process Route::post('reset/password', [ResetPasswordController::class, 'reset']); - }); @@ -124,7 +122,6 @@ Route::prefix('/v1')->group(function () { //---------------------------------- Route::middleware(['redirect-if-installed'])->group(function () { - Route::get('/onboarding/wizard-step', [OnboardingWizardController::class, 'getStep']); Route::post('/onboarding/wizard-step', [OnboardingWizardController::class, 'updateStep']); @@ -138,7 +135,6 @@ Route::prefix('/v1')->group(function () { Route::get('/onboarding/database/config', [DatabaseConfigurationController::class, 'getDatabaseEnvironment']); Route::post('/onboarding/finish', FinishController::class); - }); @@ -342,6 +338,5 @@ Route::prefix('/v1')->group(function () { Route::post('/users/delete', [UsersController::class, 'delete']); Route::apiResource('/users', UsersController::class); - }); }); diff --git a/routes/channels.php b/routes/channels.php index 0222a688..705e38bd 100644 --- a/routes/channels.php +++ b/routes/channels.php @@ -1,14 +1,13 @@ conversation_id === (int) $cid }); Broadcast::channel('user.{uid}', function () { - return true; //(int) $user->conversation_id === (int) $cid + return true; //(int) $user->conversation_id === (int) $cid }); Broadcast::channel('company.{companyId}', function ($user, $companyId) { diff --git a/routes/web.php b/routes/web.php index 6164baca..9a3de1ab 100644 --- a/routes/web.php +++ b/routes/web.php @@ -45,7 +45,6 @@ Route::prefix('reports')->group(function () { // report for profit and loss //---------------------------------- Route::get('/profit-loss/{hash}', ProfitLossReportController::class); - }); diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php index 2d5b4f17..547152f6 100644 --- a/tests/CreatesApplication.php +++ b/tests/CreatesApplication.php @@ -1,4 +1,5 @@ 'DatabaseSeeder', '--force' => true]); @@ -24,7 +25,7 @@ beforeEach(function () { test('get backups', function () { $disk = FileDisk::factory()->create([ - 'set_as_default' => true + 'set_as_default' => true, ]); $response = getJson("/api/v1/backups?disk={$disk->driver}&&file_disk_id={$disk->id}"); @@ -50,7 +51,7 @@ test('create backup', function () { $response->assertStatus(200)->assertJson([ "disks" => [ - "local" - ] + "local", + ], ]); }); diff --git a/tests/Feature/CompanySettingTest.php b/tests/Feature/CompanySettingTest.php index ce5a0275..6a2c2a3e 100644 --- a/tests/Feature/CompanySettingTest.php +++ b/tests/Feature/CompanySettingTest.php @@ -6,7 +6,9 @@ use Crater\Http\Requests\ProfileRequest; use Crater\Models\User; use Illuminate\Support\Facades\Artisan; use Laravel\Sanctum\Sanctum; -use function Pest\Laravel\{postJson, getJson, putJson}; +use function Pest\Laravel\getJson; +use function Pest\Laravel\postJson; +use function Pest\Laravel\putJson; beforeEach(function () { Artisan::call('db:seed', ['--class' => 'DatabaseSeeder', '--force' => true]); @@ -41,7 +43,7 @@ test('update profile', function () { $user = [ 'name' => 'John Doe', 'password' => 'admin@123', - 'email' => 'admin@crater.in' + 'email' => 'admin@crater.in', ]; $response = putJson('api/v1/me', $user); @@ -50,7 +52,7 @@ test('update profile', function () { $this->assertDatabaseHas('users', [ 'name' => $user['name'], - 'email' => $user['email'] + 'email' => $user['email'], ]); }); @@ -71,7 +73,7 @@ test('update company', function () { 'address_street_1' => 'test1', 'address_street_2' => 'test2', 'phone' => '1234567890', - 'zip' => '112233' + 'zip' => '112233', ]; $response = putJson('api/v1/company', $company); @@ -79,7 +81,7 @@ test('update company', function () { $response->assertOk(); $this->assertDatabaseHas('companies', [ - 'name' => $company['name'] + 'name' => $company['name'], ]); $this->assertDatabaseHas('addresses', [ @@ -89,13 +91,13 @@ test('update company', function () { 'address_street_1' => $company['address_street_1'], 'address_street_2' => $company['address_street_2'], 'phone' => $company['phone'], - 'zip' => $company['zip'] + 'zip' => $company['zip'], ]); }); test('update settings', function () { $settings = [ - 'currency'=> 1, + 'currency' => 1, 'time_zone' => 'Asia/Kolkata', 'language' => 'en', 'fiscal_year' => '1-12', @@ -105,20 +107,20 @@ test('update settings', function () { 'notify_invoice_viewed' => 'YES', 'notify_estimate_viewed' => 'YES', 'tax_per_item' => 'YES', - 'discount_per_item' => 'YES' + 'discount_per_item' => 'YES', ]; $response = postJson('/api/v1/company/settings', ['settings' => $settings]); $response->assertOk() ->assertJson([ - 'success' => true + 'success' => true, ]); foreach ($settings as $key => $value) { $this->assertDatabaseHas('company_settings', [ 'option' => $key, - 'value' => $value + 'value' => $value, ]); } }); @@ -135,7 +137,7 @@ test('get notification email settings', function () { 'notify_invoice_viewed', 'notify_estimate_viewed', 'tax_per_item', - 'discount_per_item' + 'discount_per_item', ]; $response = getJson('/api/v1/company/settings?'.http_build_query($data)); diff --git a/tests/Feature/CustomFieldTest.php b/tests/Feature/CustomFieldTest.php index 0b10bb08..0c342162 100644 --- a/tests/Feature/CustomFieldTest.php +++ b/tests/Feature/CustomFieldTest.php @@ -1,12 +1,15 @@ 'DatabaseSeeder', '--force' => true]); @@ -34,7 +37,7 @@ test('create custom field', function () { postJson('api/v1/custom-fields', $data) ->assertStatus(200) ->assertJson([ - 'success' => true + 'success' => true, ]); $this->assertDatabaseHas('custom_fields', [ @@ -42,7 +45,7 @@ test('create custom field', function () { 'label' => $data['label'], 'type' => $data['type'], 'model_type' => $data['model_type'], - 'is_required' => $data['is_required'] + 'is_required' => $data['is_required'], ]); }); @@ -58,13 +61,13 @@ test('update custom field', function () { $customField = CustomField::factory()->create(); $newCustomField = CustomField::factory()->raw([ - 'is_required' => false + 'is_required' => false, ]); - putJson('api/v1/custom-fields/' . $customField->id, $newCustomField) + putJson('api/v1/custom-fields/'.$customField->id, $newCustomField) ->assertStatus(200) ->assertJson([ - 'success' => true + 'success' => true, ]); $this->assertDatabaseHas('custom_fields', [ @@ -87,12 +90,12 @@ test('update validates using a form request', function () { test('delete custom field', function () { $customField = CustomField::factory()->create(); - $response = deleteJson('api/v1/custom-fields/' . $customField->id); + $response = deleteJson('api/v1/custom-fields/'.$customField->id); $response ->assertOk() ->assertJson([ - 'success' => true + 'success' => true, ]); $this->assertDeleted($customField); diff --git a/tests/Feature/CustomerTest.php b/tests/Feature/CustomerTest.php index d7bea0e8..67f1134b 100644 --- a/tests/Feature/CustomerTest.php +++ b/tests/Feature/CustomerTest.php @@ -1,12 +1,14 @@ 'DatabaseSeeder', '--force' => true]); @@ -30,11 +32,11 @@ test('get customers', function () { test('customer stats', function () { $customer = User::factory()->create([ - 'role' => 'customer' + 'role' => 'customer', ]); $invoice = Invoice::factory()->create([ - 'user_id' => $customer->id + 'user_id' => $customer->id, ]); $response = getJson("api/v1/customers/{$customer->id}/stats"); @@ -45,7 +47,7 @@ test('customer stats', function () { test('create customer', function () { $customer = User::factory()->raw([ 'password' => 'secret', - 'role' => 'customer' + 'role' => 'customer', ]); $response = postJson('api/v1/customers', $customer); @@ -54,13 +56,13 @@ test('create customer', function () { 'name' => $customer['name'], 'email' => $customer['email'], 'role' => $customer['role'], - 'company_id' => $customer['company_id'] + 'company_id' => $customer['company_id'], ]); $response ->assertOk() ->assertJson([ - 'success' => true + 'success' => true, ]); }); @@ -74,7 +76,7 @@ test('store validates using a form request', function () { test('get customer', function () { $customer = User::factory()->create([ - 'role' => 'customer' + 'role' => 'customer', ]); $response = getJson("api/v1/customers/{$customer->id}"); @@ -84,7 +86,7 @@ test('get customer', function () { 'name' => $customer['name'], 'email' => $customer['email'], 'role' => $customer['role'], - 'company_id' => $customer['company_id'] + 'company_id' => $customer['company_id'], ]); $response->assertOk(); @@ -92,28 +94,28 @@ test('get customer', function () { test('update customer', function () { $customer = User::factory()->create([ - 'role' => 'customer' - ]); - - $customer1 = User::factory()->raw([ 'role' => 'customer', - 'name' => 'new name' ]); - $response = putJson('api/v1/customers/' . $customer->id, $customer1); + $customer1 = User::factory()->raw([ + 'role' => 'customer', + 'name' => 'new name', + ]); + + $response = putJson('api/v1/customers/'.$customer->id, $customer1); $this->assertDatabaseHas('users', [ 'id' => $customer->id, 'name' => $customer1['name'], 'email' => $customer1['email'], 'role' => $customer1['role'], - 'company_id' => $customer1['company_id'] + 'company_id' => $customer1['company_id'], ]); $response ->assertOk() ->assertJson([ - 'success' => true + 'success' => true, ]); }); @@ -130,25 +132,25 @@ test('search customers', function () { 'page' => 1, 'limit' => 15, 'search' => 'doe', - 'email' => '.com' + 'email' => '.com', ]; $queryString = http_build_query($filters, '', '&'); - $response = getJson('api/v1/customers?' . $queryString); + $response = getJson('api/v1/customers?'.$queryString); $response->assertOk(); }); test('delete multiple customer', function () { $customers = User::factory()->count(4)->create([ - 'role' => 'customer' + 'role' => 'customer', ]); $ids = $customers->pluck('id'); $data = [ - 'ids' => $ids + 'ids' => $ids, ]; $response = postJson('api/v1/customers/delete', $data); @@ -156,6 +158,6 @@ test('delete multiple customer', function () { $response ->assertOk() ->assertJson([ - 'success' => true + 'success' => true, ]); }); diff --git a/tests/Feature/DashboardTest.php b/tests/Feature/DashboardTest.php index 2797dd11..32ac81d6 100644 --- a/tests/Feature/DashboardTest.php +++ b/tests/Feature/DashboardTest.php @@ -1,4 +1,5 @@ 'DatabaseSeeder', '--force' => true]); @@ -38,10 +40,10 @@ test('get estimates', function () { test('create estimate', function () { $estimate = Estimate::factory()->raw([ 'items' => [ - EstimateItem::factory()->raw() + EstimateItem::factory()->raw(), ], 'taxes' => [ - Tax::factory()->raw() + Tax::factory()->raw(), ], ]); @@ -81,16 +83,16 @@ test('update estimate', function () { $estimate2 = Estimate::factory()->raw([ 'items' => [ - EstimateItem::factory()->raw() + EstimateItem::factory()->raw(), ], 'taxes' => [ Tax::factory()->raw([ - 'tax_type_id' => $estimate->taxes[0]->tax_type_id - ]) - ] + 'tax_type_id' => $estimate->taxes[0]->tax_type_id, + ]), + ], ]); - $response = putJson('api/v1/estimates/' . $estimate->id, $estimate2); + $response = putJson('api/v1/estimates/'.$estimate->id, $estimate2); $newEstimate = $response->decodeResponseJson()['estimate']; @@ -108,11 +110,11 @@ test('update estimate', function () { ]); $this->assertDatabaseHas('taxes', [ - 'estimate_id' => $newEstimate['id'] + 'estimate_id' => $newEstimate['id'], ]); $this->assertDatabaseHas('estimate_items', [ - 'estimate_id' => $newEstimate['id'] + 'estimate_id' => $newEstimate['id'], ]); $response->assertStatus(200); @@ -133,12 +135,12 @@ test('search estimates', function () { 'search' => 'doe', 'from_date' => '2020-07-18', 'to_date' => '2020-07-20', - 'estimate_number' => '000003' + 'estimate_number' => '000003', ]; $queryString = http_build_query($filters, '', '&'); - $response = getJson('api/v1/estimates?' . $queryString); + $response = getJson('api/v1/estimates?'.$queryString); $response->assertStatus(200); }); @@ -163,13 +165,13 @@ test('send estimate to customer', function () { 'subject' => 'test', 'body' => 'test', 'from' => 'john@example.com', - 'to' => 'doe@example.com' + 'to' => 'doe@example.com', ]; postJson("api/v1/estimates/{$estimate->id}/send", $data) ->assertStatus(200) ->assertJson([ - 'success' => true + 'success' => true, ]); Mail::assertSent(SendEstimateMail::class); @@ -182,7 +184,7 @@ test('estimate mark as accepted', function () { ]); $data = [ - 'status' => Estimate::STATUS_ACCEPTED + 'status' => Estimate::STATUS_ACCEPTED, ]; $response = postJson("api/v1/estimates/{$estimate->id}/status", $data); @@ -190,7 +192,7 @@ test('estimate mark as accepted', function () { $response ->assertOk() ->assertJson([ - 'success' => true + 'success' => true, ]); $estimate2 = Estimate::find($estimate->id); @@ -204,7 +206,7 @@ test('estimate mark as rejected', function () { ]); $data = [ - 'status' => Estimate::STATUS_REJECTED + 'status' => Estimate::STATUS_REJECTED, ]; $response = postJson("api/v1/estimates/{$estimate->id}/status", $data); @@ -212,7 +214,7 @@ test('estimate mark as rejected', function () { $response ->assertOk() ->assertJson([ - 'success' => true + 'success' => true, ]); $estimate2 = Estimate::find($estimate->id); @@ -248,7 +250,7 @@ test('delete multiple estimates', function () { $ids = $estimates->pluck('id'); $data = [ - 'ids' => $ids + 'ids' => $ids, ]; $response = postJson('api/v1/estimates/delete', $data); @@ -256,7 +258,7 @@ test('delete multiple estimates', function () { $response ->assertStatus(200) ->assertJson([ - 'success' => true + 'success' => true, ]); foreach ($estimates as $estimate) { diff --git a/tests/Feature/ExpenseCategoryTest.php b/tests/Feature/ExpenseCategoryTest.php index fd791a4d..25a43734 100644 --- a/tests/Feature/ExpenseCategoryTest.php +++ b/tests/Feature/ExpenseCategoryTest.php @@ -1,11 +1,15 @@ 'DatabaseSeeder', '--force' => true]); @@ -82,7 +86,7 @@ test('delete category', function () { deleteJson('api/v1/categories/'.$category->id) ->assertOk() ->assertJson([ - 'success' => true + 'success' => true, ]); $this->assertDeleted($category); diff --git a/tests/Feature/ExpenseTest.php b/tests/Feature/ExpenseTest.php index c2a6970f..25aea6f9 100644 --- a/tests/Feature/ExpenseTest.php +++ b/tests/Feature/ExpenseTest.php @@ -1,12 +1,14 @@ 'DatabaseSeeder', '--force' => true]); @@ -48,7 +50,7 @@ test('store validates using a form request', function () { test('get expense data', function () { $expense = Expense::factory()->create([ - 'expense_date' => '2019-02-05' + 'expense_date' => '2019-02-05', ]); getJson("api/v1/expenses/{$expense->id}")->assertOk(); @@ -63,12 +65,12 @@ test('get expense data', function () { test('update expense', function () { $expense = Expense::factory()->create([ - 'expense_date' => '2019-02-05' + 'expense_date' => '2019-02-05', ]); $expense2 = Expense::factory()->raw(); - putJson('api/v1/expenses/' . $expense->id, $expense2)->assertOk(); + putJson('api/v1/expenses/'.$expense->id, $expense2)->assertOk(); $this->assertDatabaseHas('expenses', [ 'id' => $expense->id, @@ -93,23 +95,23 @@ test('search expenses', function () { 'expense_category_id' => 1, 'search' => 'cate', 'from_date' => '2020-07-18', - 'to_date' => '2020-07-20' + 'to_date' => '2020-07-20', ]; $queryString = http_build_query($filters, '', '&'); - $response = getJson('api/v1/expenses?' . $queryString); + $response = getJson('api/v1/expenses?'.$queryString); $response->assertOk(); }); test('delete multiple expenses', function () { $expenses = Expense::factory()->count(3)->create([ - 'expense_date' => '2019-02-05' + 'expense_date' => '2019-02-05', ]); $data = [ - 'ids' => $expenses->pluck('id') + 'ids' => $expenses->pluck('id'), ]; $response = postJson('api/v1/expenses/delete', $data); @@ -117,7 +119,7 @@ test('delete multiple expenses', function () { $response ->assertOk() ->assertJson([ - 'success' => true + 'success' => true, ]); foreach ($expenses as $expense) { diff --git a/tests/Feature/FileDiskTest.php b/tests/Feature/FileDiskTest.php index a621ce46..83337b5c 100644 --- a/tests/Feature/FileDiskTest.php +++ b/tests/Feature/FileDiskTest.php @@ -1,10 +1,12 @@ 'DatabaseSeeder', '--force' => true]); diff --git a/tests/Feature/InvoiceTest.php b/tests/Feature/InvoiceTest.php index 82a9cf13..8e2bd17e 100644 --- a/tests/Feature/InvoiceTest.php +++ b/tests/Feature/InvoiceTest.php @@ -1,16 +1,18 @@ 'DatabaseSeeder', '--force' => true]); @@ -36,7 +38,7 @@ test('create invoice', function () { $invoice = Invoice::factory() ->raw([ 'taxes' => [Tax::factory()->raw()], - 'items' => [InvoiceItem::factory()->raw()] + 'items' => [InvoiceItem::factory()->raw()], ]); $response = postJson('api/v1/invoices', $invoice); @@ -62,7 +64,7 @@ test('create invoice as sent', function () { $invoice = Invoice::factory() ->raw([ 'taxes' => [Tax::factory()->raw()], - 'items' => [InvoiceItem::factory()->raw()] + 'items' => [InvoiceItem::factory()->raw()], ]); $response = postJson('api/v1/invoices', $invoice); @@ -101,10 +103,10 @@ test('update invoice', function () { $invoice2 = Invoice::factory() ->raw([ 'taxes' => [Tax::factory()->raw()], - 'items' => [InvoiceItem::factory()->raw()] + 'items' => [InvoiceItem::factory()->raw()], ]); - putJson('api/v1/invoices/' . $invoice->id, $invoice2)->assertOk(); + putJson('api/v1/invoices/'.$invoice->id, $invoice2)->assertOk(); $this->assertDatabaseHas('invoices', [ 'invoice_number' => $invoice2['invoice_number'], @@ -141,15 +143,15 @@ test('send invoice to customer', function () { 'from' => 'john@example.com', 'to' => 'doe@example.com', 'subject' => 'email subject', - 'body' => 'email body' + 'body' => 'email body', ]; - $response = postJson('api/v1/invoices/' . $invoices->id . '/send', $data); + $response = postJson('api/v1/invoices/'.$invoices->id.'/send', $data); $response ->assertOk() ->assertJson([ - 'success' => true + 'success' => true, ]); $invoice2 = Invoice::find($invoices->id); @@ -165,15 +167,15 @@ test('invoice mark as paid', function () { ]); $data = [ - 'status' => Invoice::STATUS_COMPLETED + 'status' => Invoice::STATUS_COMPLETED, ]; - $response = postJson('api/v1/invoices/' . $invoice->id . '/status', $data); + $response = postJson('api/v1/invoices/'.$invoice->id.'/status', $data); $response ->assertOk() ->assertJson([ - 'success' => true + 'success' => true, ]); $this->assertEquals(Invoice::find($invoice->id)->paid_status, Invoice::STATUS_PAID); @@ -186,15 +188,15 @@ test('invoice mark as sent', function () { ]); $data = [ - 'status' => Invoice::STATUS_SENT + 'status' => Invoice::STATUS_SENT, ]; - $response = postJson('api/v1/invoices/' . $invoice->id . '/status', $data); + $response = postJson('api/v1/invoices/'.$invoice->id.'/status', $data); $response ->assertOk() ->assertJson([ - 'success' => true + 'success' => true, ]); $this->assertEquals(Invoice::find($invoice->id)->status, Invoice::STATUS_SENT); @@ -208,12 +210,12 @@ test('search invoices', function () { 'status' => Invoice::STATUS_DRAFT, 'from_date' => '2019-01-20', 'to_date' => '2019-01-27', - 'invoice_number' => '000012' + 'invoice_number' => '000012', ]; $queryString = http_build_query($filters, '', '&'); - $response = getJson('api/v1/invoices?' . $queryString); + $response = getJson('api/v1/invoices?'.$queryString); $response->assertOk(); }); @@ -227,13 +229,13 @@ test('delete multiple invoices', function () { $ids = $invoices->pluck('id'); $data = [ - 'ids' => $ids + 'ids' => $ids, ]; postJson('api/v1/invoices/delete', $data) ->assertOk() ->assertJson([ - 'success' => true + 'success' => true, ]); foreach ($invoices as $invoice) { @@ -252,6 +254,6 @@ test('clone invoice', function () { $response ->assertOk() ->assertJson([ - 'success' => true + 'success' => true, ]); }); diff --git a/tests/Feature/ItemTest.php b/tests/Feature/ItemTest.php index 34056228..a9214758 100644 --- a/tests/Feature/ItemTest.php +++ b/tests/Feature/ItemTest.php @@ -1,13 +1,15 @@ 'DatabaseSeeder', '--force' => true]); @@ -33,8 +35,8 @@ test('create item', function () { $item = Item::factory()->raw([ 'taxes' => [ Tax::factory()->raw(), - Tax::factory()->raw() - ] + Tax::factory()->raw(), + ], ]); $response = postJson('api/v1/items', $item); @@ -43,7 +45,7 @@ test('create item', function () { 'name' => $item['name'], 'description' => $item['description'], 'price' => $item['price'], - 'company_id' => $item['company_id'] + 'company_id' => $item['company_id'], ]); $this->assertDatabaseHas('taxes', [ @@ -72,7 +74,7 @@ test('get item', function () { 'name' => $item['name'], 'description' => $item['description'], 'price' => $item['price'], - 'company_id' => $item['company_id'] + 'company_id' => $item['company_id'], ]); }); @@ -81,11 +83,11 @@ test('update item', function () { $update_item = Item::factory()->raw([ 'taxes' => [ - Tax::factory()->raw() - ] + Tax::factory()->raw(), + ], ]); - $response = putJson('api/v1/items/' . $item->id, $update_item); + $response = putJson('api/v1/items/'.$item->id, $update_item); $response->assertOk(); @@ -93,7 +95,7 @@ test('update item', function () { 'name' => $update_item['name'], 'description' => $update_item['description'], 'price' => $update_item['price'], - 'company_id' => $update_item['company_id'] + 'company_id' => $update_item['company_id'], ]); $this->assertDatabaseHas('taxes', [ @@ -113,7 +115,7 @@ test('delete multiple items', function () { $items = Item::factory()->count(5)->create(); $data = [ - 'ids' => $items->pluck('id') + 'ids' => $items->pluck('id'), ]; postJson("/api/v1/items/delete", $data)->assertOk(); @@ -129,12 +131,12 @@ test('search items', function () { 'limit' => 15, 'search' => 'doe', 'price' => 6, - 'unit' => 'kg' + 'unit' => 'kg', ]; $queryString = http_build_query($filters, '', '&'); - $response = getJson('api/v1/items?' . $queryString); + $response = getJson('api/v1/items?'.$queryString); $response->assertOk(); }); diff --git a/tests/Feature/NextNumberTest.php b/tests/Feature/NextNumberTest.php index e3283625..d6d1e021 100644 --- a/tests/Feature/NextNumberTest.php +++ b/tests/Feature/NextNumberTest.php @@ -22,25 +22,25 @@ beforeEach(function () { test('next number', function () { $key = 'invoice'; - $response = getJson('api/v1/next-number?key=' . $key); + $response = getJson('api/v1/next-number?key='.$key); $response->assertStatus(200)->assertJson([ - 'nextNumber' => '000001' + 'nextNumber' => '000001', ]); $key = 'estimate'; - $response = getJson('api/v1/next-number?key=' . $key); + $response = getJson('api/v1/next-number?key='.$key); $response->assertStatus(200)->assertJson([ - 'nextNumber' => '000001' + 'nextNumber' => '000001', ]); $key = 'payment'; - $response = getJson('api/v1/next-number?key=' . $key); + $response = getJson('api/v1/next-number?key='.$key); $response->assertStatus(200)->assertJson([ - 'nextNumber' => '000001' + 'nextNumber' => '000001', ]); }); diff --git a/tests/Feature/NotesTest.php b/tests/Feature/NotesTest.php index f4ceed6a..6e0fb5be 100644 --- a/tests/Feature/NotesTest.php +++ b/tests/Feature/NotesTest.php @@ -4,7 +4,10 @@ use Crater\Models\Note; use Crater\Models\User; use Illuminate\Support\Facades\Artisan; use Laravel\Sanctum\Sanctum; -use function Pest\Laravel\{getJson, postJson, putJson, deleteJson}; +use function Pest\Laravel\deleteJson; +use function Pest\Laravel\getJson; +use function Pest\Laravel\postJson; +use function Pest\Laravel\putJson; beforeEach(function () { Artisan::call('db:seed', ['--class' => 'DatabaseSeeder', '--force' => true]); @@ -38,7 +41,7 @@ test('retrieve note', function () { getJson("/api/v1/notes/{$note->id}") ->assertStatus(200) ->assertJson([ - 'note' => $note->toArray() + 'note' => $note->toArray(), ]); }); @@ -59,7 +62,7 @@ test('delete note', function () { deleteJson("/api/v1/notes/{$note->id}") ->assertStatus(200) ->assertJson([ - 'success' => true + 'success' => true, ]); $this->assertDeleted($note); diff --git a/tests/Feature/PaymentMethodTest.php b/tests/Feature/PaymentMethodTest.php index 583ad82a..d80f0f61 100644 --- a/tests/Feature/PaymentMethodTest.php +++ b/tests/Feature/PaymentMethodTest.php @@ -1,12 +1,15 @@ 'DatabaseSeeder', '--force' => true]); @@ -42,7 +45,7 @@ test('create payment method', function () { $this->assertDatabaseHas('payment_methods', [ 'name' => $data['name'], - 'company_id' => $data['company_id'] + 'company_id' => $data['company_id'], ]); }); @@ -72,7 +75,7 @@ test('update payment method', function () { $method = PaymentMethod::factory()->create(); $data = [ - 'name' => 'updated name' + 'name' => 'updated name', ]; $response = putJson("api/v1/payment-methods/{$method->id}", $data); @@ -81,7 +84,7 @@ test('update payment method', function () { $this->assertDatabaseHas('payment_methods', [ 'id' => $method->id, - 'name' => $data['name'] + 'name' => $data['name'], ]); }); @@ -96,7 +99,7 @@ test('update validates using a form request', function () { test('delete payment method', function () { $method = PaymentMethod::factory()->create(); - $response = deleteJson('api/v1/payment-methods/' . $method->id); + $response = deleteJson('api/v1/payment-methods/'.$method->id); $response->assertOk(); diff --git a/tests/Feature/PaymentTest.php b/tests/Feature/PaymentTest.php index 839c9c1a..75f00797 100644 --- a/tests/Feature/PaymentTest.php +++ b/tests/Feature/PaymentTest.php @@ -1,15 +1,17 @@ 'DatabaseSeeder', '--force' => true]); @@ -41,12 +43,12 @@ test('get payment', function () { test('create payment', function () { $invoice = Invoice::factory()->create([ - 'due_amount' => 100 + 'due_amount' => 100, ]); $payment = Payment::factory()->raw([ 'invoice_id' => $invoice->id, - 'payment_number' => "PAY-000001" + 'payment_number' => "PAY-000001", ]); $response = postJson('api/v1/payments', $payment); @@ -71,7 +73,7 @@ test('store validates using a form request', function () { test('update payment', function () { $payment = Payment::factory()->create([ - 'payment_date' => '1988-08-18' + 'payment_date' => '1988-08-18', ]); $payment2 = Payment::factory()->raw([ @@ -104,18 +106,17 @@ test('search payments', function () { 'limit' => 15, 'search' => 'doe', 'payment_number' => 'PAY-000001', - 'payment_mode' => 'OTHER' + 'payment_mode' => 'OTHER', ]; $queryString = http_build_query($filters, '', '&'); - $response = getJson('api/v1/payments?' . $queryString); + $response = getJson('api/v1/payments?'.$queryString); $response->assertOk(); }); test('send payment to customer', function () { - Mail::fake(); $payment = Payment::factory()->create(); @@ -124,13 +125,13 @@ test('send payment to customer', function () { 'subject' => 'test', 'body' => 'test', 'from' => 'john@example.com', - 'to' => 'doe@example.com' + 'to' => 'doe@example.com', ]; $response = postJson("api/v1/payments/{$payment->id}/send", $data); $response->assertJson([ - 'success' => true + 'success' => true, ]); Mail::assertSent(SendPaymentMail::class); @@ -142,12 +143,12 @@ test('delete payment', function () { $ids = $payments->pluck('id'); $data = [ - 'ids' => $ids + 'ids' => $ids, ]; $response = postJson('api/v1/payments/delete', $data); $response->assertJson([ - 'success' => true + 'success' => true, ]); }); diff --git a/tests/Feature/ReportTest.php b/tests/Feature/ReportTest.php index 7b0e7499..69a2d613 100644 --- a/tests/Feature/ReportTest.php +++ b/tests/Feature/ReportTest.php @@ -1,6 +1,7 @@ '2020-07-20', ]; $queryString = http_build_query($filters, '', '&'); - $queryString = Company::find(1)->unique_hash . '?' . $queryString; + $queryString = Company::find(1)->unique_hash.'?'.$queryString; - $response = getJson('reports/sales/customers/'. $queryString); + $response = getJson('reports/sales/customers/'.$queryString); $response->assertOk(); }); @@ -42,9 +43,9 @@ test('get item sales report', function () { 'to_date' => '2020-07-20', ]; $queryString = http_build_query($filters, '', '&'); - $queryString = Company::find(1)->unique_hash . '?' . $queryString; + $queryString = Company::find(1)->unique_hash.'?'.$queryString; - $response = getJson('reports/sales/items/' . $queryString); + $response = getJson('reports/sales/items/'.$queryString); $response->assertOk(); }); @@ -57,9 +58,9 @@ test('get expenses report', function () { 'to_date' => '2020-07-20', ]; $queryString = http_build_query($filters, '', '&'); - $queryString = Company::find(1)->unique_hash . '?' . $queryString; + $queryString = Company::find(1)->unique_hash.'?'.$queryString; - $response = getJson('reports/expenses/' . $queryString); + $response = getJson('reports/expenses/'.$queryString); $response->assertOk(); }); @@ -72,9 +73,9 @@ test('get tax summary', function () { 'to_date' => '2020-07-20', ]; $queryString = http_build_query($filters, '', '&'); - $queryString = Company::find(1)->unique_hash . '?' . $queryString; + $queryString = Company::find(1)->unique_hash.'?'.$queryString; - $response = getJson('reports/tax-summary/' . $queryString); + $response = getJson('reports/tax-summary/'.$queryString); $response->assertOk(); }); @@ -87,10 +88,9 @@ test('get profit loss', function () { 'to_date' => '2020-07-20', ]; $queryString = http_build_query($filters, '', '&'); - $queryString = Company::find(1)->unique_hash . '?' . $queryString; + $queryString = Company::find(1)->unique_hash.'?'.$queryString; - $response = getJson('reports/profit-loss/' . $queryString); + $response = getJson('reports/profit-loss/'.$queryString); $response->assertOk(); }); - diff --git a/tests/Feature/TaxTypeTest.php b/tests/Feature/TaxTypeTest.php index 045c6ef6..010ff409 100644 --- a/tests/Feature/TaxTypeTest.php +++ b/tests/Feature/TaxTypeTest.php @@ -1,13 +1,16 @@ 'DatabaseSeeder', '--force' => true]); @@ -48,11 +51,11 @@ test('store validates using a form request', function () { test('get tax type', function () { $taxType = TaxType::factory()->create(); - $response = getJson('api/v1/tax-types/' . $taxType->id); + $response = getJson('api/v1/tax-types/'.$taxType->id); $response->assertOk() ->assertJson([ - 'taxType' => $taxType->toArray() + 'taxType' => $taxType->toArray(), ]); }); @@ -61,11 +64,11 @@ test('update tax type', function () { $taxType1 = TaxType::factory()->raw(); - $response = putJson('api/v1/tax-types/' . $taxType->id, $taxType1); + $response = putJson('api/v1/tax-types/'.$taxType->id, $taxType1); $response->assertOk() ->assertJson([ - 'taxType' => $taxType1 + 'taxType' => $taxType1, ]); }); @@ -80,11 +83,11 @@ test('update validates using a form request', function () { test('delete tax type', function () { $taxType = TaxType::factory()->create(); - $response = deleteJson('api/v1/tax-types/' . $taxType->id); + $response = deleteJson('api/v1/tax-types/'.$taxType->id); $response->assertOk() ->assertJson([ - 'success' => true + 'success' => true, ]); $this->assertDeleted($taxType); diff --git a/tests/Feature/UnitTest.php b/tests/Feature/UnitTest.php index abb3c5bb..b6a31dae 100644 --- a/tests/Feature/UnitTest.php +++ b/tests/Feature/UnitTest.php @@ -1,12 +1,15 @@ 'DatabaseSeeder', '--force' => true]); @@ -31,7 +34,7 @@ test('get units', function () { test('create unit', function () { $data = [ 'name' => 'unit name', - 'company_id' => User::find(1)->company_id + 'company_id' => User::find(1)->company_id, ]; $response = postJson('api/v1/units', $data); diff --git a/tests/Pest.php b/tests/Pest.php index 0b4970fe..3260e4c6 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -1,7 +1,7 @@ in('Feature'); uses(TestCase::class, RefreshDatabase::class)->in('Unit'); diff --git a/tests/TestCase.php b/tests/TestCase.php index a724183f..0a180db4 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,14 +1,16 @@ assertTrue($address->country->exists()); }); - diff --git a/tests/Unit/CompanySettingTest.php b/tests/Unit/CompanySettingTest.php index 2c2a4bd3..73bbe46c 100644 --- a/tests/Unit/CompanySettingTest.php +++ b/tests/Unit/CompanySettingTest.php @@ -1,8 +1,8 @@ count(5)->create([ - 'country_id' => $country->id + 'country_id' => $country->id, ]); $this->assertTrue($country->address()->exists()); }); - diff --git a/tests/Unit/CustomFieldTest.php b/tests/Unit/CustomFieldTest.php index 6cc06e39..789c8ae0 100644 --- a/tests/Unit/CustomFieldTest.php +++ b/tests/Unit/CustomFieldTest.php @@ -1,7 +1,7 @@ create([ 'item_id' => Item::factory(), - 'estimate_id' => Estimate::factory() + 'estimate_id' => Estimate::factory(), ]); $this->assertTrue($estimateItem->item()->exists()); @@ -39,7 +39,7 @@ test('estimate item belongs to item', function () { test('estimate item has many taxes', function () { $estimateItem = EstimateItem::factory()->hasTaxes(5)->create([ - 'estimate_id' => Estimate::factory() + 'estimate_id' => Estimate::factory(), ]); $this->assertCount(5, $estimateItem->taxes); diff --git a/tests/Unit/EstimateTemplateTest.php b/tests/Unit/EstimateTemplateTest.php index 1fd54961..7c6aa983 100644 --- a/tests/Unit/EstimateTemplateTest.php +++ b/tests/Unit/EstimateTemplateTest.php @@ -1,7 +1,7 @@ create(); + $estimate = Estimate::factory()->create(); - $prefix = $estimate->getEstimatePrefixAttribute(); + $prefix = $estimate->getEstimatePrefixAttribute(); - $nextNumber = $estimate->getNextEstimateNumber($prefix); + $nextNumber = $estimate->getNextEstimateNumber($prefix); - $estimate1 = Estimate::factory()->create(); + $estimate1 = Estimate::factory()->create(); - $this->assertEquals($prefix.'-'.$nextNumber, $estimate1['estimate_number']); + $this->assertEquals($prefix.'-'.$nextNumber, $estimate1['estimate_number']); }); test('get estimate prefix attribute', function () { @@ -96,7 +96,7 @@ test('create estimate', function () { $estimate['taxes'] = []; array_push($estimate['taxes'], Tax::factory()->raw()); - $request = new Request; + $request = new Request(); $request->replace($estimate); @@ -121,7 +121,7 @@ test('create estimate', function () { 'discount_type' => $estimate['discount_type'], 'discount_val' => $estimate['discount_val'], 'tax' => $estimate['tax'], - 'notes' => $estimate['notes'] + 'notes' => $estimate['notes'], ]); }); @@ -131,7 +131,7 @@ test('update estimate', function () { $newEstimate = Estimate::factory()->raw(); $item = EstimateItem::factory()->raw([ - 'estimate_id' => $estimate->id + 'estimate_id' => $estimate->id, ]); $newEstimate['items'] = []; @@ -140,7 +140,7 @@ test('update estimate', function () { array_push($newEstimate['items'], $item); array_push($newEstimate['taxes'], Tax::factory()->raw()); - $request = new Request; + $request = new Request(); $request->replace($newEstimate); @@ -156,7 +156,7 @@ test('update estimate', function () { 'description' => $item['description'], 'price' => $item['price'], 'total' => $item['total'], - 'quantity' => $item['quantity'] + 'quantity' => $item['quantity'], ]); $this->assertDatabaseHas('estimates', [ @@ -169,7 +169,7 @@ test('update estimate', function () { 'discount_type' => $newEstimate['discount_type'], 'discount_val' => $newEstimate['discount_val'], 'tax' => $newEstimate['tax'], - 'notes' => $newEstimate['notes'] + 'notes' => $newEstimate['notes'], ]); }); @@ -179,12 +179,12 @@ test('create items', function () { $items = []; $item = EstimateItem::factory()->raw([ - 'invoice_id' => $estimate->id + 'invoice_id' => $estimate->id, ]); array_push($items, $item); - $request = new Request; + $request = new Request(); $request->replace(['items' => $items ]); @@ -196,7 +196,7 @@ test('create items', function () { 'price' => $item['price'], 'tax' => $item['tax'], 'quantity' => $item['quantity'], - 'total' => $item['total'] + 'total' => $item['total'], ]); $this->assertCount(1, $estimate->items); @@ -207,17 +207,17 @@ test('create taxes', function () { $taxes = []; $tax1 = Tax::factory()->raw([ - 'estimate_id' => $estimate->id + 'estimate_id' => $estimate->id, ]); $tax2 = Tax::factory()->raw([ - 'estimate_id' => $estimate->id + 'estimate_id' => $estimate->id, ]); array_push($taxes, $tax1); array_push($taxes, $tax2); - $request = new Request; + $request = new Request(); $request->replace(['taxes' => $taxes ]); diff --git a/tests/Unit/ExpenseCategoryTest.php b/tests/Unit/ExpenseCategoryTest.php index f480832e..46b7a5d5 100644 --- a/tests/Unit/ExpenseCategoryTest.php +++ b/tests/Unit/ExpenseCategoryTest.php @@ -1,7 +1,7 @@ create([ 'item_id' => Item::factory(), - 'invoice_id' => Invoice::factory() + 'invoice_id' => Invoice::factory(), ]); $this->assertTrue($invoiceItem->item()->exists()); @@ -39,7 +39,7 @@ test('invoice item belongs to item', function () { test('invoice item has many taxes', function () { $invoiceItem = InvoiceItem::factory()->hasTaxes(5)->create([ - 'invoice_id' => Invoice::factory() + 'invoice_id' => Invoice::factory(), ]); $this->assertCount(5, $invoiceItem->taxes); diff --git a/tests/Unit/InvoiceTemplateTest.php b/tests/Unit/InvoiceTemplateTest.php index 7b86bcd2..ebda8117 100644 --- a/tests/Unit/InvoiceTemplateTest.php +++ b/tests/Unit/InvoiceTemplateTest.php @@ -1,7 +1,7 @@ raw()); - $request = new Request; + $request = new Request(); $request->replace($invoice); - $invoice_number = explode("-",$invoice['invoice_number']); + $invoice_number = explode("-", $invoice['invoice_number']); $number_attributes['invoice_number'] = $invoice_number[0].'-'.sprintf('%06d', intval($invoice_number[1])); $response = Invoice::createInvoice($request); @@ -150,11 +150,11 @@ test('update invoice', function () { $newInvoice = Invoice::factory()->raw(); $item = InvoiceItem::factory()->raw([ - 'invoice_id' => $invoice->id + 'invoice_id' => $invoice->id, ]); $tax = Tax::factory()->raw([ - 'invoice_id' => $invoice->id + 'invoice_id' => $invoice->id, ]); $newInvoice['items'] = []; @@ -163,7 +163,7 @@ test('update invoice', function () { array_push($newInvoice['items'], $item); array_push($newInvoice['taxes'], $tax); - $request = new Request; + $request = new Request(); $request->replace($newInvoice); @@ -201,12 +201,12 @@ test('create items', function () { $items = []; $item = InvoiceItem::factory()->raw([ - 'invoice_id' => $invoice->id + 'invoice_id' => $invoice->id, ]); array_push($items, $item); - $request = new Request; + $request = new Request(); $request->replace(['items' => $items ]); @@ -218,7 +218,7 @@ test('create items', function () { 'price' => $item['price'], 'tax' => $item['tax'], 'quantity' => $item['quantity'], - 'total' => $item['total'] + 'total' => $item['total'], ]); }); @@ -228,12 +228,12 @@ test('create taxes', function () { $taxes = []; $tax = Tax::factory()->raw([ - 'invoice_id' => $invoice->id + 'invoice_id' => $invoice->id, ]); array_push($taxes, $tax); - $request = new Request; + $request = new Request(); $request->replace(['taxes' => $taxes ]); diff --git a/tests/Unit/ItemTest.php b/tests/Unit/ItemTest.php index afde0982..75a8bc12 100644 --- a/tests/Unit/ItemTest.php +++ b/tests/Unit/ItemTest.php @@ -1,11 +1,11 @@ has(InvoiceItem::factory()->count(5)->state([ - 'invoice_id' => Invoice::factory() + 'invoice_id' => Invoice::factory(), ]))->create(); $this->assertCount(5, $item->invoiceItems); @@ -52,7 +52,7 @@ test('an item has many estimate items', function () { $item = Item::factory()->has(EstimateItem::factory() ->count(5) ->state([ - 'estimate_id' => Estimate::factory() + 'estimate_id' => Estimate::factory(), ])) ->create(); diff --git a/tests/Unit/PaymentMethodTest.php b/tests/Unit/PaymentMethodTest.php index 0fa20496..29c14af9 100644 --- a/tests/Unit/PaymentMethodTest.php +++ b/tests/Unit/PaymentMethodTest.php @@ -1,7 +1,7 @@ getPaymentPrefixAttribute(); - $this->assertEquals($prefix_attribute.'-'.$num_attribute , $payment['payment_number']); + $this->assertEquals($prefix_attribute.'-'.$num_attribute, $payment['payment_number']); }); test('get payment prefix attribute', function () { @@ -57,7 +57,7 @@ test('get payment prefix attribute', function () { $prefix_attribute = $payment->getPaymentPrefixAttribute(); - $this->assertEquals($prefix_attribute.'-'.$num_attribute , $payment['payment_number']); + $this->assertEquals($prefix_attribute.'-'.$num_attribute, $payment['payment_number']); }); test('get next payment number', function () { @@ -69,6 +69,5 @@ test('get next payment number', function () { $payment2 = Payment::factory()->create(); - $this->assertEquals($prefix_attribute.'-'.$next_payment_number , $payment2['payment_number']); + $this->assertEquals($prefix_attribute.'-'.$next_payment_number, $payment2['payment_number']); }); - diff --git a/tests/Unit/Request/CustomFieldTest.php b/tests/Unit/Request/CustomFieldTest.php index ea83c0d4..65ff474c 100644 --- a/tests/Unit/Request/CustomFieldTest.php +++ b/tests/Unit/Request/CustomFieldTest.php @@ -3,9 +3,10 @@ use Crater\Http\Requests\CustomFieldRequest; test('custom field request validation rules', function () { - $request = new CustomFieldRequest; + $request = new CustomFieldRequest(); - $this->assertEquals([ + $this->assertEquals( + [ 'name' => 'required', 'label' => 'required', 'model_type' => 'required', @@ -20,7 +21,7 @@ test('custom field request validation rules', function () { }); test('custom field request authorize', function () { - $request = new CustomFieldRequest; + $request = new CustomFieldRequest(); $this->assertTrue($request->authorize()); }); diff --git a/tests/Unit/Request/CustomerTest.php b/tests/Unit/Request/CustomerTest.php index d8c78a48..e0c18247 100644 --- a/tests/Unit/Request/CustomerTest.php +++ b/tests/Unit/Request/CustomerTest.php @@ -3,57 +3,59 @@ use Crater\Http\Requests\CustomerRequest; test('customer request post validation rules', function () { - $request = new CustomerRequest; + $request = new CustomerRequest(); $request->setMethod('POST'); - $this->assertEquals([ + $this->assertEquals( + [ 'name' => [ - 'required' + 'required', ], 'addresses.*.address_street_1' => [ - 'max:255' + 'max:255', ], 'addresses.*.address_street_2' => [ - 'max:255' + 'max:255', ], 'email' => [ 'email', 'nullable', 'unique:users,email', - ] + ], ], $request->rules() ); }); test('customer request put validation rules', function () { - $request = new CustomerRequest; + $request = new CustomerRequest(); $request->setMethod('PUT'); - $this->assertEquals([ + $this->assertEquals( + [ 'name' => [ - 'required' + 'required', ], 'addresses.*.address_street_1' => [ - 'max:255' + 'max:255', ], 'addresses.*.address_street_2' => [ - 'max:255' + 'max:255', ], 'email' => [ 'email', 'nullable', 'unique:users,email', - ] + ], ], $request->rules() ); }); test('customer request authorize', function () { - $request = new CustomerRequest; + $request = new CustomerRequest(); $this->assertTrue($request->authorize()); }); diff --git a/tests/Unit/Request/EstimateTest.php b/tests/Unit/Request/EstimateTest.php index c80862ba..6b788854 100644 --- a/tests/Unit/Request/EstimateTest.php +++ b/tests/Unit/Request/EstimateTest.php @@ -1,63 +1,64 @@ assertEquals([ + $this->assertEquals( + [ 'estimate_date' => [ - 'required' + 'required', ], 'expiry_date' => [ - 'required' + 'required', ], 'user_id' => [ - 'required' + 'required', ], 'discount' => [ - 'required' + 'required', ], 'discount_val' => [ - 'required' + 'required', ], 'sub_total' => [ - 'required' + 'required', ], 'total' => [ - 'required' + 'required', ], 'tax' => [ - 'required' + 'required', ], 'estimate_template_id' => [ - 'required' + 'required', ], 'items' => [ 'required', - 'array' + 'array', ], 'items.*.description' => [ - 'max:255' + 'max:255', ], 'items.*' => [ 'required', - 'max:255' + 'max:255', ], 'items.*.name' => [ - 'required' + 'required', ], 'items.*.quantity' => [ - 'required' + 'required', ], 'items.*.price' => [ - 'required' + 'required', ], 'estimate_number' => [ 'required', - new UniqueNumber(Estimate::class) + new UniqueNumber(Estimate::class), ], ], $request->rules() @@ -65,7 +66,7 @@ test('estimate request validation rules', function () { }); test('estimate request authorize', function () { - $request = new EstimatesRequest; + $request = new EstimatesRequest(); $this->assertTrue($request->authorize()); }); diff --git a/tests/Unit/Request/ExpenseCategoryTest.php b/tests/Unit/Request/ExpenseCategoryTest.php index c68154b3..3eaa572e 100644 --- a/tests/Unit/Request/ExpenseCategoryTest.php +++ b/tests/Unit/Request/ExpenseCategoryTest.php @@ -3,22 +3,23 @@ use Crater\Http\Requests\ExpenseCategoryRequest; test('expense category request validation rules', function () { - $request = new ExpenseCategoryRequest; + $request = new ExpenseCategoryRequest(); - $this->assertEquals([ + $this->assertEquals( + [ 'name' => [ - 'required' + 'required', ], 'description' => [ - 'nullable' - ] + 'nullable', + ], ], $request->rules() ); }); test('expense category request authorize', function () { - $request = new ExpenseCategoryRequest; + $request = new ExpenseCategoryRequest(); $this->assertTrue($request->authorize()); }); diff --git a/tests/Unit/Request/ExpenseTest.php b/tests/Unit/Request/ExpenseTest.php index e8a7cd9b..4c1d5b05 100644 --- a/tests/Unit/Request/ExpenseTest.php +++ b/tests/Unit/Request/ExpenseTest.php @@ -3,31 +3,32 @@ use Crater\Http\Requests\ExpenseRequest; test('expense request validation rules', function () { - $request = new ExpenseRequest; + $request = new ExpenseRequest(); - $this->assertEquals([ + $this->assertEquals( + [ 'expense_date' => [ - 'required' + 'required', ], 'expense_category_id' => [ - 'required' + 'required', ], 'amount' => [ - 'required' + 'required', ], 'user_id' => [ - 'nullable' + 'nullable', ], 'notes' => [ - 'nullable' - ] + 'nullable', + ], ], $request->rules() ); }); test('expense request authorize', function () { - $request = new ExpenseRequest; + $request = new ExpenseRequest(); $this->assertTrue($request->authorize()); }); diff --git a/tests/Unit/Request/GetSettingsRequestTest.php b/tests/Unit/Request/GetSettingsRequestTest.php index f073c298..88f3e0d6 100644 --- a/tests/Unit/Request/GetSettingsRequestTest.php +++ b/tests/Unit/Request/GetSettingsRequestTest.php @@ -3,16 +3,17 @@ use Crater\Http\Requests\GetSettingsRequest; test('get settings request rules', function () { - $request = new GetSettingsRequest; + $request = new GetSettingsRequest(); - $this->assertEquals([ + $this->assertEquals( + [ 'settings' => [ - 'required' + 'required', ], 'settings.*' => [ 'required', - 'string' - ] + 'string', + ], ], $request->rules() ); @@ -20,7 +21,7 @@ test('get settings request rules', function () { test('get settings request authorize', function () { - $request = new GetSettingsRequest; + $request = new GetSettingsRequest(); $this->assertTrue($request->authorize()); }); diff --git a/tests/Unit/Request/InvoiceTest.php b/tests/Unit/Request/InvoiceTest.php index f0226ee0..26b6f03a 100644 --- a/tests/Unit/Request/InvoiceTest.php +++ b/tests/Unit/Request/InvoiceTest.php @@ -5,59 +5,60 @@ use Crater\Models\Invoice; use Crater\Rules\UniqueNumber; test('invoice request validation rules', function () { - $request = new InvoicesRequest; + $request = new InvoicesRequest(); - $this->assertEquals([ + $this->assertEquals( + [ 'invoice_date' => [ - 'required' + 'required', ], 'due_date' => [ - 'required' + 'required', ], 'user_id' => [ - 'required' + 'required', ], 'discount' => [ - 'required' + 'required', ], 'discount_val' => [ - 'required' + 'required', ], 'sub_total' => [ - 'required' + 'required', ], 'total' => [ - 'required' + 'required', ], 'tax' => [ - 'required' + 'required', ], 'invoice_template_id' => [ - 'required' + 'required', ], 'items' => [ 'required', - 'array' + 'array', ], 'items.*' => [ 'required', - 'max:255' + 'max:255', ], 'items.*.description' => [ - 'max:255' + 'max:255', ], 'items.*.name' => [ - 'required' + 'required', ], 'items.*.quantity' => [ - 'required' + 'required', ], 'items.*.price' => [ - 'required' + 'required', ], 'invoice_number' => [ 'required', - new UniqueNumber(Invoice::class) + new UniqueNumber(Invoice::class), ], ], $request->rules() @@ -65,7 +66,7 @@ test('invoice request validation rules', function () { }); test('invoices request authorize', function () { - $request = new InvoicesRequest; + $request = new InvoicesRequest(); $this->assertTrue($request->authorize()); }); diff --git a/tests/Unit/Request/ItemTest.php b/tests/Unit/Request/ItemTest.php index d44d5009..af1d34c9 100644 --- a/tests/Unit/Request/ItemTest.php +++ b/tests/Unit/Request/ItemTest.php @@ -3,28 +3,29 @@ use Crater\Http\Requests\ItemsRequest; test('items request validation rules', function () { - $request = new ItemsRequest; + $request = new ItemsRequest(); - $this->assertEquals([ + $this->assertEquals( + [ 'name' => [ - 'required' + 'required', ], 'price' => [ - 'required' + 'required', ], 'unit_id' => [ - 'nullable' + 'nullable', ], 'description' => [ - 'nullable' - ] + 'nullable', + ], ], $request->rules() ); }); test('item request authorize', function () { - $request = new ItemsRequest; + $request = new ItemsRequest(); $this->assertTrue($request->authorize()); }); diff --git a/tests/Unit/Request/PaymentMethodTest.php b/tests/Unit/Request/PaymentMethodTest.php index 9e35c61f..a034da46 100644 --- a/tests/Unit/Request/PaymentMethodTest.php +++ b/tests/Unit/Request/PaymentMethodTest.php @@ -3,20 +3,21 @@ use Crater\Http\Requests\PaymentMethodRequest; test('payment method request validation rules', function () { - $request = new PaymentMethodRequest; + $request = new PaymentMethodRequest(); - $this->assertEquals([ + $this->assertEquals( + [ 'name' => [ 'required', - 'unique:payment_methods,name' - ] + 'unique:payment_methods,name', + ], ], $request->rules() ); }); test('payment method request authorize', function () { - $request = new PaymentMethodRequest; + $request = new PaymentMethodRequest(); $this->assertTrue($request->authorize()); }); diff --git a/tests/Unit/Request/PaymentTest.php b/tests/Unit/Request/PaymentTest.php index 05c3095a..3e0a2fdc 100644 --- a/tests/Unit/Request/PaymentTest.php +++ b/tests/Unit/Request/PaymentTest.php @@ -5,21 +5,22 @@ use Crater\Models\Payment; use Crater\Rules\UniqueNumber; test('payment request validation rules', function () { - $request = new PaymentRequest; + $request = new PaymentRequest(); - $this->assertEquals([ + $this->assertEquals( + [ 'payment_date' => [ - 'required' + 'required', ], 'user_id' => [ - 'required' + 'required', ], 'amount' => [ - 'required' + 'required', ], 'payment_number' => [ 'required', - new UniqueNumber(Payment::class) + new UniqueNumber(Payment::class), ], 'invoice_id' => [ 'nullable', @@ -36,7 +37,7 @@ test('payment request validation rules', function () { }); test('payment request authorize', function () { - $request = new PaymentRequest; + $request = new PaymentRequest(); $this->assertTrue($request->authorize()); }); diff --git a/tests/Unit/Request/TaxTypeTest.php b/tests/Unit/Request/TaxTypeTest.php index 70b205aa..6d1a194f 100644 --- a/tests/Unit/Request/TaxTypeTest.php +++ b/tests/Unit/Request/TaxTypeTest.php @@ -3,24 +3,25 @@ use Crater\Http\Requests\TaxTypeRequest; test('tax type request validation rules', function () { - $request = new TaxTypeRequest; + $request = new TaxTypeRequest(); - $this->assertEquals([ + $this->assertEquals( + [ 'name' => [ - 'required' + 'required', ], 'percent' => [ - 'required' + 'required', ], 'description' => [ - 'nullable' + 'nullable', ], 'compound_tax' => [ - 'nullable' + 'nullable', ], 'collective_tax' => [ - 'nullable' - ] + 'nullable', + ], ], $request->rules() ); @@ -28,7 +29,7 @@ test('tax type request validation rules', function () { test('tax type request authorize', function () { - $request = new TaxTypeRequest; + $request = new TaxTypeRequest(); $this->assertTrue($request->authorize()); }); diff --git a/tests/Unit/Request/UnitTest.php b/tests/Unit/Request/UnitTest.php index 8bd93526..04746838 100644 --- a/tests/Unit/Request/UnitTest.php +++ b/tests/Unit/Request/UnitTest.php @@ -3,20 +3,21 @@ use Crater\Http\Requests\UnitRequest; test('unit request validation rules', function () { - $request = new UnitRequest; + $request = new UnitRequest(); - $this->assertEquals([ + $this->assertEquals( + [ 'name' => [ 'required', - 'unique:units,name' - ] + 'unique:units,name', + ], ], $request->rules() ); }); test('unit request authorize', function () { - $request = new UnitRequest; + $request = new UnitRequest(); $this->assertTrue($request->authorize()); }); diff --git a/tests/Unit/Request/UpdateSettingsRequestTest.php b/tests/Unit/Request/UpdateSettingsRequestTest.php index 2a58d3c5..777b3f2d 100644 --- a/tests/Unit/Request/UpdateSettingsRequestTest.php +++ b/tests/Unit/Request/UpdateSettingsRequestTest.php @@ -3,15 +3,16 @@ use Crater\Http\Requests\UpdateSettingsRequest; test('update settings request rules', function () { - $request = new UpdateSettingsRequest; + $request = new UpdateSettingsRequest(); - $this->assertEquals([ + $this->assertEquals( + [ 'settings' => [ - 'required' + 'required', ], 'settings.*' => [ - 'required' - ] + 'required', + ], ], $request->rules() ); @@ -19,7 +20,7 @@ test('update settings request rules', function () { test('update settings request authorize', function () { - $request = new UpdateSettingsRequest; + $request = new UpdateSettingsRequest(); $this->assertTrue($request->authorize()); }); diff --git a/tests/Unit/SettingTest.php b/tests/Unit/SettingTest.php index 74199803..115ba19f 100644 --- a/tests/Unit/SettingTest.php +++ b/tests/Unit/SettingTest.php @@ -1,7 +1,7 @@ for(InvoiceItem::factory()->state([ - 'invoice_id' => Invoice::factory() + 'invoice_id' => Invoice::factory(), ]))->create(); $this->assertTrue($tax->invoiceItem()->exists()); @@ -52,7 +52,7 @@ test('tax belongs to invoice item', function () { test('tax belongs to estimate item', function () { $tax = Tax::factory()->for(EstimateItem::factory()->state([ - 'estimate_id' => Estimate::factory() + 'estimate_id' => Estimate::factory(), ]))->create(); $this->assertTrue($tax->estimateItem()->exists()); diff --git a/tests/Unit/TaxTypeTest.php b/tests/Unit/TaxTypeTest.php index 0c647498..5bf33cd8 100644 --- a/tests/Unit/TaxTypeTest.php +++ b/tests/Unit/TaxTypeTest.php @@ -1,7 +1,7 @@ hasItems(5)->create(); $this->assertCount(5, $unit->items); diff --git a/tests/Unit/UserTest.php b/tests/Unit/UserTest.php index 6666a873..109bbdf9 100644 --- a/tests/Unit/UserTest.php +++ b/tests/Unit/UserTest.php @@ -1,7 +1,7 @@ raw([ - 'role' => 'customer' + 'role' => 'customer', ]); - $request = new Request; + $request = new Request(); $request->replace($customer); $response = User::createCustomer($request); - $this->assertDatabaseHas('users', [ + $this->assertDatabaseHas('users', [ 'name' => $customer['name'], 'email' => $customer['email'], - 'role' => $customer['role'] + 'role' => $customer['role'], ]); }); test('update customer', function () { $customer = User::factory()->create([ - 'role' => 'customer' + 'role' => 'customer', ]); $customer2 = User::factory()->raw([ - 'role' => 'customer' + 'role' => 'customer', ]); - $request = new Request; + $request = new Request(); $request->replace($customer2); @@ -121,6 +121,6 @@ test('update customer', function () { 'id' => $customer->id, 'name' => $customer2['name'], 'email' => $customer2['email'], - 'role' => $customer2['role'] + 'role' => $customer2['role'], ]); });