Skip to content

Commit

Permalink
rebasing to master
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Dec 27, 2021
1 parent 0faf19d commit 2a8374a
Show file tree
Hide file tree
Showing 34 changed files with 127 additions and 429 deletions.
2 changes: 1 addition & 1 deletion src/Assets/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public function setFilter(bool $filter): AssetInterface
*
* @return AssetInterface
*/
public function setLocal(bool $flag): AssetInterface
public function setIsLocal(bool $flag): AssetInterface
{
}

Expand Down
3 changes: 0 additions & 3 deletions src/Di/FactoryDefault.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
*/
namespace Phalcon\Di;

use Phalcon\Assets\Manager as AssetManager;
use Phalcon\Html\Escaper;
use Phalcon\Html\TagFactory;
use Phalcon\Filter\FilterFactory;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Encryption/Security/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* Exceptions thrown in Phalcon\Security will use this class
*/
class Exception extends \Phalcon\Exception
class Exception extends \Exception
{


Expand Down
11 changes: 0 additions & 11 deletions src/Filter/Validation/AbstractValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,6 @@ protected function allowEmpty($field, $value): bool
{
}

/**
* Checks if field can be empty.
*
* @param mixed $field
* @param mixed $value *
* @return bool
*/
protected function allowEmpty($field, $value): bool
{
}

/**
* Create a default message by factory
*
Expand Down
24 changes: 12 additions & 12 deletions src/Filter/Validation/Validator/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Validation\Validator;
namespace Phalcon\Filter\Validation\Validator;

use Phalcon\Messages\Message;
use Phalcon\Support\Helper\Arr\Get;
use Phalcon\Validation;
use Phalcon\Validation\AbstractValidatorComposite;
use Phalcon\Validation\Validator\File\MimeType;
use Phalcon\Validation\Validator\File\Resolution\Equal as EqualResolution;
use Phalcon\Validation\Validator\File\Resolution\Max as MaxResolution;
use Phalcon\Validation\Validator\File\Resolution\Min as MinResolution;
use Phalcon\Validation\Validator\File\Size\Equal as EqualFileSize;
use Phalcon\Validation\Validator\File\Size\Max as MaxFileSize;
use Phalcon\Validation\Validator\File\Size\Min as MinFileSize;
use Phalcon\Filter\Validation;
use Phalcon\Filter\Validation\AbstractValidatorComposite;
use Phalcon\Filter\Validation\Validator\File\MimeType;
use Phalcon\Filter\Validation\Validator\File\Resolution\Equal as EqualResolution;
use Phalcon\Filter\Validation\Validator\File\Resolution\Max as MaxResolution;
use Phalcon\Filter\Validation\Validator\File\Resolution\Min as MinResolution;
use Phalcon\Filter\Validation\Validator\File\Size\Equal as EqualFileSize;
use Phalcon\Filter\Validation\Validator\File\Size\Max as MaxFileSize;
use Phalcon\Filter\Validation\Validator\File\Size\Min as MinFileSize;

/**
* Checks if a value has a correct file
*
* ```php
* use Phalcon\Validation;
* use Phalcon\Validation\Validator\File as FileValidator;
* use Phalcon\Filter\Validation;
* use Phalcon\Filter\Validation\Validator\File as FileValidator;
*
* $validator = new Validation();
*
Expand Down
1 change: 0 additions & 1 deletion src/Forms/Element/Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
class Check extends \Phalcon\Forms\Element\AbstractElement
{


/**
* @var string
*/
Expand Down
1 change: 0 additions & 1 deletion src/Forms/Element/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
class Date extends \Phalcon\Forms\Element\AbstractElement
{


/**
* @var string
*/
Expand Down
1 change: 0 additions & 1 deletion src/Forms/Element/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
class Email extends \Phalcon\Forms\Element\AbstractElement
{


/**
* @var string
*/
Expand Down
1 change: 0 additions & 1 deletion src/Forms/Element/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
class File extends \Phalcon\Forms\Element\AbstractElement
{


/**
* @var string
*/
Expand Down
1 change: 0 additions & 1 deletion src/Forms/Element/Hidden.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
class Hidden extends \Phalcon\Forms\Element\AbstractElement
{


/**
* @var string
*/
Expand Down
1 change: 0 additions & 1 deletion src/Forms/Element/Numeric.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
class Numeric extends \Phalcon\Forms\Element\AbstractElement
{


/**
* @var string
*/
Expand Down
1 change: 0 additions & 1 deletion src/Forms/Element/Password.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
class Password extends \Phalcon\Forms\Element\AbstractElement
{


/**
* @var string
*/
Expand Down
1 change: 0 additions & 1 deletion src/Forms/Element/Radio.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
class Radio extends \Phalcon\Forms\Element\AbstractElement
{


/**
* @var string
*/
Expand Down
1 change: 0 additions & 1 deletion src/Forms/Element/Submit.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
class Submit extends \Phalcon\Forms\Element\AbstractElement
{


/**
* @var string
*/
Expand Down
11 changes: 1 addition & 10 deletions src/Forms/Element/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
namespace Phalcon\Forms\Element;

use Phalcon\Tag;
use Phalcon\Forms\Exception;

/**
* Phalcon\Forms\Element\Text
Expand All @@ -20,13 +20,4 @@ class Text extends \Phalcon\Forms\Element\AbstractElement
{


/**
* Renders the element widget
*
* @param array $attributes
* @return string
*/
public function render(array $attributes = []): string
{
}
}
1 change: 0 additions & 1 deletion src/Forms/Element/TextArea.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
class TextArea extends \Phalcon\Forms\Element\AbstractElement
{


/**
* @var string
*/
Expand Down
69 changes: 47 additions & 22 deletions src/Forms/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
use Phalcon\Forms\Element\ElementInterface;
use Phalcon\Html\Attributes;
use Phalcon\Html\Attributes\AttributesInterface;
use Phalcon\Html\TagFactory;
use Phalcon\Messages\Messages;
use Phalcon\Tag;
use Phalcon\Validation;
use Phalcon\Validation\ValidationInterface;
use Phalcon\Filter\Validation;
use Phalcon\Filter\Validation\ValidationInterface;

/**
* This component allows to build forms using an object-oriented interface
Expand Down Expand Up @@ -73,6 +74,11 @@ class Form extends Injectable implements \Countable, \Iterator, \Phalcon\Html\At
*/
protected $options = [];

/**
* @var TagFactory|null
*/
protected $tagFactory = null;

/**
* @var ValidationInterface|null
*/
Expand Down Expand Up @@ -205,6 +211,16 @@ public function getEntity()
{
}

/**
* Gets a value from the internal filtered data or calls getValue(name)
*
* @param string $name
* @return mixed|null
*/
public function getFilteredValue(string $name)
{
}

/**
* Returns a label for an element
*
Expand Down Expand Up @@ -244,6 +260,15 @@ public function getMessagesFor(string $name): Messages
{
}

/**
* Returns the tagFactory object
*
* @return TagFactory|null
*/
public function getTagFactory(): ?TagFactory
{
}

/**
* Returns the value of an option if present
*
Expand All @@ -264,16 +289,6 @@ public function getUserOptions(): array
{
}

/**
* Gets a value from the internal filtered data or calls getValue(name)
*
* @param string $name
* @return mixed|null
*/
public function getFilteredValue(string $name)
{
}

/**
* Gets a value from the internal related entity or from the default value
*
Expand Down Expand Up @@ -385,6 +400,16 @@ public function setAction(string $action): Form
{
}

/**
* Set form attributes collection
*
* @param \Phalcon\Html\Attributes $attributes
* @return AttributesInterface
*/
public function setAttributes(\Phalcon\Html\Attributes $attributes): AttributesInterface
{
}

/**
* Sets the entity related to the model
*
Expand All @@ -396,32 +421,32 @@ public function setEntity($entity): Form
}

/**
* Sets the default validation
* Sets the tagFactory for the form
*
* @param ValidationInterface $validation
* @param \Phalcon\Html\TagFactory $tagFactory
* @return Form
*/
public function setValidation(\Phalcon\Validation\ValidationInterface $validation): Form
public function setTagFactory(\Phalcon\Html\TagFactory $tagFactory): Form
{
}

/**
* Sets the default whitelist
* Sets the default validation
*
* @param array $whitelist
* @param ValidationInterface $validation
* @return Form
*/
public function setWhitelist(array $whitelist): Form
public function setValidation(\Phalcon\Filter\Validation\ValidationInterface $validation): Form
{
}

/**
* Set form attributes collection
* Sets the default whitelist
*
* @param \Phalcon\Html\Attributes $attributes
* @return AttributesInterface
* @param array $whitelist
* @return Form
*/
public function setAttributes(\Phalcon\Html\Attributes $attributes): AttributesInterface
public function setWhitelist(array $whitelist): Form
{
}

Expand Down
6 changes: 5 additions & 1 deletion src/Html/Escaper.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ class Escaper implements \Phalcon\Html\Escaper\EscaperInterface
protected $encoding = 'utf-8';

/**
* ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401
*
* @var int
*/
protected $flags = 3;
protected $flags = 11;

/**
* @return string
Expand All @@ -54,6 +56,8 @@ public function getEncoding(): string
}

/**
* ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401
*
* @return int
*/
public function getFlags(): int
Expand Down
2 changes: 1 addition & 1 deletion src/Html/Escaper/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* Exceptions thrown in Phalcon\Html\Escaper will use this class
*/
class Exception extends \Phalcon\Exception
class Exception extends \Exception
{


Expand Down
4 changes: 2 additions & 2 deletions src/Html/TagFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ public function __construct(\Phalcon\Html\Escaper\EscaperInterface $escaper, arr
* Magic call to make the helper objects available as methods.
*
* @param string $name
* @param array $args
* @param array $arguments
*
* @return false|mixed
*/
public function __call(string $name, array $args)
public function __call(string $name, array $arguments)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Http/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
use DateTime;
use DateTimeZone;
use InvalidArgumentException;
use Phalcon\Di;
use Phalcon\Di\Di;
use Phalcon\Di\DiInterface;
use Phalcon\Http\Message\ResponseStatusCodeInterface;
use Phalcon\Http\Response\Exception;
use Phalcon\Http\Response\HeadersInterface;
use Phalcon\Http\Response\CookiesInterface;
use Phalcon\Url\UrlInterface;
use Phalcon\Mvc\Url\UrlInterface;
use Phalcon\Mvc\ViewInterface;
use Phalcon\Http\Response\Headers;
use Phalcon\Di\InjectionAwareInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Response/Cookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* `Phalcon\Http\Response\Cookies::setSignKey()`.
*
* ```php
* use Phalcon\Di;
* use Phalcon\Di\Di;
* use Phalcon\Encryption\Crypt;
* use Phalcon\Http\Response\Cookies;
*
Expand Down
Loading

0 comments on commit 2a8374a

Please sign in to comment.