Skip to content

Commit 3fcf860

Browse files
author
Dominik Liebler
committed
Fixed style
1 parent d9d3f12 commit 3fcf860

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Structural/Flyweight/CharacterFlyweight.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class CharacterFlyweight implements FlyweightInterface
1616
private $name;
1717

1818
/**
19-
* Constructor.
2019
* @param string $name
2120
*/
2221
public function __construct($name)
@@ -27,6 +26,7 @@ public function __construct($name)
2726
/**
2827
* Clients supply the context-dependent information that the flyweight needs to draw itself
2928
* For flyweights representing characters, extrinsic state usually contains e.g. the font
29+
*
3030
* @param string $font
3131
*/
3232
public function draw($font)

Structural/Flyweight/FlyweightFactory.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class FlyweightFactory
1212
{
1313
/**
1414
* Associative store for flyweight objects
15-
*
15+
*
1616
* @var Array
1717
*/
1818
private $pool = array();
@@ -28,6 +28,7 @@ public function __get($name)
2828
if (!array_key_exists($name, $this->pool)) {
2929
$this->pool[$name] = new CharacterFlyweight($name);
3030
}
31+
3132
return $this->pool[$name];
3233
}
3334

@@ -36,6 +37,6 @@ public function __get($name)
3637
*/
3738
public function totalNumber()
3839
{
39-
return sizeof($this->pool);
40+
return count($this->pool);
4041
}
4142
}

Structural/Flyweight/FlyweightInterface.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@
77
*/
88
interface FlyweightInterface
99
{
10+
/**
11+
* @param string $extrinsicState
12+
*/
1013
public function draw($extrinsicState);
1114
}

0 commit comments

Comments
 (0)