Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSR-7 - Tests and refactoring #14154

Merged
merged 16 commits into from
Jun 3, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removed typos from the code - unecessary $ signs
  • Loading branch information
niden committed Jun 2, 2019
commit ed325f0bb9ce8d4c6d83cfff2675a5d3d153da81
8 changes: 4 additions & 4 deletions phalcon/Assets/Manager.zep
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Manager implements InjectionAwareInterface
* );
*</code>
*/
public function addAsset(<$Asset> asset) -> <Manager>
public function addAsset(<Asset> asset) -> <Manager>
{
/**
* Adds the asset by its type
Expand All @@ -83,7 +83,7 @@ class Manager implements InjectionAwareInterface
* );
*</code>
*/
public function addAssetByType(string! type, <$Asset> asset) -> <Manager>
public function addAssetByType(string! type, <Asset> asset) -> <Manager>
{
var collection;

Expand Down Expand Up @@ -234,11 +234,11 @@ class Manager implements InjectionAwareInterface

for asset in assets {
if asset->getType() == type {
let $filtered[] = asset;
let filtered[] = asset;
}
}

return $filtered;
return filtered;
}

/**
Expand Down
2 changes: 2 additions & 0 deletions phalcon/Collection/ReadCollection.zep
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

namespace Phalcon\Collection;

use Phalcon\Collection\Collection;

/**
* Phalcon\Collection
*
Expand Down
2 changes: 1 addition & 1 deletion phalcon/Db/Dialect/Mysql.zep
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Mysql extends Dialect

let sql = "ALTER TABLE " . this->prepareTable(tableName, schemaName) . " ADD";
if reference->getName() {
let sql .= " CONSTRAINT `" . $reference->getName() . "`";
let sql .= " CONSTRAINT `" . reference->getName() . "`";
}

let sql .= " FOREIGN KEY (" . this->getColumnList(reference->getColumns()) . ") REFERENCES " . this->prepareTable(reference->getReferencedTable(), reference->getReferencedSchema()) . "(" . this->getColumnList(reference->getReferencedColumns()) . ")";
Expand Down
2 changes: 1 addition & 1 deletion phalcon/Html/Helper/Anchor.zep
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ class Anchor extends AbstractHelper

let overrides = array_merge(overrides, attributes);

return $this->renderFullElement("a", text, overrides);
return this->renderFullElement("a", text, overrides);
}
}
2 changes: 1 addition & 1 deletion phalcon/Html/Helper/AnchorRaw.zep
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ class AnchorRaw extends AbstractHelper

let overrides = array_merge(overrides, attributes);

return $this->renderFullElement("a", text, overrides, true);
return this->renderFullElement("a", text, overrides, true);
}
}
2 changes: 1 addition & 1 deletion phalcon/Http/Request.zep
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ class Request implements RequestInterface, InjectionAwareInterface
}
}

return "https" === $this->getScheme() ? 443 : 80;
return "https" === this->getScheme() ? 443 : 80;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions phalcon/Loader.zep
Original file line number Diff line number Diff line change
Expand Up @@ -538,13 +538,13 @@ class Loader implements EventsAwareInterface
return this;
}

protected function prepareNamespace(array! $namespace) -> array
protected function prepareNamespace(array! namespaceName) -> array
{
var localPaths, name, paths, prepared;

let prepared = [];

for name, paths in $namespace {
for name, paths in namespaceName {
if typeof paths != "array" {
let localPaths = [paths];
} else {
Expand Down
2 changes: 1 addition & 1 deletion phalcon/Logger/Adapter/Stream.zep
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class Stream extends AbstractAdapter
let this->handler = fopen(this->name, this->mode);

if !is_resource(this->handler) {
let $this->handler = null;
let this->handler = null;

throw new \UnexpectedValueException(
sprintf(
Expand Down
2 changes: 1 addition & 1 deletion phalcon/Mvc/Collection.zep
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ abstract class Collection implements EntityInterface, CollectionInterface, Injec
*/
let status = collection->update(
[
"_id": $this->_id
"_id": this->_id
],
data,
[
Expand Down
6 changes: 3 additions & 3 deletions phalcon/Storage/Adapter/Redis.zep
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class Redis extends AbstractAdapter
*/
public function getAdapter() -> var
{
var auth, connection, host, index, method, options,
var auth, connection, host, index, method, options,
persistent, port, result;

if null === this->adapter {
Expand Down Expand Up @@ -171,7 +171,7 @@ class Redis extends AbstractAdapter
*/
public function has(string! key) -> bool
{
return (bool) this->getAdapter()->exists($key);
return (bool) this->getAdapter()->exists(key);
}

/**
Expand All @@ -185,7 +185,7 @@ class Redis extends AbstractAdapter
*/
public function increment(string! key, int value = 1) -> int | bool
{
return this->getAdapter()->incrBy($key, $value);
return this->getAdapter()->incrBy(key, value);
}

/**
Expand Down