Skip to content

Commit

Permalink
uses Nette\SmartObject & StrictClass
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Apr 11, 2016
1 parent 7023c22 commit 3c1619a
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 9 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
],
"require": {
"php": ">=5.6.0",
"nette/component-model": "~2.2",
"nette/component-model": "~2.3",
"nette/http": "~2.2",
"nette/utils": "~2.2"
"nette/utils": "~2.4"
},
"require-dev": {
"nette/di": "~2.3",
Expand Down
3 changes: 2 additions & 1 deletion src/Bridges/FormsLatte/Runtime.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
* Runtime helpers for Latte.
* @internal
*/
class Runtime extends Nette\Object
class Runtime
{
use Nette\StaticClass;

/**
* Renders form begin.
Expand Down
4 changes: 3 additions & 1 deletion src/Forms/ControlGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
/**
* A user group of form controls.
*/
class ControlGroup extends Nette\Object
class ControlGroup
{
use Nette\SmartObject;

/** @var \SplObjectStorage */
protected $controls;

Expand Down
4 changes: 3 additions & 1 deletion src/Forms/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
/**
* Forms helpers.
*/
class Helpers extends Nette\Object
class Helpers
{
use Nette\StaticClass;

private static $unsafeNames = [
'attributes', 'children', 'elements', 'focus', 'length', 'reset', 'style', 'submit', 'onsubmit', 'form',
'presenter', 'action',
Expand Down
4 changes: 3 additions & 1 deletion src/Forms/Rendering/DefaultFormRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
/**
* Converts a Form into the HTML output.
*/
class DefaultFormRenderer extends Nette\Object implements Nette\Forms\IFormRenderer
class DefaultFormRenderer implements Nette\Forms\IFormRenderer
{
use Nette\SmartObject;

/**
* /--- form.container
*
Expand Down
4 changes: 3 additions & 1 deletion src/Forms/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
/**
* Single validation rule or condition represented as value object.
*/
class Rule extends Nette\Object
class Rule
{
use Nette\SmartObject;

/** @var IControl */
public $control;

Expand Down
4 changes: 3 additions & 1 deletion src/Forms/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
/**
* List of validation & condition rules.
*/
class Rules extends Nette\Object implements \IteratorAggregate
class Rules implements \IteratorAggregate
{
use Nette\SmartObject;

/** @deprecated */
public static $defaultMessages;

Expand Down
4 changes: 3 additions & 1 deletion src/Forms/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
/**
* Common validators.
*/
class Validator extends Nette\Object
class Validator
{
use Nette\StaticClass;

/** @var array */
public static $messages = [
Form::PROTECTION => 'Your session has expired. Please return to the home page and try again.',
Expand Down

0 comments on commit 3c1619a

Please sign in to comment.