aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2017-11-16 14:35:25 +0100
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2017-11-16 14:35:25 +0100
commita39ebc52732cb21c40d43ca2ce610072e5ef7695 (patch)
tree6fcbe508f37fe3a96db4fa1ee1acea4b215a5fc5
parent7ba00b4937dcf7c7cb50d8ddaa7aa25ffe0c2ef8 (diff)
downloadRegex-a39ebc52732cb21c40d43ca2ce610072e5ef7695.zip
Regex-a39ebc52732cb21c40d43ca2ce610072e5ef7695.tar.gz
Regex-a39ebc52732cb21c40d43ca2ce610072e5ef7695.tar.bz2
chore(php) Update to PHP 7.
-rw-r--r--Source/Exception.php5
-rw-r--r--Source/Grammar.pp3
-rw-r--r--Source/Visitor/Isotropic.php23
3 files changed, 8 insertions, 23 deletions
diff --git a/Source/Exception.php b/Source/Exception.php
index b217824..473e0ec 100644
--- a/Source/Exception.php
+++ b/Source/Exception.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
/**
* Hoa
*
@@ -42,9 +44,6 @@ use Hoa\Exception as HoaException;
* Class \Hoa\Regex\Exception.
*
* Extending the \Hoa\Exception\Exception class.
- *
- * @copyright Copyright © 2007-2017 Hoa community
- * @license New BSD License
*/
class Exception extends HoaException
{
diff --git a/Source/Grammar.pp b/Source/Grammar.pp
index 5157084..a0e4108 100644
--- a/Source/Grammar.pp
+++ b/Source/Grammar.pp
@@ -37,9 +37,6 @@
// parser. More informations at http://pcre.org/pcre.txt, sections pcrepattern &
// pcresyntax.
//
-// @copyright Copyright © 2007-2017 Hoa community.
-// @license New BSD License
-//
// Skip.
diff --git a/Source/Visitor/Isotropic.php b/Source/Visitor/Isotropic.php
index c74be18..f344be9 100644
--- a/Source/Visitor/Isotropic.php
+++ b/Source/Visitor/Isotropic.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
/**
* Hoa
*
@@ -45,16 +47,11 @@ use Hoa\Visitor;
* Class \Hoa\Regex\Visitor\Isotropic.
*
* Isotropic walk on the AST to generate a data.
- *
- * @copyright Copyright © 2007-2017 Hoa community
- * @license New BSD License
*/
class Isotropic implements Visitor\Visit
{
/**
- * Numeric-sampler.
- *
- * @var \Hoa\Math\Sampler
+ * Numeric-sampler, from `Hoa\Math\Sampler`.
*/
protected $_sampler = null;
@@ -62,8 +59,6 @@ class Isotropic implements Visitor\Visit
/**
* Initialize numeric-sampler.
- *
- * @param \Hoa\Math\Sampler $sampler Numeric-sampler.
*/
public function __construct(Math\Sampler $sampler)
{
@@ -74,17 +69,11 @@ class Isotropic implements Visitor\Visit
/**
* Visit an element.
- *
- * @param \Hoa\Visitor\Element $element Element to visit.
- * @param mixed &$handle Handle (reference).
- * @param mixed $eldnah Handle (not reference).
- * @return mixed
- * @throws \Hoa\Regex\Exception
*/
public function visit(
Visitor\Element $element,
&$handle = null,
- $eldnah = null
+ $eldnah = null
) {
switch ($element->getId()) {
case '#expression':
@@ -270,7 +259,7 @@ class Isotropic implements Visitor\Visit
Ustring::fromCode(0x00a0)
];
- return $h[$this->_sampler->getInteger(0, count($h) -1)];
+ return $h[$this->_sampler->getInteger(0, count($h) - 1)];
case 'v':
$v = [
@@ -280,7 +269,7 @@ class Isotropic implements Visitor\Visit
Ustring::fromCode(0x000d)
];
- return $v[$this->_sampler->getInteger(0, count($v) -1)];
+ return $v[$this->_sampler->getInteger(0, count($v) - 1)];
case 'w':
$w = array_merge(