Skip to content

Commit 31bc0a3

Browse files
committed
uses Nette\SmartObject & StaticClass
1 parent 7023c22 commit 31bc0a3

File tree

8 files changed

+22
-9
lines changed

8 files changed

+22
-9
lines changed

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
],
1616
"require": {
1717
"php": ">=5.6.0",
18-
"nette/component-model": "~2.2",
18+
"nette/component-model": "~2.3",
1919
"nette/http": "~2.2",
20-
"nette/utils": "~2.2"
20+
"nette/utils": "~2.4"
2121
},
2222
"require-dev": {
2323
"nette/di": "~2.3",

src/Bridges/FormsLatte/Runtime.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616
* Runtime helpers for Latte.
1717
* @internal
1818
*/
19-
class Runtime extends Nette\Object
19+
class Runtime
2020
{
21+
use Nette\StaticClass;
2122

2223
/**
2324
* Renders form begin.

src/Forms/ControlGroup.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
/**
1414
* A user group of form controls.
1515
*/
16-
class ControlGroup extends Nette\Object
16+
class ControlGroup
1717
{
18+
use Nette\SmartObject;
19+
1820
/** @var \SplObjectStorage */
1921
protected $controls;
2022

src/Forms/Helpers.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
/**
1616
* Forms helpers.
1717
*/
18-
class Helpers extends Nette\Object
18+
class Helpers
1919
{
20+
use Nette\StaticClass;
21+
2022
private static $unsafeNames = [
2123
'attributes', 'children', 'elements', 'focus', 'length', 'reset', 'style', 'submit', 'onsubmit', 'form',
2224
'presenter', 'action',

src/Forms/Rendering/DefaultFormRenderer.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
/**
1515
* Converts a Form into the HTML output.
1616
*/
17-
class DefaultFormRenderer extends Nette\Object implements Nette\Forms\IFormRenderer
17+
class DefaultFormRenderer implements Nette\Forms\IFormRenderer
1818
{
19+
use Nette\SmartObject;
20+
1921
/**
2022
* /--- form.container
2123
*

src/Forms/Rule.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
/**
1414
* Single validation rule or condition represented as value object.
1515
*/
16-
class Rule extends Nette\Object
16+
class Rule
1717
{
18+
use Nette\SmartObject;
19+
1820
/** @var IControl */
1921
public $control;
2022

src/Forms/Rules.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
/**
1414
* List of validation & condition rules.
1515
*/
16-
class Rules extends Nette\Object implements \IteratorAggregate
16+
class Rules implements \IteratorAggregate
1717
{
18+
use Nette\SmartObject;
19+
1820
/** @deprecated */
1921
public static $defaultMessages;
2022

src/Forms/Validator.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
/**
1616
* Common validators.
1717
*/
18-
class Validator extends Nette\Object
18+
class Validator
1919
{
20+
use Nette\StaticClass;
21+
2022
/** @var array */
2123
public static $messages = [
2224
Form::PROTECTION => 'Your session has expired. Please return to the home page and try again.',

0 commit comments

Comments
 (0)