diff --git a/.styleci.yml b/.styleci.yml new file mode 100644 index 0000000..8fc4ba8 --- /dev/null +++ b/.styleci.yml @@ -0,0 +1,65 @@ +preset: none +enabled: + - array_element_white_space_after_comma + - blankline_after_open_tag + - braces + - concat_without_spaces + - double_arrow_multiline_whitespaces + - duplicate_semicolon + - elseif + - empty_return + - encoding + - eof_ending + - function_call_space + - function_declaration + - include + - indentation + - join_function + - line_after_namespace + - linefeed + - list_commas + - logical_not_operators_with_successor_space + - short_array_syntax + - lowercase_constants + - lowercase_keywords + - method_argument_space + - multiline_array_trailing_comma + - multiline_spaces_before_semicolon + - multiple_use + - namespace_no_leading_whitespace + - no_blank_lines_after_class_opening + - no_empty_lines_after_phpdocs + - no_extra_consecutive_blank_lines + - object_operator + - operators_spaces + - ordered_use + - parenthesis + - phpdoc_indent + - phpdoc_inline_tag + - phpdoc_no_access + - phpdoc_no_package + - phpdoc_scalar + - phpdoc_short_description + - phpdoc_to_comment + - phpdoc_trim + - phpdoc_type_to_var + - phpdoc_var_without_name + - remove_leading_slash_use + - return + - self_accessor + - short_echo_tag + - short_tag + - single_array_no_trailing_comma + - single_blank_line_before_namespace + - single_line_after_imports + - single_quote + - spaces_before_semicolon + - spaces_cast + - standardize_not_equal + - ternary_spaces + - trailing_spaces + - trim_array_spaces + - unalign_equals + - unary_operators_spaces + - visibility + - whitespacy_lines \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index f60bbe0..159eb61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,10 @@ language: php php: - - 5.4 - 5.5 - 5.6 - - hhvm + - 7.0 + - 7.1 before_script: - travis_retry composer self-update diff --git a/LICENSE b/LICENSE index 23f2457..ae84a9d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 Mark Beech +Copyright (c) 2017 Mark Beech Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 0188895..cce5418 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,21 @@ Laravel Crawler Detect ======= [![Build Status](https://img.shields.io/travis/JayBizzle/Laravel-Crawler-Detect/master.svg?style=flat-square)](https://travis-ci.org/JayBizzle/Laravel-Crawler-Detect) [![Total Downloads](https://img.shields.io/packagist/dt/JayBizzle/Laravel-Crawler-Detect.svg?style=flat-square)](https://packagist.org/packages/jaybizzle/laravel-crawler-detect) -[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/JayBizzle/Laravel-Crawler-Detect.svg?style=flat-square)](https://scrutinizer-ci.com/g/JayBizzle/Laravel-Crawler-Detect/?branch=master) [![Laravel](https://img.shields.io/badge/laravel-5.*-ff69b4.svg?style=flat-square)](https://laravel.com) [![StyleCI](https://styleci.io/repos/32484055/shield)](https://styleci.io/repos/32484055) +[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/JayBizzle/Laravel-Crawler-Detect.svg?style=flat-square)](https://scrutinizer-ci.com/g/JayBizzle/Laravel-Crawler-Detect/?branch=master) [![StyleCI](https://styleci.io/repos/32484055/shield)](https://styleci.io/repos/32484055) -A Laravel 4/5 wrapper for [CrawlerDetect](https://github.com/JayBizzle/Crawler-Detect) - the web crawler detection library +A Laravel wrapper for [CrawlerDetect](https://github.com/JayBizzle/Crawler-Detect) - the web crawler detection library Installation ============ -Run `composer require jaybizzle/laravel-crawler-detect 1.*` or add `"jaybizzle/laravel-crawler-detect": "1.*"` to your `composer.json` file +Run `composer require jaybizzle/laravel-crawler-detect 1.*` or add `"jaybizzle/laravel-crawler-detect": "1.*"` to your `composer.json` file. + +The last version compatible with Laravel 4 was [v1.0.2](https://github.com/JayBizzle/Laravel-Crawler-Detect/tree/v1.0.2) so if you need that, you will have to fix your `composer.json` to that specific version. Add the following to the `providers` array in your `config/app.php` file.. ```PHP - 'Jaybizzle\LaravelCrawlerDetect\LaravelCrawlerDetectServiceProvider', + Jaybizzle\LaravelCrawlerDetect\LaravelCrawlerDetectServiceProvider::class, ``` ...and the following to your `aliases` array... diff --git a/composer.json b/composer.json index 19e85b5..5c335f8 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "jaybizzle/crawler-detect": "1.*" }, "require-dev": { - "orchestra/testbench": "3.0.*" + "orchestra/testbench": "3.1.*" }, "autoload": { "psr-4": { diff --git a/src/Facades/LaravelCrawlerDetect.php b/src/Facades/LaravelCrawlerDetect.php index 03cc610..1f37e3f 100644 --- a/src/Facades/LaravelCrawlerDetect.php +++ b/src/Facades/LaravelCrawlerDetect.php @@ -7,12 +7,12 @@ class LaravelCrawlerDetect extends Facade { /** - * Get the registered name of the component. - * - * @return string - */ - protected static function getFacadeAccessor() - { - return 'LaravelCrawlerDetect'; - } + * Get the registered name of the component. + * + * @return string + */ + protected static function getFacadeAccessor() + { + return 'LaravelCrawlerDetect'; + } } diff --git a/src/LaravelCrawlerDetectServiceProvider.php b/src/LaravelCrawlerDetectServiceProvider.php index 29a3bfb..579185a 100644 --- a/src/LaravelCrawlerDetectServiceProvider.php +++ b/src/LaravelCrawlerDetectServiceProvider.php @@ -30,7 +30,7 @@ public function boot() */ public function register() { - $this->app['LaravelCrawlerDetect'] = $this->app->share(function ($app) { + $this->app->singleton('LaravelCrawlerDetect', function ($app) { return new \Jaybizzle\CrawlerDetect\CrawlerDetect(); }); } diff --git a/tests/.gitkeep b/tests/.gitkeep deleted file mode 100644 index e69de29..0000000