Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1 from DeimosProject/dev
Browse files Browse the repository at this point in the history
Global Upgrade
rez1dent3 authored Apr 7, 2017
2 parents d6b1a61 + 4195323 commit f2a4132
Showing 18 changed files with 48 additions and 397 deletions.
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
build:
environment:
php:
version: 5.6
version: 7.0.8
tests:
override:
-
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: php
php:
- '5.6'
- '7.0'
- '7.1'
- nightly
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"deimos/helper": "~1.0"
},
"require-dev": {
"deimos/router": "~0.0",
"deimos/router": "~1.0",
"phpunit/phpunit": "5.7.5"
},
"autoload": {
33 changes: 0 additions & 33 deletions src/Request/Adapter/Data.php
Original file line number Diff line number Diff line change
@@ -15,33 +15,12 @@
* @method string dataURL(string $path = null, mixed $default = '', bool $strip = true)
* @method mixed dataUnsafe(string $path = null, mixed $default = '')
* @method double dataBetween(string $path = null, double $min, double $max)
*
* @method int postInt(string $path = null, mixed $default = 0, bool $strip = true)
* @method float postFloat(string $path = null, mixed $default = 0.0, bool $strip = true)
* @method bool postBool(string $path = null, mixed $default = false, bool $strip = true)
* @method string postEmail(string $path = null, mixed $default = '', bool $strip = true)
* @method string postIP(string $path = null, mixed $default = '', bool $strip = true)
* @method string postURL(string $path = null, mixed $default = '', bool $strip = true)
* @method mixed postUnsafe(string $path = null, mixed $default = '')
* @method double postBetween(string $path = null, double $min, double $max)
*/
trait Data
{

private $dataData;

/**
* @param string $path
* @param mixed $default
* @param bool $strip
*
* @return mixed
*/
public function post($path = null, $default = null, $strip = true)
{
return $this->data($path, $default, $strip);
}

/**
* @param string $path
* @param mixed $default
@@ -67,18 +46,6 @@ private function dataData()
return $this->dataData;
}

/**
* @param string $path
* @param bool $strip
*
* @return mixed
* @throws \Deimos\Helper\Exceptions\ExceptionEmpty
*/
public function postRequired($path, $strip = true)
{
return $this->dataRequired($path, $strip);
}

/**
* @param string $path
* @param bool $strip
130 changes: 0 additions & 130 deletions src/Request/Adapter/Other.php

This file was deleted.

34 changes: 0 additions & 34 deletions src/Request/Adapter/Query.php
Original file line number Diff line number Diff line change
@@ -15,15 +15,6 @@
* @method string queryURL(string $path = null, mixed $default = '', bool $strip = true)
* @method mixed queryUnsafe(string $path = null, mixed $default = '')
* @method double queryBetween(string $path = null, double $min, double $max)
*
* @method int getInt(string $path = null, mixed $default = 0, bool $strip = true)
* @method float getFloat(string $path = null, mixed $default = 0.0, bool $strip = true)
* @method bool getBool(string $path = null, mixed $default = false, bool $strip = true)
* @method string getEmail(string $path = null, mixed $default = '', bool $strip = true)
* @method string getIP(string $path = null, mixed $default = '', bool $strip = true)
* @method string getURL(string $path = null, mixed $default = '', bool $strip = true)
* @method mixed getUnsafe(string $path = null, mixed $default = '')
* @method double getBetween(string $path = null, double $min, double $max)
*/
trait Query
{
@@ -33,18 +24,6 @@ trait Query
*/
private $queryData;

/**
* @param string $path
* @param mixed $default
* @param bool $strip
*
* @return mixed
*/
public function get($path = null, $default = null, $strip = true)
{
return $this->query($path, $default, $strip);
}

/**
* @param string $path
* @param mixed $default
@@ -70,19 +49,6 @@ private function queryData()
return $this->queryData;
}

/**
* @param string $path
* @param bool $strip
*
* @return mixed
*
* @throws \Deimos\Helper\Exceptions\ExceptionEmpty
*/
public function getRequired($path = null, $strip = true)
{
return $this->queryRequired($path, $strip);
}

/**
* @param string $path
* @param bool $strip
65 changes: 0 additions & 65 deletions src/Request/Adapter/Request.php

This file was deleted.

19 changes: 9 additions & 10 deletions src/Request/Adapter/Router.php
Original file line number Diff line number Diff line change
@@ -22,12 +22,12 @@ trait Router
/**
* @var \Deimos\Router\Router
*/
private $router;
protected $router;

/**
* @var \Deimos\Router\Route
*/
private $route;
protected $route;

/**
* @param \Deimos\Router\Router $router
@@ -43,7 +43,7 @@ public function setRouter(\Deimos\Router\Router $router)
*
* @return mixed
*
* @throws \InvalidArgumentException
* @throws \Deimos\Router\Exceptions\NotFound
*/
public function attribute($path = null, $default = null)
{
@@ -53,26 +53,25 @@ public function attribute($path = null, $default = null)
/**
* @return array
*
* @throws \InvalidArgumentException
* @throws \Deimos\Router\Exceptions\NotFound
*/
public function attributes()
{
return $this->route()->attributes();
return $this->route()->getAttributes();
}

/**
* @return \Deimos\Router\Route
*
* @throws \InvalidArgumentException
* @return \Deimos\Router\Route
* @throws \Deimos\Router\Exceptions\NotFound
*/
public function route()
{
if (!$this->route)
{
$path = $this->urlPath();
$this->router->setMethod($this->method());

$this->route = $this->router->getCurrentRoute($path);
$this->route = $this->router
->getRoute($this->urlPath(), $this->domain(), $this->scheme());
}

return $this->route;
Loading

0 comments on commit f2a4132

Please sign in to comment.