Skip to content

Commit

Permalink
typos & fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Aug 24, 2014
1 parent 5ed802f commit c6ea262
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/Application/MicroPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ class MicroPresenter extends Nette\Object implements Application\IPresenter
/** @var Nette\Http\IRequest|NULL */
private $httpRequest;

/** @var IRouter|NULL */
/** @var ApplicationIRouter|NULL */
private $router;

/** @var Application\Request */
private $request;


public function __construct(Nette\DI\Container $context = NULL, Http\IRequest $httpRequest = NULL, IRouter $router = NULL)
public function __construct(Nette\DI\Container $context = NULL, Http\IRequest $httpRequest = NULL, ApplicationIRouter $router = NULL)
{
$this->context = $context;
$this->httpRequest = $httpRequest;
Expand Down Expand Up @@ -97,7 +97,7 @@ public function run(Application\Request $request)
if ($response[0] instanceof \SplFileInfo) {
$response->setFile($response[0]);
} else {
$response->setSource($response[0]); // TODO
$response->setSource($response[0]);
}
}
if ($response instanceof Application\UI\ITemplate) {
Expand Down
5 changes: 2 additions & 3 deletions src/Application/Routers/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ public function constructUrl(Application\Request $appRequest, Nette\Http\Url $re
}

if (strpos($url, '//', 2) !== FALSE) {
return NULL; // TODO: implement counterpart in match() ?
return NULL;
}

$url = ($this->flags & self::SECURED ? 'https:' : 'http:') . $url;
Expand Down Expand Up @@ -740,8 +740,7 @@ private static function path2action($s)
{
$s = strtolower($s);
$s = preg_replace('#-(?=[a-z])#', ' ', $s);
$s = substr(ucwords('x' . $s), 1);
//$s = lcfirst(ucwords($s));
$s = lcfirst(ucwords($s));
$s = str_replace(' ', '', $s);
return $s;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Application/UI/Presenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public function run(Application\Request $request)
// continue with shutting down
if ($this->isAjax()) try {
$hasPayload = (array) $this->payload; unset($hasPayload['state']);
if ($this->response instanceof Responses\TextResponse && $this->isControlInvalid()) { // snippets - TODO
if ($this->response instanceof Responses\TextResponse && $this->isControlInvalid()) {
$this->snippetMode = TRUE;
$this->response->send($this->httpRequest, $this->httpResponse);
$this->sendPayload();
Expand Down Expand Up @@ -867,7 +867,7 @@ protected function createRequest($component, $destination, array $args, $mode)
throw new InvalidLinkException("Unable to pass parameters to 'this!' signal.");
}

} elseif (strpos($signal, self::NAME_SEPARATOR) === FALSE) { // TODO: AppForm exception
} elseif (strpos($signal, self::NAME_SEPARATOR) === FALSE) {
// counterpart of signalReceived() & tryCall()
$method = $component->formatSignalMethod($signal);
if (!$reflection->hasCallableMethod($method)) {
Expand Down Expand Up @@ -898,7 +898,7 @@ protected function createRequest($component, $destination, array $args, $mode)
$action = self::DEFAULT_ACTION;
}

$current = ($action === '*' || strcasecmp($action, $this->action) === 0) && $presenterClass === get_class($this); // TODO
$current = ($action === '*' || strcasecmp($action, $this->action) === 0) && $presenterClass === get_class($this);

$reflection = new PresenterComponentReflection($presenterClass);
if ($args || $destination === 'this') {
Expand Down
2 changes: 1 addition & 1 deletion src/Application/UI/PresenterComponentReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class PresenterComponentReflection extends Nette\Reflection\ClassType
*/
public function getPersistentParams($class = NULL)
{
$class = $class === NULL ? $this->getName() : $class; // TODO
$class = $class === NULL ? $this->getName() : $class;
$params = & self::$ppCache[$class];
if ($params !== NULL) {
return $params;
Expand Down

0 comments on commit c6ea262

Please sign in to comment.