Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
robertpustulka committed Apr 9, 2015
1 parent b539570 commit 5197cd5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
18 changes: 10 additions & 8 deletions src/ORM/Registry/DefaultRegistry.php
Expand Up @@ -87,7 +87,8 @@ public function config($alias = null, $options = null)
}
if (isset($this->_instances[$alias])) {
throw new RuntimeException(sprintf(
'You cannot configure "%s", it has already been constructed.', $alias
'You cannot configure "%s", it has already been constructed.',
$alias
));
}
return $this->_config[$alias] = $options;
Expand Down Expand Up @@ -132,7 +133,8 @@ public function get($alias, array $options = [])
if (isset($this->_instances[$alias])) {
if (!empty($options) && $this->_options[$alias] !== $options) {
throw new RuntimeException(sprintf(
'You cannot configure "%s", it already exists in the registry.', $alias
'You cannot configure "%s", it already exists in the registry.',
$alias
));
}
return $this->_instances[$alias];
Expand Down Expand Up @@ -186,23 +188,23 @@ protected function _create(array $options)
}

/**
* @inheritDoc
* {@inheritDoc}
*/
public function exists($alias)
{
return isset($this->_instances[$alias]);
}

/**
* @inheritDoc
* {@inheritDoc}
*/
public function set($alias, Table $object)
{
return $this->_instances[$alias] = $object;
}

/**
* @inheritDoc
* {@inheritDoc}
*/
public function clear()
{
Expand All @@ -225,13 +227,13 @@ public function genericInstances()
}

/**
* @inheritDoc
* {@inheritDoc}
*/
public function remove($alias)
{
unset(
$this->_instances[$alias],
$this->_config[$alias],
$this->_instances[$alias],
$this->_config[$alias],
$this->_fallbacked[$alias]
);
}
Expand Down
6 changes: 3 additions & 3 deletions src/ORM/TableRegistry.php
Expand Up @@ -70,7 +70,7 @@ class TableRegistry
/**
* Sets and returns singleton instance of Registry.
*
* @param \Cake\ORM\Registry\RegistryInterface $instance
* @param \Cake\ORM\Registry\RegistryInterface $instance Instance of registry to set.
* @return \Cake\ORM\Registry\RegistryInterface
*/
public static function instance(RegistryInterface $instance = null)
Expand All @@ -89,8 +89,8 @@ public static function instance(RegistryInterface $instance = null)
/**
* Proxy for static calls on a singleton.
*
* @param string $name
* @param array $arguments
* @param string $name Method name.
* @param array $arguments Method arguments.
* @return mixed
*/
public static function __callStatic($name, $arguments)
Expand Down

0 comments on commit 5197cd5

Please sign in to comment.