Skip to content

Commit

Permalink
fix phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkingmedia committed Aug 30, 2016
1 parent 783d09f commit 6f0ee46
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
2 changes: 2 additions & 0 deletions src/Controller/Controller.php
Expand Up @@ -502,6 +502,7 @@ public function startupProcess()
if ($event->result() instanceof Response) { if ($event->result() instanceof Response) {
return $event->result(); return $event->result();
} }

return null; return null;
} }


Expand All @@ -520,6 +521,7 @@ public function shutdownProcess()
if ($event->result() instanceof Response) { if ($event->result() instanceof Response) {
return $event->result(); return $event->result();
} }

return null; return null;
} }


Expand Down
14 changes: 5 additions & 9 deletions src/Event/Event.php
Expand Up @@ -98,13 +98,11 @@ public function __get($attribute)
if ($attribute === 'name' || $attribute === 'subject') { if ($attribute === 'name' || $attribute === 'subject') {
return $this->{$attribute}(); return $this->{$attribute}();
} }
if ($attribute === 'data') if ($attribute === 'data') {
{
trigger_error('Public read access to data is deprecated, use data()', E_USER_DEPRECATED); trigger_error('Public read access to data is deprecated, use data()', E_USER_DEPRECATED);
return $this->_data; return $this->_data;
} }
if ($attribute === 'result') if ($attribute === 'result') {
{
trigger_error('Public read access to result is deprecated, use result()', E_USER_DEPRECATED); trigger_error('Public read access to result is deprecated, use result()', E_USER_DEPRECATED);
return $this->_result; return $this->_result;
} }
Expand All @@ -118,13 +116,11 @@ public function __get($attribute)
*/ */
public function __set($attribute, $value) public function __set($attribute, $value)
{ {
if($attribute === 'data') if ($attribute === 'data') {
{
trigger_error('Public write access to data is deprecated, use setData()', E_USER_DEPRECATED); trigger_error('Public write access to data is deprecated, use setData()', E_USER_DEPRECATED);
$this->_data = (array)$value; $this->_data = (array)$value;
} }
if ($attribute === 'result') if ($attribute === 'result') {
{
trigger_error('Public write access to result is deprecated, use setResult()', E_USER_DEPRECATED); trigger_error('Public write access to result is deprecated, use setResult()', E_USER_DEPRECATED);
$this->_result = $value; $this->_result = $value;
} }
Expand Down Expand Up @@ -212,7 +208,7 @@ public function data($key = null)
*/ */
public function setData($key, $value = null) public function setData($key, $value = null)
{ {
if(is_array($key)) { if (is_array($key)) {
$this->_data = $key; $this->_data = $key;
} else { } else {
$this->_data[$key] = $value; $this->_data[$key] = $value;
Expand Down
1 change: 1 addition & 0 deletions src/Routing/Filter/RoutingFilter.php
Expand Up @@ -57,6 +57,7 @@ public function beforeDispatch(Event $event)
$params = Router::parse($request->url, $request->method()); $params = Router::parse($request->url, $request->method());
$request->addParams($params); $request->addParams($params);
} }

return null; return null;
} catch (RedirectException $e) { } catch (RedirectException $e) {
$event->stopPropagation(); $event->stopPropagation();
Expand Down
6 changes: 4 additions & 2 deletions tests/TestCase/ORM/RulesCheckerIntegrationTest.php
Expand Up @@ -707,7 +707,8 @@ function (Event $event, Entity $entity, \ArrayObject $options, $operation) {
$event->stopPropagation(); $event->stopPropagation();


return true; return true;
}); }
);


$this->assertSame($entity, $table->save($entity)); $this->assertSame($entity, $table->save($entity));
} }
Expand Down Expand Up @@ -747,7 +748,8 @@ function (Event $event, Entity $entity, \ArrayObject $options, $result, $operati
$event->stopPropagation(); $event->stopPropagation();


return true; return true;
}); }
);


$this->assertSame($entity, $table->save($entity)); $this->assertSame($entity, $table->save($entity));
} }
Expand Down

0 comments on commit 6f0ee46

Please sign in to comment.