Skip to content

Commit 78b0b9b

Browse files
committed
typos
1 parent e6a7fde commit 78b0b9b

14 files changed

+7
-43
lines changed

license.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ project or top-level domain, and choose a name that stands on its own merits.
1818
If your stuff is good, it will not take long to establish a reputation for yourselves.
1919

2020

21-
2221
New BSD License
2322
---------------
2423

@@ -51,7 +50,6 @@ any theory of liability, whether in contract, strict liability, or tort
5150
software, even if advised of the possibility of such damage.
5251

5352

54-
5553
GNU General Public License
5654
--------------------------
5755

src/PhpGenerator/ClassType.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
Nette\Utils\Strings;
1616

1717

18-
1918
/**
2019
* Class/Interface/Trait description.
2120
*
@@ -119,14 +118,12 @@ public static function from($from)
119118
}
120119

121120

122-
123121
public function __construct($name = NULL)
124122
{
125123
$this->name = $name;
126124
}
127125

128126

129-
130127
/** @return ClassType */
131128
public function addConst($name, $value)
132129
{
@@ -135,7 +132,6 @@ public function addConst($name, $value)
135132
}
136133

137134

138-
139135
/** @return Property */
140136
public function addProperty($name, $value = NULL)
141137
{
@@ -144,7 +140,6 @@ public function addProperty($name, $value = NULL)
144140
}
145141

146142

147-
148143
/** @return Method */
149144
public function addMethod($name)
150145
{
@@ -158,7 +153,6 @@ public function addMethod($name)
158153
}
159154

160155

161-
162156
/** @return string PHP code */
163157
public function __toString()
164158
{

src/PhpGenerator/Helpers.php

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Nette;
1515

1616

17-
1817
/**
1918
* PHP code generator utils.
2019
*
@@ -35,8 +34,7 @@ public static function dump($var)
3534
}
3635

3736

38-
39-
private static function _dump(&$var, $level = 0)
37+
private static function _dump(& $var, $level = 0)
4038
{
4139
if ($var instanceof PhpLiteral) {
4240
return (string) $var;
@@ -81,7 +79,7 @@ private static function _dump(&$var, $level = 0)
8179
$outAlt = "\n$space";
8280
$var[$marker] = TRUE;
8381
$counter = 0;
84-
foreach ($var as $k => &$v) {
82+
foreach ($var as $k => & $v) {
8583
if ($k !== $marker) {
8684
$item = ($k === $counter ? '' : self::_dump($k, $level + 1) . ' => ') . self::_dump($v, $level + 1);
8785
$counter = is_int($k) ? max($k + 1, $counter) : $counter;
@@ -107,7 +105,7 @@ private static function _dump(&$var, $level = 0)
107105
} else {
108106
$out = "\n";
109107
$list[] = $var;
110-
foreach ($arr as $k => &$v) {
108+
foreach ($arr as $k => & $v) {
111109
if ($k[0] === "\x00") {
112110
$k = substr($k, strrpos($k, "\x00") + 1);
113111
}
@@ -129,7 +127,6 @@ private static function _dump(&$var, $level = 0)
129127
}
130128

131129

132-
133130
/**
134131
* Generates PHP statement.
135132
* @return string
@@ -141,7 +138,6 @@ public static function format($statement)
141138
}
142139

143140

144-
145141
/**
146142
* Generates PHP statement.
147143
* @return string
@@ -172,7 +168,6 @@ public static function formatArgs($statement, array $args)
172168
}
173169

174170

175-
176171
/**
177172
* Returns a PHP representation of a object member.
178173
* @return string
@@ -185,7 +180,6 @@ public static function formatMember($name)
185180
}
186181

187182

188-
189183
/**
190184
* @return bool
191185
*/
@@ -195,7 +189,6 @@ public static function isIdentifier($value)
195189
}
196190

197191

198-
199192
public static function createObject($class, array $props)
200193
{
201194
return unserialize('O' . substr(serialize((string) $class), 1, -1) . substr(serialize($props), 1));

src/PhpGenerator/Method.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Nette;
1515

1616

17-
1817
/**
1918
* Class method description.
2019
*
@@ -94,7 +93,6 @@ public static function from($from)
9493
}
9594

9695

97-
9896
/** @return Parameter */
9997
public function addParameter($name, $defaultValue = NULL)
10098
{
@@ -106,7 +104,6 @@ public function addParameter($name, $defaultValue = NULL)
106104
}
107105

108106

109-
110107
/** @return Parameter */
111108
public function addUse($name)
112109
{
@@ -115,7 +112,6 @@ public function addUse($name)
115112
}
116113

117114

118-
119115
/** @return Method */
120116
public function setBody($statement, array $args = NULL)
121117
{
@@ -124,7 +120,6 @@ public function setBody($statement, array $args = NULL)
124120
}
125121

126122

127-
128123
/** @return Method */
129124
public function addBody($statement, array $args = NULL)
130125
{
@@ -133,7 +128,6 @@ public function addBody($statement, array $args = NULL)
133128
}
134129

135130

136-
137131
/** @return string PHP code */
138132
public function __toString()
139133
{

src/PhpGenerator/Parameter.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Nette;
1515

1616

17-
1817
/**
1918
* Method parameter description.
2019
*

src/PhpGenerator/PhpLiteral.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Nette;
1515

1616

17-
1817
/**
1918
* PHP literal value.
2019
*
@@ -32,7 +31,6 @@ public function __construct($value)
3231
}
3332

3433

35-
3634
/**
3735
* @return string
3836
*/

src/PhpGenerator/Property.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Nette;
1515

1616

17-
1817
/**
1918
* Class property description.
2019
*

tests/PhpGenerator/ClassType.from.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use Nette\PhpGenerator\ClassType,
1414
ReflectionClass;
1515

1616

17-
1817
require __DIR__ . '/../bootstrap.php';
1918

2019

tests/PhpGenerator/ClassType.from.trait.phpt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,22 @@
1111
use Nette\PhpGenerator\ClassType;
1212

1313

14-
1514
require __DIR__ . '/../bootstrap.php';
1615

1716

18-
1917
/**
2018
* Trait1
2119
*/
2220
trait Trait1
2321
{
24-
public function func1()
25-
{}
22+
public function func1()
23+
{}
2624
}
2725

2826
trait Trait2
2927
{
30-
protected function func2()
31-
{}
28+
protected function func2()
29+
{}
3230
}
3331

3432
abstract class Class1

tests/PhpGenerator/ClassType.interface.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@
1010
use Nette\PhpGenerator\ClassType;
1111

1212

13-
1413
require __DIR__ . '/../bootstrap.php';
1514

1615

17-
1816
$interface = new ClassType('IExample');
1917
$interface
2018
->setType('interface')

0 commit comments

Comments
 (0)