Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'cs/remove-underscores' of https://github.com/arse/zf2 i…
Browse files Browse the repository at this point in the history
…nto feature/protected-underscores

Conflicts:
	library/Zend/Console/Getopt.php
  • Loading branch information
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 27 deletions.
10 changes: 5 additions & 5 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class Client implements Stdlib\DispatchableInterface
*
* @var resource
*/
protected static $_fileInfoDb = null;
protected static $fileInfoDb = null;

/**
* Constructor
Expand Down Expand Up @@ -1155,12 +1155,12 @@ protected function detectFileMimeType($file)

// First try with fileinfo functions
if (function_exists('finfo_open')) {
if (self::$_fileInfoDb === null) {
self::$_fileInfoDb = @finfo_open(FILEINFO_MIME);
if (self::$fileInfoDb === null) {
self::$fileInfoDb = @finfo_open(FILEINFO_MIME);
}

if (self::$_fileInfoDb) {
$type = finfo_file(self::$_fileInfoDb, $file);
if (self::$fileInfoDb) {
$type = finfo_file(self::$fileInfoDb, $file);
}

} elseif (function_exists('mime_content_type')) {
Expand Down
12 changes: 6 additions & 6 deletions src/Client/Adapter/Socket.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Socket implements HttpAdapter, StreamInterface
*
* @var resource
*/
protected $_context = null;
protected $context = null;

/**
* Adapter constructor, currently empty. Config is set using setOptions()
Expand Down Expand Up @@ -129,10 +129,10 @@ public function getConfig()
public function setStreamContext($context)
{
if (is_resource($context) && get_resource_type($context) == 'stream-context') {
$this->_context = $context;
$this->context = $context;

} elseif (is_array($context)) {
$this->_context = stream_context_create($context);
$this->context = stream_context_create($context);

} else {
// Invalid parameter
Expand All @@ -153,11 +153,11 @@ public function setStreamContext($context)
*/
public function getStreamContext()
{
if (! $this->_context) {
$this->_context = stream_context_create();
if (! $this->context) {
$this->context = stream_context_create();
}

return $this->_context;
return $this->context;
}

/**
Expand Down
8 changes: 4 additions & 4 deletions src/Client/Adapter/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Test implements AdapterInterface
*
* @var boolean
*/
protected $_nextRequestWillFail = false;
protected $nextRequestWillFail = false;

/**
* Adapter constructor, currently empty. Config is set using setOptions()
Expand All @@ -71,7 +71,7 @@ public function __construct()
*/
public function setNextRequestWillFail($flag)
{
$this->_nextRequestWillFail = (bool) $flag;
$this->nextRequestWillFail = (bool) $flag;

return $this;
}
Expand Down Expand Up @@ -110,8 +110,8 @@ public function setOptions($options = array())
*/
public function connect($host, $port = 80, $secure = false)
{
if ($this->_nextRequestWillFail) {
$this->_nextRequestWillFail = false;
if ($this->nextRequestWillFail) {
$this->nextRequestWillFail = false;
throw new Exception\RuntimeException('Request failed');
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/Client/Cookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class Cookies
*
* @var array
*/
protected $_rawCookies = array();
protected $rawCookies = array();

/**
* Construct
Expand Down Expand Up @@ -113,7 +113,7 @@ public function addCookie($cookie, $ref_uri = null)
$this->cookies[$domain][$path] = array();
}
$this->cookies[$domain][$path][$cookie->getName()] = $cookie;
$this->_rawCookies[] = $cookie;
$this->rawCookies[] = $cookie;
} else {
throw new Exception\InvalidArgumentException('Supplient argument is not a valid cookie string or object');
}
Expand Down Expand Up @@ -350,7 +350,7 @@ public static function fromResponse(Response $response, $ref_uri)
*/
public function count()
{
return count($this->_rawCookies);
return count($this->rawCookies);
}

/**
Expand All @@ -360,7 +360,7 @@ public function count()
*/
public function getIterator()
{
return new ArrayIterator($this->_rawCookies);
return new ArrayIterator($this->rawCookies);
}

/**
Expand All @@ -380,7 +380,7 @@ public function isEmpty()
*/
public function reset()
{
$this->cookies = $this->_rawCookies = array();
$this->cookies = $this->rawCookies = array();
return $this;
}

Expand Down
4 changes: 2 additions & 2 deletions test/Client/CommonHttpTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* adapters and configurations.
*
* Note that $this->baseuri must point to a directory on a web server
* containing all the files under the _files directory. You should symlink
* containing all the files under the files directory. You should symlink
* or copy these files and set 'baseuri' properly.
*
* You can also set the proper constant in your test configuration file to
Expand All @@ -40,7 +40,7 @@
abstract class CommonHttpTests extends \PHPUnit_Framework_TestCase
{
/**
* The bast URI for this test, containing all files in the _files directory
* The bast URI for this test, containing all files in the files directory
* Should be set in TestConfiguration.php or TestConfiguration.php.dist
*
* @var string
Expand Down
2 changes: 1 addition & 1 deletion test/Client/CurlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* adapters and configurations.
*
* Note that $this->baseuri must point to a directory on a web server
* containing all the files under the _files directory. You should symlink
* containing all the files under the files directory. You should symlink
* or copy these files and set 'baseuri' properly.
*
* You can also set the proper constand in your test configuration file to
Expand Down
2 changes: 1 addition & 1 deletion test/Client/SocketKeepaliveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* adapters and configurations.
*
* Note that $this->baseuri must point to a directory on a web server
* containing all the files under the _files directory. You should symlink
* containing all the files under the files directory. You should symlink
* or copy these files and set 'baseuri' properly.
*
* You can also set the proper constand in your test configuration file to
Expand Down
2 changes: 1 addition & 1 deletion test/Client/SocketPersistentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* adapters and configurations.
*
* Note that $this->baseuri must point to a directory on a web server
* containing all the files under the _files directory. You should symlink
* containing all the files under the files directory. You should symlink
* or copy these files and set 'baseuri' properly.
*
* You can also set the proper constand in your test configuration file to
Expand Down
2 changes: 1 addition & 1 deletion test/Client/SocketTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* adapters and configurations.
*
* Note that $this->baseuri must point to a directory on a web server
* containing all the files under the _files directory. You should symlink
* containing all the files under the files directory. You should symlink
* or copy these files and set 'baseuri' properly.
*
* You can also set the proper constant in your test configuration file to
Expand Down
2 changes: 1 addition & 1 deletion test/Client/UseCaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
class UseCaseTest extends \PHPUnit_Framework_TestCase
{
/**
* The bast URI for this test, containing all files in the _files directory
* The bast URI for this test, containing all files in the files directory
* Should be set in TestConfiguration.php or TestConfiguration.php.dist
*
* @var string
Expand Down

0 comments on commit a2ad2a5

Please sign in to comment.