Commit 839042b0 authored by Tomas Lang's avatar Tomas Lang

Typo: add whitespaces between methods, add comments

parent 4486b466
......@@ -2,6 +2,7 @@
namespace LeanMapperWorkflow;
abstract class AbstractRepository extends \LeanMapper\Repository
{
......@@ -10,6 +11,8 @@ abstract class AbstractRepository extends \LeanMapper\Repository
*/
abstract public function createRestriction();
/**
* @param \DibiFluent $statement
* @param Restriction|null $restriction
......
......@@ -2,15 +2,28 @@
namespace LeanMapperWorkflow;
abstract class AbstractRestriction
{
const FLAG_COUNT = 'count';
protected $properties = array();
private $values = array();
/** @var array */
protected $properties = [];
/** @var array */
private $values = [];
/** @var \LeanMapper\IMapper */
protected $mapper;
/**
* @param \LeanMapper\IMapper $mapper
*/
public function __construct(\LeanMapper\IMapper $mapper)
{
$this->mapper = $mapper;
......@@ -35,10 +48,14 @@ abstract class AbstractRestriction
$this->initDefaults();
}
protected function initDefaults()
{
}
/**
* @param string $property
*
......@@ -54,6 +71,8 @@ abstract class AbstractRestriction
);
}
/**
* @param string $key
*
......@@ -64,6 +83,8 @@ abstract class AbstractRestriction
return array_key_exists($key, $this->values);
}
/**
* @param string $key
*/
......@@ -73,6 +94,8 @@ abstract class AbstractRestriction
unset($this->values[$key]);
}
/**
* @param mixed $key
*
......@@ -117,6 +140,8 @@ abstract class AbstractRestriction
$this->values[$key] = $value;
}
/**
* @param string $key
*
......@@ -132,6 +157,8 @@ abstract class AbstractRestriction
return $this->values[$key];
}
/**
* @return array
*/
......@@ -140,6 +167,8 @@ abstract class AbstractRestriction
return $this->values;
}
/**
* @param \DibiFluent $statement
* @param string|null $flag
......
......@@ -2,6 +2,7 @@
namespace LeanMapperWorkflow;
abstract class Entity extends \LeanMapper\Entity
{
}
......@@ -2,6 +2,7 @@
namespace LeanMapperWorkflow;
class EntityFactory implements \LeanMapper\IEntityFactory
{
......@@ -13,6 +14,8 @@ class EntityFactory implements \LeanMapper\IEntityFactory
return new $entityClass($arg);
}
/*
* @inheritdoc
*/
......
......@@ -2,6 +2,7 @@
namespace LeanMapperWorkflow;
/**
* Class Mapper
*/
......
......@@ -5,6 +5,7 @@ namespace LeanMapperWorkflow;
use InvalidArgumentException;
use LogicException;
/**
* Class Repository
*/
......@@ -40,6 +41,8 @@ class Repository extends AbstractRepository
return $this->createEntity($row);
}
/**
* @param Restriction|int[]|null $param
*
......@@ -70,6 +73,8 @@ class Repository extends AbstractRepository
return $this->createEntities($statement->fetchAll());
}
/**
* @param Restriction|null $param
*
......@@ -95,6 +100,8 @@ class Repository extends AbstractRepository
return (int) $statement->fetchSingle();
}
/**
* @param string $key
* @param string $value
......@@ -120,6 +127,8 @@ class Repository extends AbstractRepository
return $statement->fetchPairs($key, $value);
}
/**
* @return Restriction
*/
......
......@@ -2,6 +2,7 @@
namespace LeanMapperWorkflow;
/**
* @property array|int $id
* @property int $limit
......@@ -10,8 +11,11 @@ namespace LeanMapperWorkflow;
class Restriction extends AbstractRestriction
{
/** @var array */
protected $joins = [];
/**
* @param \DibiFluent $statement
* @param Repository $repository
......@@ -38,6 +42,8 @@ class Restriction extends AbstractRestriction
$statement->offset($this->offset);
}
/**
* @param Repository $repository
* @return string
......@@ -54,6 +60,8 @@ class Restriction extends AbstractRestriction
}
}
/**
* @param string $name
* @param callback $callback callback($statement)
......@@ -71,6 +79,8 @@ class Restriction extends AbstractRestriction
}
}
/**
* [applyJoins description]
* @param [type] $statement [description]
......
......@@ -2,14 +2,19 @@
namespace LeanMapperWorkflow;
class RestrictionWithOrdering extends Restriction
{
const ORDER_ID = 'id';
/** @var array(self::ORDER_* => "ASC"|"DESC"|mixed) */
protected $orderBys = [];
/**
* @param \DibiFluent $statement
* @param Repository $repository
......@@ -26,6 +31,8 @@ class RestrictionWithOrdering extends Restriction
}
}
/**
* @param array $orderBys
*/
......@@ -34,6 +41,8 @@ class RestrictionWithOrdering extends Restriction
$this->orderBys = $orderBys;
}
/**
* @param string $order self::ORDER_*
* @param string $direction "ASC"|"DESC"|mixed
......@@ -43,6 +52,8 @@ class RestrictionWithOrdering extends Restriction
$this->orderBys[$order] = $direction;
}
/**
* @param string $order self::ORDER_*
* @param string $direction "ASC"|"DESC"|mixed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment