Skip to content

Commit

Permalink
[#13907] - Changing internal to private to check the Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Mar 22, 2019
1 parent 979d240 commit c5f8b49
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
20 changes: 10 additions & 10 deletions phalcon/http/message/request.zep
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ class Request implements RequestInterface
*
* @see http://tools.ietf.org/html/rfc7230#section-3.2
*/
internal function checkHeaderName(var name) -> void
private function checkHeaderName(var name) -> void
{
if typeof name !== "string" || !preg_match("/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/", name) {
throw new \InvalidArgumentException("Invalid header name " . name);
Expand Down Expand Up @@ -476,7 +476,7 @@ class Request implements RequestInterface
*
* @see https://tools.ietf.org/html/rfc7230#section-3.2.6
*/
internal function checkHeaderValue(var value) -> void
private function checkHeaderValue(var value) -> void
{
if typeof value !== "string" && typeof value !== "int" && typeof value !== "float" {
throw new \InvalidArgumentException("Invalid header value");
Expand All @@ -493,7 +493,7 @@ class Request implements RequestInterface
/**
* Returns a new instance having set the parameter
*/
internal function cloneInstance(var element, string property) -> <Request>
private function cloneInstance(var element, string property) -> <Request>
{
var newInstance;

Expand All @@ -508,7 +508,7 @@ class Request implements RequestInterface
/**
* Returns the header values checked for validity
*/
internal function getHeaderValue(var values) -> array
private function getHeaderValue(var values) -> array
{
var value;
array valueData;
Expand All @@ -535,7 +535,7 @@ class Request implements RequestInterface
/**
* Return the host and if applicable the port
*/
internal function getUriHost(<UriInterface> uri) -> string
private function getUriHost(<UriInterface> uri) -> string
{
var host;

Expand All @@ -550,7 +550,7 @@ class Request implements RequestInterface
/**
* Set a valid stream
*/
internal function processBody(var body = "php://memory", string mode = "r+b") -> <StreamInterface>
private function processBody(var body = "php://memory", string mode = "r+b") -> <StreamInterface>
{
if body instanceof StreamInterface {
return body;
Expand All @@ -566,7 +566,7 @@ class Request implements RequestInterface
/**
* Sets the headers
*/
internal function processHeaders(var headers) -> <Collection>
private function processHeaders(var headers) -> <Collection>
{
var collection, host, name, value;

Expand Down Expand Up @@ -603,7 +603,7 @@ class Request implements RequestInterface
/**
* Check the method
*/
internal function processMethod(var method = "") -> string
private function processMethod(var method = "") -> string
{
array methods;

Expand All @@ -629,7 +629,7 @@ class Request implements RequestInterface
/**
* Checks the protocol
*/
internal function processProtocol(var protocol = "") -> string
private function processProtocol(var protocol = "") -> string
{
array protocols;

Expand All @@ -654,7 +654,7 @@ class Request implements RequestInterface
/**
* Sets a valid Uri
*/
internal function processUri(var uri) -> <UriInterface>
private function processUri(var uri) -> <UriInterface>
{
var localUri;

Expand Down
16 changes: 8 additions & 8 deletions phalcon/http/message/response.zep
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ class Response implements ResponseInterface
*
* @see http://tools.ietf.org/html/rfc7230#section-3.2
*/
internal function checkHeaderName(var name) -> void
private function checkHeaderName(var name) -> void
{
if typeof name !== "string" || !preg_match("/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/", name) {
throw new \InvalidArgumentException("Invalid header name " . name);
Expand Down Expand Up @@ -364,7 +364,7 @@ class Response implements ResponseInterface
* except where necessary to quote parentheses ["(" and ")"] and
* backslash octets occurring within that comment.
*/
internal function checkHeaderValue(var value) -> void
private function checkHeaderValue(var value) -> void
{
if typeof value !== "string" && typeof value !== "int" && typeof value !== "float" {
throw new \InvalidArgumentException("Invalid header value");
Expand All @@ -381,7 +381,7 @@ class Response implements ResponseInterface
/**
* Returns a new instance having set the parameter
*/
internal function cloneInstance(var element, string property) -> <Response>
private function cloneInstance(var element, string property) -> <Response>
{
var newInstance;

Expand All @@ -396,7 +396,7 @@ class Response implements ResponseInterface
/**
* Returns the header values checked for validity
*/
internal function getHeaderValue(var values) -> array
private function getHeaderValue(var values) -> array
{
var value;
array valueData;
Expand All @@ -423,7 +423,7 @@ class Response implements ResponseInterface
/**
* Returns the list of status codes available
*/
internal function getPhrases() -> array
private function getPhrases() -> array
{
return [
100 : "Continue", // Information - RFC 7231, 6.2.1
Expand Down Expand Up @@ -523,7 +523,7 @@ class Response implements ResponseInterface
/**
* Set a valid stream
*/
internal function processBody(var body = "php://memory", string mode = "r+b") -> <StreamInterface>
private function processBody(var body = "php://memory", string mode = "r+b") -> <StreamInterface>
{
if body instanceof StreamInterface {
return body;
Expand Down Expand Up @@ -569,7 +569,7 @@ class Response implements ResponseInterface
/**
* Sets the headers
*/
internal function processHeaders(array headers) -> <Collection>
private function processHeaders(array headers) -> <Collection>
{
var collection, name, value;

Expand All @@ -590,7 +590,7 @@ class Response implements ResponseInterface
/**
* Checks the protocol
*/
internal function processProtocol(var protocol = "") -> string
private function processProtocol(var protocol = "") -> string
{
array protocols;

Expand Down
24 changes: 12 additions & 12 deletions phalcon/http/message/serverrequest.zep
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ class ServerRequest implements ServerRequestInterface
*
* @see http://tools.ietf.org/html/rfc7230#section-3.2
*/
internal function checkHeaderName(var name) -> void
private function checkHeaderName(var name) -> void
{
if typeof name !== "string" || !preg_match("/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/", name) {
throw new \InvalidArgumentException("Invalid header name " . name);
Expand Down Expand Up @@ -749,7 +749,7 @@ class ServerRequest implements ServerRequestInterface
*
* @see https://tools.ietf.org/html/rfc7230#section-3.2.6
*/
internal function checkHeaderValue(var value) -> void
private function checkHeaderValue(var value) -> void
{
if typeof value !== "string" && typeof value !== "int" && typeof value !== "float" {
throw new \InvalidArgumentException("Invalid header value");
Expand All @@ -766,7 +766,7 @@ class ServerRequest implements ServerRequestInterface
/**
* Checks the uploaded files
*/
internal function checkUploadedFiles(array files) -> void
private function checkUploadedFiles(array files) -> void
{
var file;

Expand All @@ -785,7 +785,7 @@ class ServerRequest implements ServerRequestInterface
/**
* Returns a new instance having set the parameter
*/
internal function cloneInstance(var element, string property) -> <ServerRequest>
private function cloneInstance(var element, string property) -> <ServerRequest>
{
var newInstance;

Expand All @@ -800,7 +800,7 @@ class ServerRequest implements ServerRequestInterface
/**
* Returns the header values checked for validity
*/
internal function getHeaderValue(var values) -> array
private function getHeaderValue(var values) -> array
{
var value;
array valueData;
Expand All @@ -827,7 +827,7 @@ class ServerRequest implements ServerRequestInterface
/**
* Return the host and if applicable the port
*/
internal function getUriHost(<UriInterface> uri) -> string
private function getUriHost(<UriInterface> uri) -> string
{
var host;

Expand All @@ -842,7 +842,7 @@ class ServerRequest implements ServerRequestInterface
/**
* Set a valid stream
*/
internal function processBody(var body = "php://memory", string mode = "r+b") -> <StreamInterface>
private function processBody(var body = "php://memory", string mode = "r+b") -> <StreamInterface>
{
if body instanceof StreamInterface {
return body;
Expand All @@ -858,7 +858,7 @@ class ServerRequest implements ServerRequestInterface
/**
* Sets the headers
*/
internal function processHeaders(var headers) -> <Collection>
private function processHeaders(var headers) -> <Collection>
{
var collection, host, name, value;

Expand All @@ -884,7 +884,7 @@ class ServerRequest implements ServerRequestInterface
let collection = headers;
} else {
throw new \InvalidArgumentException(
"Headers needs to be either an array or instance of Phalcon\Collection"
"Headers need to be either an array or instance of Phalcon\Collection"
);
}
}
Expand All @@ -895,7 +895,7 @@ class ServerRequest implements ServerRequestInterface
/**
* Check the method
*/
internal function processMethod(var method = "") -> string
private function processMethod(var method = "") -> string
{
array methods;

Expand All @@ -921,7 +921,7 @@ class ServerRequest implements ServerRequestInterface
/**
* Checks the protocol
*/
internal function processProtocol(var protocol = "") -> string
private function processProtocol(var protocol = "") -> string
{
array protocols;

Expand All @@ -946,7 +946,7 @@ class ServerRequest implements ServerRequestInterface
/**
* Sets a valid Uri
*/
internal function processUri(var uri) -> <UriInterface>
private function processUri(var uri) -> <UriInterface>
{
var localUri;

Expand Down

0 comments on commit c5f8b49

Please sign in to comment.