Skip to content

Commit

Permalink
Merge pull request #6 from JayBizzle/laravel_54
Browse files Browse the repository at this point in the history
Laravel 5.4
  • Loading branch information
JayBizzle authored Jan 25, 2017
2 parents 331877b + 1e4e1f3 commit 4d77b0b
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 17 deletions.
65 changes: 65 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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...
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"jaybizzle/crawler-detect": "1.*"
},
"require-dev": {
"orchestra/testbench": "3.0.*"
"orchestra/testbench": "3.1.*"
},
"autoload": {
"psr-4": {
Expand Down
16 changes: 8 additions & 8 deletions src/Facades/LaravelCrawlerDetect.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
}
2 changes: 1 addition & 1 deletion src/LaravelCrawlerDetectServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
}
Expand Down
Empty file removed tests/.gitkeep
Empty file.

0 comments on commit 4d77b0b

Please sign in to comment.