Skip to content

Commit 3e5306e

Browse files
committed
Updated to Phalcon 4 RC-2
1 parent 842fb65 commit 3e5306e

File tree

463 files changed

+1191
-5337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

463 files changed

+1191
-5337
lines changed

plugin/META-INF/plugin.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<idea-plugin version="2">
22
<id>io.ruudboon.phpstorm-phalcon-4-autocomplete</id>
33
<name>Phalcon 4 Autocomplete</name>
4-
<version>4.0.0-rc.1</version>
4+
<version>4.0.0-rc.2</version>
55
<vendor email="[email protected]" url="https://github.com/ruudboon/phpstorm-phalcon-4-autocomplete">Ruud Boon</vendor>
66

77
<description><![CDATA[
88
Provides autocomplete functionality for Phalcon 4.
99
]]></description>
1010

1111
<change-notes><![CDATA[
12-
<h3>4.0.0-rc.1</h3>
12+
<h3>4.0.0-rc.2</h3>
1313
<ul>
1414
<li>Initial support of Phalcon V4</li>
1515
</ul>

plugin/src/Phalcon/Cache.php

Lines changed: 19 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
11
<?php
22

3-
/**
4-
* This file is part of the Phalcon Framework.
5-
*
6-
* (c) Phalcon Team <[email protected]>
7-
*
8-
* For the full copyright and license information, please view the LICENSE.txt
9-
* file that was distributed with this source code.
10-
*/
11-
123
namespace Phalcon;
134

145
use Phalcon\Cache\Adapter\AdapterInterface;
6+
use Phalcon\Cache\Exception\InvalidArgumentException;
157
use Psr\SimpleCache\CacheInterface;
168

179
/**
1810
* This component offers caching capabilities for your application.
1911
* Phalcon\Cache implements PSR-16.
2012
*/
21-
class Cache implements CacheInterface
13+
class Cache implements \Psr\SimpleCache\CacheInterface
2214
{
2315
/**
2416
* The adapter
@@ -49,7 +41,7 @@ public function __construct(\Phalcon\Cache\Adapter\AdapterInterface $adapter)
4941
/**
5042
* Wipes clean the entire cache's keys.
5143
*
52-
* @return bool
44+
* @return bool True on success and false on failure.
5345
*/
5446
public function clear(): bool
5547
{
@@ -62,9 +54,7 @@ public function clear(): bool
6254
*
6355
* @return bool True if the item was successfully removed. False if there was an error.
6456
*
65-
* @throws Phalcon\Cache\Exception\InvalidArgumentException MUST be thrown if the $key string is not a legal value.
66-
* @param mixed $key
67-
* @return bool
57+
* @throws InvalidArgumentException MUST be thrown if the $key string is not a legal value.
6858
*/
6959
public function delete($key): bool
7060
{
@@ -77,9 +67,7 @@ public function delete($key): bool
7767
*
7868
* @return bool True if the items were successfully removed. False if there was an error.
7969
*
80-
* @throws Phalcon\Cache\Exception\InvalidArgumentException MUST be thrown if $keys is neither an array nor a Traversable, or if any of the $keys are not a legal value.
81-
* @param mixed $keys
82-
* @return bool
70+
* @throws InvalidArgumentException MUST be thrown if $keys is neither an array nor a Traversable, or if any of the $keys are not a legal value.
8371
*/
8472
public function deleteMultiple($keys): bool
8573
{
@@ -88,14 +76,12 @@ public function deleteMultiple($keys): bool
8876
/**
8977
* Fetches a value from the cache.
9078
*
91-
* @param mixed $default Default value to return if the key does not exist.
79+
* @param string $key The unique key of this item in the cache.
80+
* @param mixed $defaultValue Default value to return if the key does not exist.
9281
*
9382
* @return mixed The value of the item from the cache, or $default in case of cache miss.
9483
*
95-
* @throws Phalcon\Cache\Exception\InvalidArgumentException MUST be thrown if the $key string is not a legal value.
96-
* @param string $key The unique key of this item in the cache.
97-
* @param mixed $defaultValue
98-
* @return mixed
84+
* @throws InvalidArgumentException MUST be thrown if the $key string is not a legal value.
9985
*/
10086
public function get($key, $defaultValue = null)
10187
{
@@ -104,14 +90,12 @@ public function get($key, $defaultValue = null)
10490
/**
10591
* Obtains multiple cache items by their unique keys.
10692
*
107-
* @param mixed $default Default value to return for keys that do not exist.
93+
* @param iterable $keys A list of keys that can obtained in a single operation.
94+
* @param mixed $defaultValue Default value to return for keys that do not exist.
10895
*
10996
* @return iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value.
11097
*
111-
* @throws Phalcon\Cache\Exception\InvalidArgumentException MUST be thrown if $keys is neither an array nor a Traversable, or if any of the $keys are not a legal value.
112-
* @param iterable $keys A list of keys that can obtained in a single operation.
113-
* @param mixed $defaultValue
114-
* @return mixed
98+
* @throws InvalidArgumentException MUST be thrown if $keys is neither an array nor a Traversable, or if any of the $keys are not a legal value.
11599
*/
116100
public function getMultiple($keys, $defaultValue = null)
117101
{
@@ -124,9 +108,7 @@ public function getMultiple($keys, $defaultValue = null)
124108
*
125109
* @return bool
126110
*
127-
* @throws Phalcon\Cache\Exception\InvalidArgumentException MUST be thrown if the $key string is not a legal value.
128-
* @param mixed $key
129-
* @return bool
111+
* @throws InvalidArgumentException MUST be thrown if the $key string is not a legal value.
130112
*/
131113
public function has($key): bool
132114
{
@@ -135,17 +117,15 @@ public function has($key): bool
135117
/**
136118
* Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
137119
*
138-
* @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
120+
* @param string $key The key of the item to store.
121+
* @param mixed $value The value of the item to store. Must be serializable.
122+
* @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
139123
* the driver supports TTL then the library may set a default value
140124
* for it or let the driver take care of that.
141125
*
142126
* @return bool True on success and false on failure.
143127
*
144-
* @throws Phalcon\Cache\Exception\InvalidArgumentException MUST be thrown if the $key string is not a legal value.
145-
* @param string $key The key of the item to store.
146-
* @param mixed $value The value of the item to store. Must be serializable.
147-
* @param mixed $ttl
148-
* @return bool
128+
* @throws InvalidArgumentException MUST be thrown if the $key string is not a legal value.
149129
*/
150130
public function set($key, $value, $ttl = null): bool
151131
{
@@ -154,16 +134,14 @@ public function set($key, $value, $ttl = null): bool
154134
/**
155135
* Persists a set of key => value pairs in the cache, with an optional TTL.
156136
*
157-
* @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
137+
* @param iterable $values A list of key => value pairs for a multiple-set operation.
138+
* @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
158139
* the driver supports TTL then the library may set a default value
159140
* for it or let the driver take care of that.
160141
*
161142
* @return bool True on success and false on failure.
162143
*
163-
* @throws Phalcon\Cache\Exception\InvalidArgumentException MUST be thrown if $values is neither an array nor a Traversable, or if any of the $values are not a legal value.
164-
* @param iterable $values A list of key => value pairs for a multiple-set operation.
165-
* @param mixed $ttl
166-
* @return bool
144+
* @throws InvalidArgumentException MUST be thrown if $values is neither an array nor a Traversable, or if any of the $values are not a legal value.
167145
*/
168146
public function setMultiple($values, $ttl = null): bool
169147
{

plugin/src/Phalcon/Collection.php

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,22 @@
11
<?php
22

3-
/**
4-
* This file is part of the Phalcon Framework.
5-
*
6-
* (c) Phalcon Team <[email protected]>
7-
*
8-
* For the full copyright and license information, please view the LICENSE.txt
9-
* file that was distributed with this source code.
10-
*/
11-
123
namespace Phalcon;
134

14-
use ArrayAccess;
15-
use Countable;
16-
use IteratorAggregate;
17-
use JsonSerializable;
18-
use Serializable;
195
use Traversable;
206

217
/**
22-
* `Phalcon\Collection` is a supercharged object oriented array. It implements [ArrayAccess](https://www.php.net/manual/en/class.arrayaccess.php), [Countable](https://www.php.net/manual/en/class.countable.php), [IteratorAggregate](https://www.php.net/manual/en/class.iteratoraggregate.php), [JsonSerializable](https://www.php.net/manual/en/class.jsonserializable.php), [Serializable](https://www.php.net/manual/en/class.serializable.php)
8+
* `Phalcon\Collection` is a supercharged object oriented array. It implements:
9+
* - [ArrayAccess](https://www.php.net/manual/en/class.arrayaccess.php)
10+
* - [Countable](https://www.php.net/manual/en/class.countable.php)
11+
* - [IteratorAggregate](https://www.php.net/manual/en/class.iteratoraggregate.php)
12+
* - [JsonSerializable](https://www.php.net/manual/en/class.jsonserializable.php)
13+
* - [Serializable](https://www.php.net/manual/en/class.serializable.php)
2314
*
2415
* It can be used in any part of the application that needs collection of data
2516
* Such implementations are for instance accessing globals `$_GET`, `$_POST`
2617
* etc.
2718
*/
28-
class Collection implements
29-
ArrayAccess,
30-
Countable,
31-
IteratorAggregate,
32-
JsonSerializable,
33-
Serializable
19+
class Collection implements \ArrayAccess, \Countable, \IteratorAggregate, \JsonSerializable, \Serializable
3420
{
3521
/**
3622
* @var array
@@ -119,9 +105,10 @@ public function count(): int
119105
*
120106
* @param string $element
121107
* @param mixed $defaultValue
108+
* @param string $cast
122109
* @return mixed
123110
*/
124-
public function get(string $element, $defaultValue = null)
111+
public function get(string $element, $defaultValue = null, string $cast = null)
125112
{
126113
}
127114

plugin/src/Phalcon/Config.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
<?php
22

3-
/**
4-
* This file is part of the Phalcon Framework.
5-
*
6-
* (c) Phalcon Team <[email protected]>
7-
*
8-
* For the full copyright and license information, please view the LICENSE.txt
9-
* file that was distributed with this source code.
10-
*/
11-
123
namespace Phalcon;
134

145
/**
@@ -17,7 +8,7 @@
178
* based user interface for accessing this configuration data within application
189
* code.
1910
*
20-
*```php
11+
* ```php
2112
* $config = new \Phalcon\Config(
2213
* [
2314
* "database" => [
@@ -34,7 +25,7 @@
3425
* ],
3526
* ]
3627
* );
37-
*```
28+
* ```
3829
*/
3930
class Config extends Collection
4031
{

plugin/src/Phalcon/Container.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
11
<?php
22

3-
/**
4-
* This file is part of the Phalcon Framework.
5-
*
6-
* (c) Phalcon Team <[email protected]>
7-
*
8-
* For the full copyright and license information, please view the LICENSE.txt
9-
* file that was distributed with this source code.
10-
*/
11-
123
namespace Phalcon;
134

145
use Phalcon\Di\DiInterface;
15-
use Psr\Container\ContainerInterface;
166

177
/**
188
* PSR-11 Wrapper for `Phalcon\Di`
199
*/
20-
class Container implements ContainerInterface
10+
class Container implements \Psr\Container\ContainerInterface
2111
{
2212
/**
23-
* @var <DiInterface>
13+
* @var DiInterface
2414
*/
2515
protected $container;
2616

plugin/src/Phalcon/Crypt.php

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
<?php
22

3-
/**
4-
* This file is part of the Phalcon Framework.
5-
*
6-
* (c) Phalcon Team <[email protected]>
7-
*
8-
* For the full copyright and license information, please view the LICENSE.txt
9-
* file that was distributed with this source code.
10-
*/
11-
123
namespace Phalcon;
134

145
use Phalcon\Crypt\CryptInterface;
@@ -31,7 +22,7 @@
3122
* echo $crypt->decrypt($encrypted, $key);
3223
* ```
3324
*/
34-
class Crypt implements CryptInterface
25+
class Crypt implements \Phalcon\Crypt\CryptInterface
3526
{
3627

3728
const PADDING_ANSI_X_923 = 1;
@@ -165,11 +156,11 @@ public function decrypt(string $text, string $key = null): string
165156
/**
166157
* Decrypt a text that is coded as a base64 string.
167158
*
168-
* @throws \Phalcon\Crypt\Mismatch
169159
* @param string $text
170160
* @param mixed $key
171161
* @param bool $safe
172162
* @return string
163+
* @throws \Phalcon\Crypt\Mismatch
173164
*/
174165
public function decryptBase64(string $text, $key = null, bool $safe = false): string
175166
{
@@ -293,9 +284,9 @@ public function setCipher(string $cipher): CryptInterface
293284
/**
294285
* Set the name of hashing algorithm.
295286
*
296-
* @throws \Phalcon\Crypt\Exception
297287
* @param string $hashAlgo
298288
* @return \Phalcon\Crypt\CryptInterface
289+
* @throws \Phalcon\Crypt\Exception
299290
*/
300291
public function setHashAlgo(string $hashAlgo): CryptInterface
301292
{

plugin/src/Phalcon/Debug.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
<?php
22

3-
/**
4-
* This file is part of the Phalcon Framework.
5-
*
6-
* (c) Phalcon Team <[email protected]>
7-
*
8-
* For the full copyright and license information, please view the LICENSE.txt
9-
* file that was distributed with this source code.
10-
*/
11-
123
namespace Phalcon;
134

145
/**

plugin/src/Phalcon/Di.php

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
<?php
22

3-
/**
4-
* This file is part of the Phalcon Framework.
5-
*
6-
* (c) Phalcon Team <[email protected]>
7-
*
8-
* For the full copyright and license information, please view the LICENSE.txt
9-
* file that was distributed with this source code.
10-
*/
11-
123
namespace Phalcon;
134

145
use Phalcon\Di\DiInterface;
15-
use Phalcon\Di\Exception\ServiceResolutionException;
166
use Phalcon\Di\ServiceInterface;
177
use Phalcon\Events\ManagerInterface;
188

@@ -34,7 +24,7 @@
3424
* Additionally, this pattern increases testability in the code, thus making it
3525
* less prone to errors.
3626
*
37-
*```php
27+
* ```php
3828
* use Phalcon\Di;
3929
* use Phalcon\Http\Request;
4030
*
@@ -52,9 +42,9 @@
5242
* );
5343
*
5444
* $request = $di->getRequest();
55-
*```
45+
* ```
5646
*/
57-
class Di implements DiInterface
47+
class Di implements \Phalcon\Di\DiInterface
5848
{
5949
/**
6050
* List of registered services

0 commit comments

Comments
 (0)