@@ -133,14 +133,14 @@ |
||
133 | 133 | $work_table = explode("'", $work_str); |
134 | 134 | |
135 | 135 | if (count($work_table) == 0) |
136 | - return ''; |
|
136 | + return ''; |
|
137 | 137 | |
138 | 138 | // if we start with a ', let's remove the first text |
139 | 139 | if (strstr($work_str,"'") === 0) |
140 | - array_shift($work_table); |
|
140 | + array_shift($work_table); |
|
141 | 141 | |
142 | 142 | if (count($work_table) == 0) |
143 | - return ''; |
|
143 | + return ''; |
|
144 | 144 | |
145 | 145 | // Now, let's take only the stuff outside the quotes. |
146 | 146 | $work_str2 = ''; |
@@ -45,7 +45,7 @@ |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | private function getAllPossiblePaths() { |
48 | - return AmbiguityException::getAllPossiblePathsRec($this->paths); |
|
48 | + return AmbiguityException::getAllPossiblePathsRec($this->paths); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | private static function getAllPossiblePathsRec($sub_table_paths) |
@@ -65,9 +65,9 @@ |
||
65 | 65 | * @param string $func_name |
66 | 66 | * @param $values |
67 | 67 | * @return array|void |
68 | - * @throws TDBMException |
|
68 | + * @throws TDBMException |
|
69 | 69 | */ |
70 | - public function __call($func_name, $values) { |
|
70 | + public function __call($func_name, $values) { |
|
71 | 71 | |
72 | 72 | if (strpos($func_name,"getarray_") === 0) { |
73 | 73 | $column = substr($func_name, 9); |
@@ -65,10 +65,10 @@ discard block |
||
65 | 65 | } |
66 | 66 | |
67 | 67 | if ($this->daoNamespace == null && $this->beanNamespace == null) { |
68 | - $classNameMapper = ClassNameMapper::createFromComposerFile(__DIR__.'/../../../../../../../../composer.json'); |
|
68 | + $classNameMapper = ClassNameMapper::createFromComposerFile(__DIR__.'/../../../../../../../../composer.json'); |
|
69 | 69 | |
70 | 70 | $autoloadNamespaces = $classNameMapper->getManagedNamespaces(); |
71 | - if ($autoloadNamespaces) { |
|
71 | + if ($autoloadNamespaces) { |
|
72 | 72 | $this->autoloadDetected = true; |
73 | 73 | $rootNamespace = $autoloadNamespaces[0]; |
74 | 74 | $this->daoNamespace = $rootNamespace."Dao"; |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | |
151 | 151 | $tdbmService = new InstanceProxy($name); |
152 | 152 | /* @var $tdbmService TDBMService */ |
153 | - $tables = $tdbmService->generateAllDaosAndBeans($daofactoryclassname, $daonamespace, $beannamespace, $keepSupport, $storeInUtc, $castDatesToDateTime); |
|
153 | + $tables = $tdbmService->generateAllDaosAndBeans($daofactoryclassname, $daonamespace, $beannamespace, $keepSupport, $storeInUtc, $castDatesToDateTime); |
|
154 | 154 | |
155 | 155 | |
156 | 156 | $moufManager->declareComponent($daofactoryinstancename, $daonamespace."\\".$daofactoryclassname, false, MoufManager::DECLARE_ON_EXIST_KEEP_INCOMING_LINKS); |
@@ -111,12 +111,12 @@ discard block |
||
111 | 111 | $this->beanNamespace = $this->moufManager->getVariable("tdbmDefaultBeanNamespace_tdbmService"); |
112 | 112 | |
113 | 113 | if ($this->daoNamespace == null && $this->beanNamespace == null) { |
114 | - $classNameMapper = ClassNameMapper::createFromComposerFile(__DIR__.'/../../../../../../../../composer.json'); |
|
114 | + $classNameMapper = ClassNameMapper::createFromComposerFile(__DIR__.'/../../../../../../../../composer.json'); |
|
115 | 115 | |
116 | - $autoloadNamespaces = $classNameMapper->getManagedNamespaces(); |
|
116 | + $autoloadNamespaces = $classNameMapper->getManagedNamespaces(); |
|
117 | 117 | if ($autoloadNamespaces) { |
118 | 118 | $this->autoloadDetected = true; |
119 | - $rootNamespace = $autoloadNamespaces[0]; |
|
119 | + $rootNamespace = $autoloadNamespaces[0]; |
|
120 | 120 | $this->daoNamespace = $rootNamespace."Dao"; |
121 | 121 | $this->beanNamespace = $rootNamespace."Dao\\Bean"; |
122 | 122 | } else { |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | * @param string $selfedit |
147 | 147 | * @throws \Mouf\MoufException |
148 | 148 | */ |
149 | - public function generate($daonamespace, $beannamespace, $keepSupport = 0, $storeInUtc = 0, $castDatesToDateTime = 1, $selfedit="false") { |
|
149 | + public function generate($daonamespace, $beannamespace, $keepSupport = 0, $storeInUtc = 0, $castDatesToDateTime = 1, $selfedit="false") { |
|
150 | 150 | $this->selfedit = $selfedit; |
151 | 151 | |
152 | 152 | if ($selfedit == "true") { |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | * |
99 | 99 | * @param string $tableName |
100 | 100 | * @param string $columnName |
101 | - * @param string $value1 |
|
102 | - * @param string $value2 |
|
101 | + * @param string $value1 |
|
102 | + * @param string $value2 |
|
103 | 103 | */ |
104 | 104 | public function __construct($tableName=null, $columnName=null, $value1=null, $value2=null) { |
105 | 105 | $this->tableName = $tableName; |
@@ -113,9 +113,9 @@ discard block |
||
113 | 113 | * |
114 | 114 | * @param ConnectionInterface $dbConnection |
115 | 115 | * @return string |
116 | - * @throws \Mouf\Database\TDBM\TDBMException |
|
116 | + * @throws \Mouf\Database\TDBM\TDBMException |
|
117 | 117 | */ |
118 | - public function toSql(ConnectionInterface $dbConnection) { |
|
118 | + public function toSql(ConnectionInterface $dbConnection) { |
|
119 | 119 | if ($this->enableCondition != null && !$this->enableCondition->isOk()) { |
120 | 120 | return ""; |
121 | 121 | } |
@@ -9,14 +9,14 @@ |
||
9 | 9 | */ |
10 | 10 | class FilterUtils |
11 | 11 | { |
12 | - /** |
|
13 | - * @param string|null|DateTimeInterface $value |
|
14 | - */ |
|
15 | - public static function valueToSql($value, ConnectionInterface $dbConnection) { |
|
16 | - if ($value instanceof DateTimeInterface) { |
|
17 | - return "'".$value->format('Y-m-d H:i:s')."'"; |
|
18 | - } else { |
|
19 | - return $dbConnection->quoteSmart($value); |
|
20 | - } |
|
21 | - } |
|
12 | + /** |
|
13 | + * @param string|null|DateTimeInterface $value |
|
14 | + */ |
|
15 | + public static function valueToSql($value, ConnectionInterface $dbConnection) { |
|
16 | + if ($value instanceof DateTimeInterface) { |
|
17 | + return "'".$value->format('Y-m-d H:i:s')."'"; |
|
18 | + } else { |
|
19 | + return $dbConnection->quoteSmart($value); |
|
20 | + } |
|
21 | + } |
|
22 | 22 | } |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | * |
69 | 69 | * @param ConnectionInterface $dbConnection |
70 | 70 | * @return string |
71 | - * @throws TDBMException |
|
71 | + * @throws TDBMException |
|
72 | 72 | */ |
73 | - public function toSql(ConnectionInterface $dbConnection) { |
|
73 | + public function toSql(ConnectionInterface $dbConnection) { |
|
74 | 74 | if ($this->enableCondition != null && !$this->enableCondition->isOk()) { |
75 | 75 | return ""; |
76 | 76 | } |
@@ -102,22 +102,22 @@ discard block |
||
102 | 102 | * |
103 | 103 | * @return array<string> |
104 | 104 | */ |
105 | - public function getUsedTables() { |
|
106 | - if ($this->enableCondition != null && !$this->enableCondition->isOk()) { |
|
107 | - return array(); |
|
108 | - } |
|
109 | - |
|
110 | - $tables = array(); |
|
111 | - foreach ($this->filters as $filter) { |
|
112 | - |
|
113 | - if (!$filter instanceof FilterInterface) { |
|
114 | - throw new TDBMException("Error in OrFilter: One of the parameters is not a filter."); |
|
115 | - } |
|
116 | - |
|
117 | - $tables = array_merge($tables,$filter->getUsedTables()); |
|
118 | - } |
|
119 | - // Remove tables in double. |
|
120 | - $tables = array_flip(array_flip($tables)); |
|
121 | - return $tables; |
|
122 | - } |
|
105 | + public function getUsedTables() { |
|
106 | + if ($this->enableCondition != null && !$this->enableCondition->isOk()) { |
|
107 | + return array(); |
|
108 | + } |
|
109 | + |
|
110 | + $tables = array(); |
|
111 | + foreach ($this->filters as $filter) { |
|
112 | + |
|
113 | + if (!$filter instanceof FilterInterface) { |
|
114 | + throw new TDBMException("Error in OrFilter: One of the parameters is not a filter."); |
|
115 | + } |
|
116 | + |
|
117 | + $tables = array_merge($tables,$filter->getUsedTables()); |
|
118 | + } |
|
119 | + // Remove tables in double. |
|
120 | + $tables = array_flip(array_flip($tables)); |
|
121 | + return $tables; |
|
122 | + } |
|
123 | 123 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | protected $current = false; |
57 | 57 | |
58 | - private $colsArray = null; |
|
58 | + private $colsArray = null; |
|
59 | 59 | |
60 | 60 | public function __construct(\PDOStatement $pdoStatement, ConnectionInterface $dbConnection, $primary_keys, $table_name, $objectStorage, $className, TDBMService $tdbmService, $sql) |
61 | 61 | { |
@@ -73,9 +73,9 @@ discard block |
||
73 | 73 | * Casts a document to a new instance specified in the $recordClass |
74 | 74 | * @param array $fullCaseRow |
75 | 75 | * @return Record_Abstract|false |
76 | - * @throws TDBMException |
|
76 | + * @throws TDBMException |
|
77 | 77 | */ |
78 | - protected function cast($fullCaseRow) |
|
78 | + protected function cast($fullCaseRow) |
|
79 | 79 | { |
80 | 80 | if (!is_array($fullCaseRow)) { |
81 | 81 | return false; |