Skip to content

Commit

Permalink
Merge pull request #12 from ARCANEDEV/patch-1
Browse files Browse the repository at this point in the history
Cleaning the package
  • Loading branch information
arcanedev-maroc authored Sep 6, 2017
2 parents 0f3f6d9 + 98a927e commit 5694f4d
Show file tree
Hide file tree
Showing 83 changed files with 620 additions and 475 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
.gitignore export-ignore
.scrutinizer.yml export-ignore
.travis.yml export-ignore
phpunit.xml export-ignore
phpunit.xml.dist export-ignore
CONTRIBUTING.md export-ignore
11 changes: 2 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@
}
},
"scripts": {
"testbench": "composer require --dev \"orchestra/testbench-browser-kit=~3.0\" \"orchestra/database=~3.0\""
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"minimum-stability": "dev",
"prefer-stable" : true
"testbench": "composer require --dev \"orchestra/testbench-browser-kit=~3.4.0\" \"orchestra/database=~3.4.0\""
}
}
43 changes: 27 additions & 16 deletions config/laravel-tracker.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,30 @@
use Arcanedev\LaravelTracker\Support\BindingManager;

return [
/* ------------------------------------------------------------------------------------------------

/* -----------------------------------------------------------------
| Enabled
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

'enabled' => false,

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Database
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

'database' => [
'connection' => null,

'prefix' => 'tracker_',
],

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Models
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

'models' => [
BindingManager::MODEL_AGENT => Models\Agent::class,
BindingManager::MODEL_COOKIE => Models\Cookie::class,
Expand All @@ -44,11 +48,13 @@
BindingManager::MODEL_VISITOR_ACTIVITY => Models\VisitorActivity::class,
],

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Tracking
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

'tracking' => [
'console' => false,
'cookies' => true,
'devices' => true,
'errors' => true,
Expand All @@ -61,10 +67,11 @@
'user-agents' => true,
],

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Auth
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

'auth' => [
'bindings' => ['auth'],

Expand All @@ -79,10 +86,11 @@
],
],

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Cookie
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

'cookie' => [
/**
* A cookie may be created on your visitor device, so you can have
Expand All @@ -91,18 +99,20 @@
'name' => null
],

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Session
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

'session' => [
'name' => 'tracker_session'
],

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Routes
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

'routes' => [
'ignore' => [
'names' => [
Expand All @@ -115,4 +125,5 @@

'model-columns' => ['id'],
],

];
File renamed without changes.
5 changes: 3 additions & 2 deletions src/Bases/Migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
*/
abstract class Migration extends BaseMigration
{
/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Constructor
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/**
* Migration constructor.
*/
Expand Down
12 changes: 7 additions & 5 deletions src/Console/PublishCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
*/
class PublishCommand extends Command
{
/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Properties
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/**
* The name and signature of the console command.
*
Expand All @@ -28,10 +29,11 @@ class PublishCommand extends Command
*/
protected $description = 'Publish the Laravel Tracker config, migrations...';

/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/

/**
* Execute the console command.
*/
Expand Down
7 changes: 4 additions & 3 deletions src/Contracts/Detectors/CrawlerDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
*/
interface CrawlerDetector
{
/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/

/**
* Check if current request is from a bot.
*
Expand Down
7 changes: 4 additions & 3 deletions src/Contracts/Detectors/DeviceDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
*/
interface DeviceDetector
{
/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/

/**
* Detect kind, model and mobility.
*
Expand Down
7 changes: 4 additions & 3 deletions src/Contracts/Detectors/GeoIpDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
*/
interface GeoIpDetector
{
/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/

/**
* Get the geoip data.
*
Expand Down
7 changes: 4 additions & 3 deletions src/Contracts/Detectors/LanguageDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
*/
interface LanguageDetector
{
/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/

/**
* Detect preference and language-range.
*
Expand Down
12 changes: 7 additions & 5 deletions src/Contracts/Models/Device.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@
*/
interface Device
{
/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Constants
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

const KIND_COMPUTER = 'computer';
const KIND_PHONE = 'phone';
const KIND_TABLET = 'tablet';
const KIND_UNAVAILABLE = 'unavailable';

/* ------------------------------------------------------------------------------------------------
| Check Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Check Methods
| -----------------------------------------------------------------
*/

/**
* Is this a computer?
*
Expand Down
5 changes: 3 additions & 2 deletions src/Contracts/Models/Domain.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
*/
interface Domain
{
/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Relationships
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/**
* Referer relationship.
*
Expand Down
5 changes: 3 additions & 2 deletions src/Contracts/Models/Referer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
*/
interface Referer
{
/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Relationships
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/**
* Domain relationship.
*
Expand Down
5 changes: 3 additions & 2 deletions src/Contracts/Models/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
*/
interface Route
{
/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Relationships
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/**
* Paths relationship.
*
Expand Down
5 changes: 3 additions & 2 deletions src/Contracts/Models/RoutePath.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
*/
interface RoutePath
{
/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Relationships
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/**
* Route relationship.
*
Expand Down
12 changes: 7 additions & 5 deletions src/Contracts/Models/Visitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
*/
interface Visitor
{
/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Relationships
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/**
* User relationship.
*
Expand Down Expand Up @@ -76,10 +77,11 @@ public function language();
*/
public function activities();

/* ------------------------------------------------------------------------------------------------
| Check Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Check Methods
| -----------------------------------------------------------------
*/

/**
* Check if the user exists.
*
Expand Down
12 changes: 7 additions & 5 deletions src/Contracts/Models/VisitorActivity.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
*/
interface VisitorActivity
{
/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Relationships
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/**
* Visitor relationship.
*
Expand Down Expand Up @@ -53,10 +54,11 @@ public function referrer();
*/
public function error();

/* ------------------------------------------------------------------------------------------------
| Check Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Check Methods
| -----------------------------------------------------------------
*/

/**
* Check if the referer exists.
*
Expand Down
Loading

0 comments on commit 5694f4d

Please sign in to comment.