From 9452abef10c902ccfe7e8472a8d7d171868bd097 Mon Sep 17 00:00:00 2001 From: Dean Blackborough Date: Sat, 2 Jun 2018 10:03:40 +0100 Subject: [PATCH 1/3] PHP 7.1 * Revert to PHP 7.1 for requirements? --- .travis.yml | 1 + README.md | 2 +- composer.json | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 39328f5..6da7168 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: php php: - '7.2' + - '7.1' install: - composer install --no-interaction diff --git a/README.md b/README.md index e3e004d..7ddf9dc 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![Latest Stable Version](https://img.shields.io/packagist/v/deanblackborough/php-quill-renderer.svg?style=flat-square)](https://packagist.org/packages/deanblackborough/php-quill-renderer) ![Packagist](https://img.shields.io/packagist/dt/deanblackborough/php-quill-renderer.svg) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/deanblackborough/php-quill-renderer/blob/master/LICENSE) -[![Minimum PHP Version](https://img.shields.io/badge/php->=7.2-8892BF.svg)](https://php.net/) +[![Minimum PHP Version](https://img.shields.io/badge/php->=7.1-8892BF.svg)](https://php.net/) [![Build Status](https://travis-ci.org/deanblackborough/php-quill-renderer.svg?branch=master)](https://travis-ci.org/deanblackborough/php-quill-renderer) [![Coverage Status](https://coveralls.io/repos/github/deanblackborough/php-quill-renderer/badge.svg?branch=master)](https://coveralls.io/github/deanblackborough/php-quill-renderer?branch=master) diff --git a/composer.json b/composer.json index 8d73c94..a76a22a 100644 --- a/composer.json +++ b/composer.json @@ -15,12 +15,15 @@ } ], "require": { - "php": "^7.2" + "php": "^7.1" }, "require-dev": { "phpunit/phpunit": "^7", "php-coveralls/php-coveralls": "^2" }, + "suggest": { + "php": "^7.2" + }, "repositories": [ { "type": "vcs", From ab9dfbb6db69139873df9730a30df9a92d5c7fb0 Mon Sep 17 00:00:00 2001 From: Dean Blackborough Date: Sat, 2 Jun 2018 10:11:15 +0100 Subject: [PATCH 2/3] Fixes * Added visibility * Updated composer requirements --- composer.lock | 267 ++++++++++++------------ src/Interfaces/ParserSplitInterface.php | 4 +- 2 files changed, 140 insertions(+), 131 deletions(-) diff --git a/composer.lock b/composer.lock index 82592e4..788fe00 100644 --- a/composer.lock +++ b/composer.lock @@ -1,10 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bd1b19a09e5b7c972d739d8f68841e4e", + "content-hash": "88fa0cd3f22dcdaf0472bfd239cf2168", "packages": [], "packages-dev": [ { @@ -244,25 +244,28 @@ }, { "name": "myclabs/deep-copy", - "version": "1.7.0", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" + "reference": "478465659fd987669df0bd8a9bf22a8710e5f1b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/478465659fd987669df0bd8a9bf22a8710e5f1b6", + "reference": "478465659fd987669df0bd8a9bf22a8710e5f1b6", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" }, "require-dev": { "doctrine/collections": "^1.0", "doctrine/common": "^2.6", - "phpunit/phpunit": "^4.1" + "phpunit/phpunit": "^7.1" }, "type": "library", "autoload": { @@ -285,7 +288,7 @@ "object", "object graph" ], - "time": "2017-10-19T19:58:43+00:00" + "time": "2018-05-29T17:25:09+00:00" }, { "name": "phar-io/manifest", @@ -391,16 +394,16 @@ }, { "name": "php-coveralls/php-coveralls", - "version": "v2.0.0", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/php-coveralls/php-coveralls.git", - "reference": "3eaf7eb689cdf6b86801a3843940d974dc657068" + "reference": "3b00c229726f892bfdadeaf01ea430ffd04a939d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/3eaf7eb689cdf6b86801a3843940d974dc657068", - "reference": "3eaf7eb689cdf6b86801a3843940d974dc657068", + "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/3b00c229726f892bfdadeaf01ea430ffd04a939d", + "reference": "3b00c229726f892bfdadeaf01ea430ffd04a939d", "shasum": "" }, "require": { @@ -426,7 +429,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -470,7 +473,7 @@ "github", "test" ], - "time": "2017-12-08T14:28:16+00:00" + "time": "2018-05-22T23:11:08+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -689,23 +692,23 @@ }, { "name": "phpunit/php-code-coverage", - "version": "6.0.4", + "version": "6.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "52187754b0eed0b8159f62a6fa30073327e8c2ca" + "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/52187754b0eed0b8159f62a6fa30073327e8c2ca", - "reference": "52187754b0eed0b8159f62a6fa30073327e8c2ca", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/865662550c384bc1db7e51d29aeda1c2c161d69a", + "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", "php": "^7.1", - "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-file-iterator": "^2.0", "phpunit/php-text-template": "^1.2.1", "phpunit/php-token-stream": "^3.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", @@ -748,29 +751,29 @@ "testing", "xunit" ], - "time": "2018-04-29T14:59:09+00:00" + "time": "2018-06-01T07:51:50+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.5", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + "reference": "e20525b0c2945c7c317fff95660698cb3d2a53bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/e20525b0c2945c7c317fff95660698cb3d2a53bc", + "reference": "e20525b0c2945c7c317fff95660698cb3d2a53bc", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -785,7 +788,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -795,7 +798,7 @@ "filesystem", "iterator" ], - "time": "2017-11-27T13:52:08+00:00" + "time": "2018-05-28T12:13:49+00:00" }, { "name": "phpunit/php-text-template", @@ -938,34 +941,34 @@ }, { "name": "phpunit/phpunit", - "version": "7.1.5", + "version": "7.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ca64dba53b88aba6af32aebc6b388068db95c435" + "reference": "3cf0836680bf5c365c627e8566d46c9e1f544db9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ca64dba53b88aba6af32aebc6b388068db95c435", - "reference": "ca64dba53b88aba6af32aebc6b388068db95c435", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3cf0836680bf5c365c627e8566d46c9e1f544db9", + "reference": "3cf0836680bf5c365c627e8566d46c9e1f544db9", "shasum": "" }, "require": { + "doctrine/instantiator": "^1.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.6.1", + "myclabs/deep-copy": "^1.7", "phar-io/manifest": "^1.0.1", "phar-io/version": "^1.0", "php": "^7.1", "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.1", - "phpunit/php-file-iterator": "^1.4.3", + "phpunit/php-code-coverage": "^6.0.7", + "phpunit/php-file-iterator": "^2.0", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.0", - "phpunit/phpunit-mock-objects": "^6.1.1", "sebastian/comparator": "^3.0", "sebastian/diff": "^3.0", "sebastian/environment": "^3.1", @@ -975,10 +978,14 @@ "sebastian/resource-operations": "^1.0", "sebastian/version": "^2.0.1" }, + "conflict": { + "phpunit/phpunit-mock-objects": "*" + }, "require-dev": { "ext-pdo": "*" }, "suggest": { + "ext-soap": "*", "ext-xdebug": "*", "phpunit/php-invoker": "^2.0" }, @@ -988,7 +995,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.1-dev" + "dev-master": "7.2-dev" } }, "autoload": { @@ -1014,63 +1021,7 @@ "testing", "xunit" ], - "time": "2018-04-29T15:09:19+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "6.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/70c740bde8fd9ea9ea295be1cd875dd7b267e157", - "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.5", - "php": "^7.1", - "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2018-04-11T04:50:36+00:00" + "time": "2018-06-01T07:54:27+00:00" }, { "name": "psr/http-message", @@ -1734,21 +1685,22 @@ }, { "name": "symfony/config", - "version": "v4.0.9", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "7c19370ab04e9ac05b74a504198e165f5ccf6dd8" + "reference": "5ceefc256caecc3e25147c4e5b933de71d0020c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/7c19370ab04e9ac05b74a504198e165f5ccf6dd8", - "reference": "7c19370ab04e9ac05b74a504198e165f5ccf6dd8", + "url": "https://api.github.com/repos/symfony/config/zipball/5ceefc256caecc3e25147c4e5b933de71d0020c4", + "reference": "5ceefc256caecc3e25147c4e5b933de71d0020c4", "shasum": "" }, "require": { "php": "^7.1.3", - "symfony/filesystem": "~3.4|~4.0" + "symfony/filesystem": "~3.4|~4.0", + "symfony/polyfill-ctype": "~1.8" }, "conflict": { "symfony/finder": "<3.4" @@ -1765,7 +1717,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -1792,20 +1744,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2018-03-19T22:35:49+00:00" + "time": "2018-05-16T14:33:22+00:00" }, { "name": "symfony/console", - "version": "v4.0.9", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3e820bc2c520a87ca209ad8fa961c97f42e0b4ae" + "reference": "2d5d973bf9933d46802b01010bd25c800c87c242" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3e820bc2c520a87ca209ad8fa961c97f42e0b4ae", - "reference": "3e820bc2c520a87ca209ad8fa961c97f42e0b4ae", + "url": "https://api.github.com/repos/symfony/console/zipball/2d5d973bf9933d46802b01010bd25c800c87c242", + "reference": "2d5d973bf9933d46802b01010bd25c800c87c242", "shasum": "" }, "require": { @@ -1833,7 +1785,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -1860,29 +1812,30 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-04-30T01:23:47+00:00" + "time": "2018-05-30T07:26:09+00:00" }, { "name": "symfony/filesystem", - "version": "v4.0.9", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21" + "reference": "562bf7005b55fd80d26b582d28e3e10f2dd5ae9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21", - "reference": "5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/562bf7005b55fd80d26b582d28e3e10f2dd5ae9c", + "reference": "562bf7005b55fd80d26b582d28e3e10f2dd5ae9c", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -1909,7 +1862,62 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2018-02-22T10:50:29+00:00" + "time": "2018-05-30T07:26:09+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.8.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae", + "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-04-30T19:57:29+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -1972,16 +1980,16 @@ }, { "name": "symfony/stopwatch", - "version": "v4.0.9", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "6795ffa2f8eebedac77f045aa62c0c10b2763042" + "reference": "07463bbbbbfe119045a24c4a516f92ebd2752784" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/6795ffa2f8eebedac77f045aa62c0c10b2763042", - "reference": "6795ffa2f8eebedac77f045aa62c0c10b2763042", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/07463bbbbbfe119045a24c4a516f92ebd2752784", + "reference": "07463bbbbbfe119045a24c4a516f92ebd2752784", "shasum": "" }, "require": { @@ -1990,7 +1998,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -2017,24 +2025,25 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2018-02-19T16:50:22+00:00" + "time": "2018-02-19T16:51:42+00:00" }, { "name": "symfony/yaml", - "version": "v4.0.9", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "275ad099e4cbe612a2acbca14a16dd1c5311324d" + "reference": "80e4bfa9685fc4a09acc4a857ec16974a9cd944e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/275ad099e4cbe612a2acbca14a16dd1c5311324d", - "reference": "275ad099e4cbe612a2acbca14a16dd1c5311324d", + "url": "https://api.github.com/repos/symfony/yaml/zipball/80e4bfa9685fc4a09acc4a857ec16974a9cd944e", + "reference": "80e4bfa9685fc4a09acc4a857ec16974a9cd944e", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" }, "conflict": { "symfony/console": "<3.4" @@ -2048,7 +2057,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -2075,7 +2084,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-04-08T08:49:08+00:00" + "time": "2018-05-30T07:26:09+00:00" }, { "name": "theseer/tokenizer", @@ -2174,7 +2183,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.2" + "php": "^7.1" }, "platform-dev": [] } diff --git a/src/Interfaces/ParserSplitInterface.php b/src/Interfaces/ParserSplitInterface.php index d5ed854..915e5c9 100644 --- a/src/Interfaces/ParserSplitInterface.php +++ b/src/Interfaces/ParserSplitInterface.php @@ -19,7 +19,7 @@ interface ParserSplitInterface * * @return array array of inserts, two indexes, insert and close */ - function splitInsertsOnNewLines($insert): array; + public function splitInsertsOnNewLines($insert): array; /** * Split an insert on a single new line and handle accordingly @@ -28,5 +28,5 @@ function splitInsertsOnNewLines($insert): array; * * @return array array of inserts, three indexes, insert, close and new_line */ - function splitInsertsOnNewLine($insert): array; + public function splitInsertsOnNewLine($insert): array; } From 3642b345f88e8074ced9aac9f58e5ec4e73d88f3 Mon Sep 17 00:00:00 2001 From: Dean Blackborough Date: Sat, 2 Jun 2018 10:15:23 +0100 Subject: [PATCH 3/3] Method sigs * Method sigs not compatible --- src/Interfaces/ParserAttributeInterface.php | 2 +- src/Parser/Html.php | 24 ++++++++++----------- src/Parser/Markdown.php | 24 ++++++++++----------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/Interfaces/ParserAttributeInterface.php b/src/Interfaces/ParserAttributeInterface.php index 0a11544..b669b08 100644 --- a/src/Interfaces/ParserAttributeInterface.php +++ b/src/Interfaces/ParserAttributeInterface.php @@ -110,7 +110,7 @@ public function insert(array $quill); * * @return void */ - public function extendedInsert($quill); + public function extendedInsert(array $quill); /** * Multiple attributes set, handle accordingly diff --git a/src/Parser/Html.php b/src/Parser/Html.php index 793c346..945af25 100644 --- a/src/Parser/Html.php +++ b/src/Parser/Html.php @@ -154,7 +154,7 @@ public function splitInsertsOnNewLine($insert): array * * @return void */ - public function attributeBold($quill) + public function attributeBold(array $quill) { if ($quill['attributes'][OPTIONS::ATTRIBUTE_BOLD] === true) { $this->deltas[] = new Bold($quill['insert']); @@ -169,7 +169,7 @@ public function attributeBold($quill) * * @return void */ - public function attributeHeader($quill) + public function attributeHeader(array $quill) { if (in_array($quill['attributes'][OPTIONS::ATTRIBUTE_HEADER], array(1, 2, 3, 4, 5, 6, 7)) === true) { $insert = $this->deltas[count($this->deltas) - 1]->getInsert(); @@ -188,7 +188,7 @@ public function attributeHeader($quill) * * @return void */ - public function attributeItalic($quill) + public function attributeItalic(array $quill) { if ($quill['attributes'][OPTIONS::ATTRIBUTE_ITALIC] === true) { $this->deltas[] = new Italic($quill['insert']); @@ -203,7 +203,7 @@ public function attributeItalic($quill) * * @return void */ - public function attributeLink($quill) + public function attributeLink(array $quill) { if (strlen($quill['attributes'][OPTIONS::ATTRIBUTE_LINK]) > 0) { $this->deltas[] = new Link( @@ -221,7 +221,7 @@ public function attributeLink($quill) * * @return void */ - public function attributeList($quill) + public function attributeList(array $quill) { if (in_array($quill['attributes'][OPTIONS::ATTRIBUTE_LIST], array('ordered', 'bullet')) === true) { $insert = $this->deltas[count($this->deltas) - 1]->getInsert(); @@ -253,7 +253,7 @@ public function attributeList($quill) * * @return void */ - public function attributeScript($quill) + public function attributeScript(array $quill) { if ($quill['attributes'][OPTIONS::ATTRIBUTE_SCRIPT] === Options::ATTRIBUTE_SCRIPT_SUB) { $this->deltas[] = new SubScript($quill['insert']); @@ -271,7 +271,7 @@ public function attributeScript($quill) * * @return void */ - public function attributeStrike($quill) + public function attributeStrike(array $quill) { if ($quill['attributes'][OPTIONS::ATTRIBUTE_STRIKE] === true) { $this->deltas[] = new Strike($quill['insert']); @@ -286,7 +286,7 @@ public function attributeStrike($quill) * * @return void */ - public function attributeUnderline($quill) + public function attributeUnderline(array $quill) { if ($quill['attributes'][OPTIONS::ATTRIBUTE_UNDERLINE] === true) { $this->deltas[] = new Underline($quill['insert']); @@ -300,7 +300,7 @@ public function attributeUnderline($quill) * * @return void */ - public function insert($quill) + public function insert(array $quill) { $this->deltas[] = new Insert($quill['insert'], $quill['attributes']); } @@ -312,7 +312,7 @@ public function insert($quill) * * @return void */ - public function compoundInsert($quill) + public function compoundInsert(array $quill) { if (count($quill['attributes']) > 0) { if (is_array($quill['insert']) === false) { @@ -335,7 +335,7 @@ public function compoundInsert($quill) * * @return void */ - public function image($quill) + public function image(array $quill) { $this->deltas[] = new Image($quill['insert']['image']); } @@ -348,7 +348,7 @@ public function image($quill) * * @return void */ - public function extendedInsert($quill) + public function extendedInsert(array $quill) { $inserts = $this->splitInsertsOnNewLines($quill['insert']); diff --git a/src/Parser/Markdown.php b/src/Parser/Markdown.php index d43a696..e2f11b1 100644 --- a/src/Parser/Markdown.php +++ b/src/Parser/Markdown.php @@ -51,7 +51,7 @@ public function __construct() * * @return void */ - public function attributeBold($quill) + public function attributeBold(array $quill) { if ($quill['attributes'][OPTIONS::ATTRIBUTE_BOLD] === true) { $this->deltas[] = new Bold($quill['insert']); @@ -66,7 +66,7 @@ public function attributeBold($quill) * * @return void */ - public function attributeHeader($quill) + public function attributeHeader(array $quill) { if (in_array($quill['attributes'][OPTIONS::ATTRIBUTE_HEADER], array(1, 2, 3, 4, 5, 6, 7)) === true) { $insert = $this->deltas[count($this->deltas) - 1]->getInsert(); @@ -85,7 +85,7 @@ public function attributeHeader($quill) * * @return void */ - public function attributeItalic($quill) + public function attributeItalic(array $quill) { if ($quill['attributes'][OPTIONS::ATTRIBUTE_ITALIC] === true) { $this->deltas[] = new Italic($quill['insert']); @@ -100,7 +100,7 @@ public function attributeItalic($quill) * * @return void */ - public function attributeLink($quill) + public function attributeLink(array $quill) { if (strlen($quill['attributes'][OPTIONS::ATTRIBUTE_LINK]) > 0) { $this->deltas[] = new Link( @@ -118,7 +118,7 @@ public function attributeLink($quill) * * @return void */ - public function attributeList($quill) + public function attributeList(array $quill) { if (in_array($quill['attributes'][OPTIONS::ATTRIBUTE_LIST], array('ordered', 'bullet')) === true) { $insert = $this->deltas[count($this->deltas) - 1]->getInsert(); @@ -153,7 +153,7 @@ public function attributeList($quill) * * @return void */ - public function attributeScript($quill) + public function attributeScript(array $quill) { // Not applicable to this parser } @@ -166,7 +166,7 @@ public function attributeScript($quill) * * @return void */ - public function attributeStrike($quill) + public function attributeStrike(array $quill) { // Not applicable to this parser } @@ -179,7 +179,7 @@ public function attributeStrike($quill) * * @return void */ - public function attributeUnderline($quill) + public function attributeUnderline(array $quill) { // Not applicable to this parser } @@ -191,7 +191,7 @@ public function attributeUnderline($quill) * * @return void */ - public function insert($quill) + public function insert(array $quill) { $this->deltas[] = new Insert($quill['insert'], $quill['attributes']); } @@ -203,7 +203,7 @@ public function insert($quill) * * @return void */ - public function compoundInsert($quill) + public function compoundInsert(array $quill) { // Not applicable to this parser } @@ -215,7 +215,7 @@ public function compoundInsert($quill) * * @return void */ - public function image($quill) + public function image(array $quill) { $this->deltas[] = new Image($quill['insert']['image']); } @@ -228,7 +228,7 @@ public function image($quill) * * @return void */ - public function extendedInsert($quill) + public function extendedInsert(array $quill) { $this->deltas[] = new Insert($quill['insert']); }