@@ -81,8 +81,7 @@ |
||
81 | 81 | } |
82 | 82 | |
83 | 83 | $reply = $count <= 0 ? |
84 | - static::createSuccessReply($value) : |
|
85 | - static::createErrorReply($context, $value, ErrorCodes::UNIQUE_IN_DATABASE_SINGLE); |
|
84 | + static::createSuccessReply($value) : static::createErrorReply($context, $value, ErrorCodes::UNIQUE_IN_DATABASE_SINGLE); |
|
86 | 85 | |
87 | 86 | return $reply; |
88 | 87 | } |
@@ -82,8 +82,7 @@ |
||
82 | 82 | } |
83 | 83 | |
84 | 84 | $reply = $count > 0 ? |
85 | - static::createSuccessReply($value) : |
|
86 | - static::createErrorReply($context, $value, ErrorCodes::EXIST_IN_DATABASE_SINGLE); |
|
85 | + static::createSuccessReply($value) : static::createErrorReply($context, $value, ErrorCodes::EXIST_IN_DATABASE_SINGLE); |
|
87 | 86 | |
88 | 87 | return $reply; |
89 | 88 | } |
@@ -62,8 +62,7 @@ |
||
62 | 62 | assert(is_scalar($index) === true && is_scalar($type) === true); |
63 | 63 | $expectedType = $context->getProperties()->getProperty(static::PROPERTY_RESOURCE_TYPE); |
64 | 64 | $reply = $type === $expectedType ? |
65 | - static::createSuccessReply($index) : |
|
66 | - static::createErrorReply($context, $type, ErrorCodes::INVALID_RELATIONSHIP_TYPE); |
|
65 | + static::createSuccessReply($index) : static::createErrorReply($context, $type, ErrorCodes::INVALID_RELATIONSHIP_TYPE); |
|
67 | 66 | |
68 | 67 | return $reply; |
69 | 68 | } |
@@ -1,20 +1,20 @@ |
||
1 | 1 | <?php namespace Limoncello\Flute\Contracts\Models; |
2 | 2 | |
3 | 3 | /** |
4 | - * Copyright 2015-2018 [email protected] |
|
5 | - * |
|
6 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
|
7 | - * you may not use this file except in compliance with the License. |
|
8 | - * You may obtain a copy of the License at |
|
9 | - * |
|
10 | - * http://www.apache.org/licenses/LICENSE-2.0 |
|
11 | - * |
|
12 | - * Unless required by applicable law or agreed to in writing, software |
|
13 | - * distributed under the License is distributed on an "AS IS" BASIS, |
|
14 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
15 | - * See the License for the specific language governing permissions and |
|
16 | - * limitations under the License. |
|
17 | - */ |
|
4 | + * Copyright 2015-2018 [email protected] |
|
5 | + * |
|
6 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
|
7 | + * you may not use this file except in compliance with the License. |
|
8 | + * You may obtain a copy of the License at |
|
9 | + * |
|
10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
|
11 | + * |
|
12 | + * Unless required by applicable law or agreed to in writing, software |
|
13 | + * distributed under the License is distributed on an "AS IS" BASIS, |
|
14 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
15 | + * See the License for the specific language governing permissions and |
|
16 | + * limitations under the License. |
|
17 | + */ |
|
18 | 18 | |
19 | 19 | /** |
20 | 20 | * @package Limoncello\Flute |
@@ -1,20 +1,20 @@ |
||
1 | 1 | <?php namespace Limoncello\Flute\Contracts\Models; |
2 | 2 | |
3 | 3 | /** |
4 | - * Copyright 2015-2018 [email protected] |
|
5 | - * |
|
6 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
|
7 | - * you may not use this file except in compliance with the License. |
|
8 | - * You may obtain a copy of the License at |
|
9 | - * |
|
10 | - * http://www.apache.org/licenses/LICENSE-2.0 |
|
11 | - * |
|
12 | - * Unless required by applicable law or agreed to in writing, software |
|
13 | - * distributed under the License is distributed on an "AS IS" BASIS, |
|
14 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
15 | - * See the License for the specific language governing permissions and |
|
16 | - * limitations under the License. |
|
17 | - */ |
|
4 | + * Copyright 2015-2018 [email protected] |
|
5 | + * |
|
6 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
|
7 | + * you may not use this file except in compliance with the License. |
|
8 | + * You may obtain a copy of the License at |
|
9 | + * |
|
10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
|
11 | + * |
|
12 | + * Unless required by applicable law or agreed to in writing, software |
|
13 | + * distributed under the License is distributed on an "AS IS" BASIS, |
|
14 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
15 | + * See the License for the specific language governing permissions and |
|
16 | + * limitations under the License. |
|
17 | + */ |
|
18 | 18 | |
19 | 19 | /** |
20 | 20 | * @package Limoncello\Flute |
@@ -1,20 +1,20 @@ |
||
1 | 1 | <?php namespace Limoncello\Flute\Contracts\Models; |
2 | 2 | |
3 | 3 | /** |
4 | - * Copyright 2015-2018 [email protected] |
|
5 | - * |
|
6 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
|
7 | - * you may not use this file except in compliance with the License. |
|
8 | - * You may obtain a copy of the License at |
|
9 | - * |
|
10 | - * http://www.apache.org/licenses/LICENSE-2.0 |
|
11 | - * |
|
12 | - * Unless required by applicable law or agreed to in writing, software |
|
13 | - * distributed under the License is distributed on an "AS IS" BASIS, |
|
14 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
15 | - * See the License for the specific language governing permissions and |
|
16 | - * limitations under the License. |
|
17 | - */ |
|
4 | + * Copyright 2015-2018 [email protected] |
|
5 | + * |
|
6 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
|
7 | + * you may not use this file except in compliance with the License. |
|
8 | + * You may obtain a copy of the License at |
|
9 | + * |
|
10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
|
11 | + * |
|
12 | + * Unless required by applicable law or agreed to in writing, software |
|
13 | + * distributed under the License is distributed on an "AS IS" BASIS, |
|
14 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
15 | + * See the License for the specific language governing permissions and |
|
16 | + * limitations under the License. |
|
17 | + */ |
|
18 | 18 | |
19 | 19 | /** |
20 | 20 | * @package Limoncello\Flute |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | public function fetchResources(QueryBuilder $builder, string $modelClass): PaginatedDataInterface; |
121 | 121 | |
122 | 122 | /** |
123 | - * @param QueryBuilder|null $builder |
|
123 | + * @param QueryBuilder $builder |
|
124 | 124 | * @param string|null $modelClass |
125 | 125 | * |
126 | 126 | * @return mixed|null |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | * @param string $modelClass |
141 | 141 | * @param string $columnName |
142 | 142 | * |
143 | - * @return iterable |
|
143 | + * @return \Generator |
|
144 | 144 | */ |
145 | 145 | public function fetchColumn(QueryBuilder $builder, string $modelClass, string $columnName): iterable; |
146 | 146 |
@@ -161,7 +161,7 @@ |
||
161 | 161 | public static function readRulesEndIndexes(array $arrayRuleIndexes): array; |
162 | 162 | |
163 | 163 | /** |
164 | - * @param array $arrayRuleIndexes |
|
164 | + * @param integer[] $arrayRuleIndexes |
|
165 | 165 | * @param string $name |
166 | 166 | * |
167 | 167 | * @return array |
@@ -35,7 +35,7 @@ |
||
35 | 35 | private $serializedRules = []; |
36 | 36 | |
37 | 37 | /** Index key */ |
38 | - protected const IDENTITY_RULE= 0; |
|
38 | + protected const IDENTITY_RULE = 0; |
|
39 | 39 | |
40 | 40 | /** Index key */ |
41 | 41 | protected const FILTER_RULES = self::IDENTITY_RULE + 1; |