update v 1.0.7.5

This commit is contained in:
Sujit Prasad
2016-06-13 20:41:55 +05:30
parent aa9786d829
commit 283d97e3ea
5078 changed files with 339851 additions and 175995 deletions

View File

@@ -1,9 +1,9 @@
<?php
/*
* This file is part of Psy Shell
* This file is part of Psy Shell.
*
* (c) 2012-2014 Justin Hileman
* (c) 2012-2015 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -21,7 +21,7 @@ class BreakException extends \Exception implements Exception
/**
* {@inheritdoc}
*/
public function __construct($message = "", $code = 0, \Exception $previous = null)
public function __construct($message = '', $code = 0, \Exception $previous = null)
{
$this->rawMessage = $message;
parent::__construct(sprintf('Exit: %s', $message), $code, $previous);

View File

@@ -0,0 +1,20 @@
<?php
/*
* This file is part of Psy Shell.
*
* (c) 2012-2015 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Psy\Exception;
/**
* A DeprecatedException for Psy.
*/
class DeprecatedException extends RuntimeException
{
// This space intentionally left blank.
}

View File

@@ -1,9 +1,9 @@
<?php
/*
* This file is part of Psy Shell
* This file is part of Psy Shell.
*
* (c) 2012-2014 Justin Hileman
* (c) 2012-2015 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -28,12 +28,12 @@ class ErrorException extends \ErrorException implements Exception
* @param int $lineno (default: null)
* @param Exception $previous (default: null)
*/
public function __construct($message = "", $code = 0, $severity = 1, $filename = null, $lineno = null, $previous = null)
public function __construct($message = '', $code = 0, $severity = 1, $filename = null, $lineno = null, $previous = null)
{
$this->rawMessage = $message;
if (!empty($filename) && preg_match('{Psy[/\\\\]ExecutionLoop}', $filename)) {
$filename = null;
$filename = '';
}
switch ($severity) {
@@ -83,6 +83,6 @@ class ErrorException extends \ErrorException implements Exception
*/
public static function throwException($errno, $errstr, $errfile, $errline)
{
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
throw new self($errstr, 0, $errno, $errfile, $errline);
}
}

View File

@@ -1,9 +1,9 @@
<?php
/*
* This file is part of Psy Shell
* This file is part of Psy Shell.
*
* (c) 2012-2014 Justin Hileman
* (c) 2012-2015 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.

View File

@@ -1,9 +1,9 @@
<?php
/*
* This file is part of Psy Shell
* This file is part of Psy Shell.
*
* (c) 2012-2014 Justin Hileman
* (c) 2012-2015 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -28,7 +28,7 @@ class FatalErrorException extends \ErrorException implements Exception
* @param int $lineno (default: null)
* @param \Exception $previous (default: null)
*/
public function __construct($message = "", $code = 0, $severity = 9000, $filename = null, $lineno = null, $previous = null)
public function __construct($message = '', $code = 0, $severity = 9000, $filename = null, $lineno = null, $previous = null)
{
$this->rawMessage = $message;
$message = sprintf('PHP Fatal error: %s in %s on line %d', $message, $filename ?: "eval()'d code", $lineno);

View File

@@ -1,9 +1,9 @@
<?php
/*
* This file is part of Psy Shell
* This file is part of Psy Shell.
*
* (c) 2012-2014 Justin Hileman
* (c) 2012-2015 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -22,7 +22,7 @@ class ParseErrorException extends \PhpParser\Error implements Exception
* @param string $message (default: "")
* @param int $line (default: -1)
*/
public function __construct($message = "", $line = -1)
public function __construct($message = '', $line = -1)
{
$message = sprintf('PHP Parse error: %s', $message);
parent::__construct($message, $line);

View File

@@ -1,9 +1,9 @@
<?php
/*
* This file is part of Psy Shell
* This file is part of Psy Shell.
*
* (c) 2012-2014 Justin Hileman
* (c) 2012-2015 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -25,7 +25,7 @@ class RuntimeException extends \RuntimeException implements Exception
* @param int $code (default: 0)
* @param \Exception $previous (default: null)
*/
public function __construct($message = "", $code = 0, \Exception $previous = null)
public function __construct($message = '', $code = 0, \Exception $previous = null)
{
$this->rawMessage = $message;
parent::__construct($message, $code, $previous);

View File

@@ -1,9 +1,9 @@
<?php
/*
* This file is part of Psy Shell
* This file is part of Psy Shell.
*
* (c) 2012-2014 Justin Hileman
* (c) 2012-2015 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.

View File

@@ -0,0 +1,55 @@
<?php
/*
* This file is part of Psy Shell.
*
* (c) 2012-2015 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Psy\Exception;
/**
* A "type error" Exception for Psy.
*/
class TypeErrorException extends \Exception implements Exception
{
private $rawMessage;
/**
* Constructor!
*
* @param string $message (default: "")
* @param int $code (default: 0)
*/
public function __construct($message = '', $code = 0)
{
$this->rawMessage = $message;
$message = preg_replace('/, called in .*?: eval\\(\\)\'d code/', '', $message);
parent::__construct(sprintf('TypeError: %s', $message), $code);
}
/**
* Get the raw (unformatted) message for this error.
*
* @return string
*/
public function getRawMessage()
{
return $this->rawMessage;
}
/**
* Create a TypeErrorException from a TypeError.
*
* @param \TypeError $e
*
* @return TypeErrorException
*/
public static function fromTypeError(\TypeError $e)
{
return new self($e->getMessage(), $e->getLine());
}
}