Skip to content

Commit

Permalink
Merge pull request #103 from jfbujoli/4.1
Browse files Browse the repository at this point in the history
4.1
  • Loading branch information
moufmouf committed Sep 15, 2016
2 parents 9a955ab + c600ca4 commit a51a31b
Show file tree
Hide file tree
Showing 13 changed files with 87 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build:
environment:
php:
version: 7.0
version: 7.0.8
2 changes: 1 addition & 1 deletion src/Mouf/Database/TDBM/AbstractTDBMObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ abstract class AbstractTDBMObject implements JsonSerializable
private $relationships = [];

/**
* @var bool[] Key: pivot table name, value: whether a query was performed to load the data.
* @var bool[] Key: pivot table name, value: whether a query was performed to load the data
*/
private $loadedRelationships = [];

Expand Down
2 changes: 1 addition & 1 deletion src/Mouf/Database/TDBM/DbRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class DbRow
* Used with id!=false when we want to retrieve an existing object
* and id==false if we want a new object
*
* @param AbstractTDBMObject $object The object containing this db row.
* @param AbstractTDBMObject $object The object containing this db row
* @param string $table_name
* @param array $primaryKeys
* @param TDBMService $tdbmService
Expand Down
4 changes: 2 additions & 2 deletions src/Mouf/Database/TDBM/InnerResultArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class InnerResultArray extends InnerResultIterator
* @return bool true on success or false on failure.
* </p>
* <p>
* The return value will be casted to boolean if non-boolean was returned.
* The return value will be casted to boolean if non-boolean was returned
*
* @since 5.0.0
*/
Expand All @@ -70,7 +70,7 @@ public function offsetExists($offset)
* The offset to retrieve.
* </p>
*
* @return mixed Can return all value types.
* @return mixed Can return all value types
*
* @since 5.0.0
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Mouf/Database/TDBM/InnerResultIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public function valid()
* @return bool true on success or false on failure.
* </p>
* <p>
* The return value will be casted to boolean if non-boolean was returned.
* The return value will be casted to boolean if non-boolean was returned
*
* @since 5.0.0
*/
Expand All @@ -243,7 +243,7 @@ public function offsetExists($offset)
* The offset to retrieve.
* </p>
*
* @return mixed Can return all value types.
* @return mixed Can return all value types
*
* @since 5.0.0
*/
Expand Down
6 changes: 3 additions & 3 deletions src/Mouf/Database/TDBM/PageIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public function map(callable $callable)
* @return bool true on success or false on failure.
* </p>
* <p>
* The return value will be casted to boolean if non-boolean was returned.
* The return value will be casted to boolean if non-boolean was returned
*
* @since 5.0.0
*/
Expand All @@ -204,7 +204,7 @@ public function offsetExists($offset)
* The offset to retrieve.
* </p>
*
* @return mixed Can return all value types.
* @return mixed Can return all value types
*
* @since 5.0.0
*/
Expand Down Expand Up @@ -254,7 +254,7 @@ public function offsetUnset($offset)
* @link http://php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed data which can be serialized by <b>json_encode</b>,
* which is a value of any type other than a resource.
* which is a value of any type other than a resource
*
* @since 5.4.0
*/
Expand Down
8 changes: 4 additions & 4 deletions src/Mouf/Database/TDBM/ResultIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function take($offset, $limit)
* @return bool true on success or false on failure.
* </p>
* <p>
* The return value will be casted to boolean if non-boolean was returned.
* The return value will be casted to boolean if non-boolean was returned
*
* @since 5.0.0
*/
Expand All @@ -190,7 +190,7 @@ public function offsetExists($offset)
* The offset to retrieve.
* </p>
*
* @return mixed Can return all value types.
* @return mixed Can return all value types
*
* @since 5.0.0
*/
Expand Down Expand Up @@ -241,10 +241,10 @@ public function offsetUnset($offset)
*
* @param bool $stopRecursion Parameter used internally by TDBM to
* stop embedded objects from embedding
* other objects.
* other objects
*
* @return mixed data which can be serialized by <b>json_encode</b>,
* which is a value of any type other than a resource.
* which is a value of any type other than a resource
*
* @since 5.4.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Mouf/Database/TDBM/TDBMObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function setProperty($var, $value, $tableName = null)
* @link http://php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed data which can be serialized by <b>json_encode</b>,
* which is a value of any type other than a resource.
* which is a value of any type other than a resource
*
* @since 5.4.0
*/
Expand Down
6 changes: 4 additions & 2 deletions src/Mouf/Database/TDBM/TDBMSchemaAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class TDBMSchemaAnalyzer
* @param Connection $connection The DBAL DB connection to use
* @param Cache $cache A cache service to be used
* @param SchemaAnalyzer $schemaAnalyzer The schema analyzer that will be used to find shortest paths...
* Will be automatically created if not passed.
* Will be automatically created if not passed
*/
public function __construct(Connection $connection, Cache $cache, SchemaAnalyzer $schemaAnalyzer)
{
Expand Down Expand Up @@ -124,7 +124,9 @@ public function getPivotTableLinkedToTable($tableName)
public function getIncomingForeignKeys($tableName)
{
$junctionTables = $this->schemaAnalyzer->detectJunctionTables(true);
$junctionTableNames = array_map(function (Table $table) { return $table->getName(); }, $junctionTables);
$junctionTableNames = array_map(function (Table $table) {
return $table->getName();
}, $junctionTables);
$childrenRelationships = $this->schemaAnalyzer->getChildrenRelationships($tableName);

$fks = [];
Expand Down
Loading

0 comments on commit a51a31b

Please sign in to comment.