@@ -1,3 +1,3 @@ |
||
| 1 | 1 | <?php |
| 2 | -require_once (dirname(dirname(__FILE__)) . '/blendmigrations.class.php'); |
|
| 2 | +require_once (dirname(dirname(__FILE__)).'/blendmigrations.class.php'); |
|
| 3 | 3 | class BlendMigrations_mysql extends BlendMigrations {} |
| 4 | 4 | \ No newline at end of file |
@@ -1,11 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -$xpdo_meta_map['BlendMigrations']= array ( |
|
| 2 | +$xpdo_meta_map['BlendMigrations'] = array( |
|
| 3 | 3 | 'package' => 'blend', |
| 4 | 4 | 'version' => '1.1', |
| 5 | 5 | 'table' => 'blend_migrations', |
| 6 | 6 | 'extends' => 'xPDOSimpleObject', |
| 7 | 7 | 'fields' => |
| 8 | - array ( |
|
| 8 | + array( |
|
| 9 | 9 | 'name' => NULL, |
| 10 | 10 | 'version' => NULL, |
| 11 | 11 | 'type' => 'master', |
@@ -16,23 +16,23 @@ discard block |
||
| 16 | 16 | 'processed_at' => NULL, |
| 17 | 17 | ), |
| 18 | 18 | 'fieldMeta' => |
| 19 | - array ( |
|
| 19 | + array( |
|
| 20 | 20 | 'name' => |
| 21 | - array ( |
|
| 21 | + array( |
|
| 22 | 22 | 'dbtype' => 'varchar', |
| 23 | 23 | 'precision' => '255', |
| 24 | 24 | 'phptype' => 'string', |
| 25 | 25 | 'null' => false, |
| 26 | 26 | ), |
| 27 | 27 | 'version' => |
| 28 | - array ( |
|
| 28 | + array( |
|
| 29 | 29 | 'dbtype' => 'varchar', |
| 30 | 30 | 'precision' => '32', |
| 31 | 31 | 'phptype' => 'string', |
| 32 | 32 | 'null' => true, |
| 33 | 33 | ), |
| 34 | 34 | 'type' => |
| 35 | - array ( |
|
| 35 | + array( |
|
| 36 | 36 | 'dbtype' => 'set', |
| 37 | 37 | 'precision' => '\'master\',\'stagging\',\'dev\',\'local\'', |
| 38 | 38 | 'phptype' => 'string', |
@@ -40,13 +40,13 @@ discard block |
||
| 40 | 40 | 'default' => 'master', |
| 41 | 41 | ), |
| 42 | 42 | 'description' => |
| 43 | - array ( |
|
| 43 | + array( |
|
| 44 | 44 | 'dbtype' => 'text', |
| 45 | 45 | 'phptype' => 'string', |
| 46 | 46 | 'null' => true, |
| 47 | 47 | ), |
| 48 | 48 | 'status' => |
| 49 | - array ( |
|
| 49 | + array( |
|
| 50 | 50 | 'dbtype' => 'varchar', |
| 51 | 51 | 'precision' => '16', |
| 52 | 52 | 'phptype' => 'string', |
@@ -54,21 +54,21 @@ discard block |
||
| 54 | 54 | 'default' => 'ready', |
| 55 | 55 | ), |
| 56 | 56 | 'author' => |
| 57 | - array ( |
|
| 57 | + array( |
|
| 58 | 58 | 'dbtype' => 'varchar', |
| 59 | 59 | 'precision' => '255', |
| 60 | 60 | 'phptype' => 'string', |
| 61 | 61 | 'null' => true, |
| 62 | 62 | ), |
| 63 | 63 | 'created_at' => |
| 64 | - array ( |
|
| 64 | + array( |
|
| 65 | 65 | 'dbtype' => 'timestamp', |
| 66 | 66 | 'phptype' => 'timestamp', |
| 67 | 67 | 'null' => false, |
| 68 | 68 | 'default' => 'CURRENT_TIMESTAMP', |
| 69 | 69 | ), |
| 70 | 70 | 'processed_at' => |
| 71 | - array ( |
|
| 71 | + array( |
|
| 72 | 72 | 'dbtype' => 'timestamp', |
| 73 | 73 | 'phptype' => 'timestamp', |
| 74 | 74 | 'null' => true, |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -$xpdo_meta_map = array ( |
|
| 3 | +$xpdo_meta_map = array( |
|
| 4 | 4 | 'xPDOSimpleObject' => |
| 5 | - array ( |
|
| 5 | + array( |
|
| 6 | 6 | 0 => 'BlendMigrations', |
| 7 | 7 | ), |
| 8 | 8 | ); |
| 9 | 9 | \ No newline at end of file |
@@ -6,13 +6,13 @@ discard block |
||
| 6 | 6 | class BlendMigrations extends \LCI\Blend\Model\xPDO\BlendMigrations |
| 7 | 7 | { |
| 8 | 8 | |
| 9 | - public static $metaMap = array ( |
|
| 9 | + public static $metaMap = array( |
|
| 10 | 10 | 'package' => 'LCI\\Blend\\Model\\xPDO', |
| 11 | 11 | 'version' => '3.0', |
| 12 | 12 | 'table' => 'blend_migrations', |
| 13 | 13 | 'extends' => 'xPDO\\Om\\xPDOSimpleObject', |
| 14 | 14 | 'fields' => |
| 15 | - array ( |
|
| 15 | + array( |
|
| 16 | 16 | 'name' => NULL, |
| 17 | 17 | 'version' => NULL, |
| 18 | 18 | 'type' => 'master', |
@@ -23,23 +23,23 @@ discard block |
||
| 23 | 23 | 'processed_at' => NULL, |
| 24 | 24 | ), |
| 25 | 25 | 'fieldMeta' => |
| 26 | - array ( |
|
| 26 | + array( |
|
| 27 | 27 | 'name' => |
| 28 | - array ( |
|
| 28 | + array( |
|
| 29 | 29 | 'dbtype' => 'varchar', |
| 30 | 30 | 'precision' => '255', |
| 31 | 31 | 'phptype' => 'string', |
| 32 | 32 | 'null' => false, |
| 33 | 33 | ), |
| 34 | 34 | 'version' => |
| 35 | - array ( |
|
| 35 | + array( |
|
| 36 | 36 | 'dbtype' => 'varchar', |
| 37 | 37 | 'precision' => '32', |
| 38 | 38 | 'phptype' => 'string', |
| 39 | 39 | 'null' => true, |
| 40 | 40 | ), |
| 41 | 41 | 'type' => |
| 42 | - array ( |
|
| 42 | + array( |
|
| 43 | 43 | 'dbtype' => 'set', |
| 44 | 44 | 'precision' => '\'master\',\'stagging\',\'dev\',\'local\'', |
| 45 | 45 | 'phptype' => 'string', |
@@ -47,13 +47,13 @@ discard block |
||
| 47 | 47 | 'default' => 'master', |
| 48 | 48 | ), |
| 49 | 49 | 'description' => |
| 50 | - array ( |
|
| 50 | + array( |
|
| 51 | 51 | 'dbtype' => 'text', |
| 52 | 52 | 'phptype' => 'string', |
| 53 | 53 | 'null' => true, |
| 54 | 54 | ), |
| 55 | 55 | 'status' => |
| 56 | - array ( |
|
| 56 | + array( |
|
| 57 | 57 | 'dbtype' => 'varchar', |
| 58 | 58 | 'precision' => '16', |
| 59 | 59 | 'phptype' => 'string', |
@@ -61,21 +61,21 @@ discard block |
||
| 61 | 61 | 'default' => 'ready', |
| 62 | 62 | ), |
| 63 | 63 | 'author' => |
| 64 | - array ( |
|
| 64 | + array( |
|
| 65 | 65 | 'dbtype' => 'varchar', |
| 66 | 66 | 'precision' => '255', |
| 67 | 67 | 'phptype' => 'string', |
| 68 | 68 | 'null' => true, |
| 69 | 69 | ), |
| 70 | 70 | 'created_at' => |
| 71 | - array ( |
|
| 71 | + array( |
|
| 72 | 72 | 'dbtype' => 'timestamp', |
| 73 | 73 | 'phptype' => 'timestamp', |
| 74 | 74 | 'null' => false, |
| 75 | 75 | 'default' => 'CURRENT_TIMESTAMP', |
| 76 | 76 | ), |
| 77 | 77 | 'processed_at' => |
| 78 | - array ( |
|
| 78 | + array( |
|
| 79 | 79 | 'dbtype' => 'timestamp', |
| 80 | 80 | 'phptype' => 'timestamp', |
| 81 | 81 | 'null' => true, |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | -$xpdo_meta_map = array ( |
|
| 2 | +$xpdo_meta_map = array( |
|
| 3 | 3 | 'version' => '3.0', |
| 4 | 4 | 'namespace' => 'LCI\\Blend\\Model\\xPDO', |
| 5 | 5 | 'class_map' => |
| 6 | - array ( |
|
| 6 | + array( |
|
| 7 | 7 | 'xPDO\\Om\\xPDOSimpleObject' => |
| 8 | - array ( |
|
| 8 | + array( |
|
| 9 | 9 | 0 => 'LCI\\Blend\\Model\\xPDO\\BlendMigrations', |
| 10 | 10 | ), |
| 11 | 11 | ), |
@@ -74,13 +74,13 @@ discard block |
||
| 74 | 74 | ); |
| 75 | 75 | |
| 76 | 76 | // Try to look for a file with the API Key from a file within the gitify working directory |
| 77 | - if (!empty($provider_data['api_key']) && file_exists(MODX_PATH . '/' . $provider_data['api_key'])) { |
|
| 78 | - $credentials['api_key'] = trim(file_get_contents(MODX_PATH . '/' . $provider_data['api_key'])); |
|
| 77 | + if (!empty($provider_data['api_key']) && file_exists(MODX_PATH.'/'.$provider_data['api_key'])) { |
|
| 78 | + $credentials['api_key'] = trim(file_get_contents(MODX_PATH.'/'.$provider_data['api_key'])); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | // load provider credentials from file |
| 82 | - if (!empty($provider_data['credential_file']) && file_exists(MODX_PATH . '/' . $provider_data['credential_file'])) { |
|
| 83 | - $credentials_content = trim(file_get_contents(MODX_PATH . '/' . $provider_data['credential_file'])); |
|
| 82 | + if (!empty($provider_data['credential_file']) && file_exists(MODX_PATH.'/'.$provider_data['credential_file'])) { |
|
| 83 | + $credentials_content = trim(file_get_contents(MODX_PATH.'/'.$provider_data['credential_file'])); |
|
| 84 | 84 | $credentials = Gitify::fromYAML($credentials_content); |
| 85 | 85 | } |
| 86 | 86 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | */ |
| 123 | 123 | private function install($package, $provider = 0, array $installOptions = array()) |
| 124 | 124 | { |
| 125 | - $this->modx->addPackage('modx.transport', MODX_CORE_PATH . 'model/'); |
|
| 125 | + $this->modx->addPackage('modx.transport', MODX_CORE_PATH.'model/'); |
|
| 126 | 126 | |
| 127 | 127 | if (!($provider instanceof \modTransportProvider) && is_numeric($provider) && $provider > 0) |
| 128 | 128 | { |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | */ |
| 163 | 163 | private function download($packageName, $provider, $options = array()) { |
| 164 | 164 | $this->modx->getVersionData(); |
| 165 | - $product_version = $this->modx->version['code_name'] . '-' . $this->modx->version['full_version']; |
|
| 165 | + $product_version = $this->modx->version['code_name'].'-'.$this->modx->version['full_version']; |
|
| 166 | 166 | |
| 167 | 167 | $response = $provider->verify(); |
| 168 | 168 | if ($response !== true) { |
@@ -189,13 +189,13 @@ discard block |
||
| 189 | 189 | // when we got a match (non 404), extract package information |
| 190 | 190 | if (!$response->isError()) { |
| 191 | 191 | |
| 192 | - $foundPkg = simplexml_load_string ( $response->response ); |
|
| 192 | + $foundPkg = simplexml_load_string($response->response); |
|
| 193 | 193 | |
| 194 | - $packages [strtolower((string) $foundPkg->name)] = array ( |
|
| 195 | - 'name' => (string) $foundPkg->name, |
|
| 196 | - 'version' => (string) $foundPkg->version, |
|
| 197 | - 'location' => (string) $foundPkg->location, |
|
| 198 | - 'signature' => (string) $foundPkg->signature |
|
| 194 | + $packages [strtolower((string)$foundPkg->name)] = array( |
|
| 195 | + 'name' => (string)$foundPkg->name, |
|
| 196 | + 'version' => (string)$foundPkg->version, |
|
| 197 | + 'location' => (string)$foundPkg->location, |
|
| 198 | + 'signature' => (string)$foundPkg->signature |
|
| 199 | 199 | ); |
| 200 | 200 | } |
| 201 | 201 | |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | // process found packages |
| 230 | 230 | if (!empty($packages)) { |
| 231 | 231 | |
| 232 | - $this->output->writeln('Found ' . count($packages) . ' package(s).'); |
|
| 232 | + $this->output->writeln('Found '.count($packages).' package(s).'); |
|
| 233 | 233 | |
| 234 | 234 | $helper = $this->getHelper('question'); |
| 235 | 235 | |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | $this->results[] = $message; |
| 119 | 119 | // now cache it: |
| 120 | 120 | |
| 121 | - $simpleCache = new SimpleCache(BLEND_CACHE_DIR . 'modx/'); |
|
| 121 | + $simpleCache = new SimpleCache(BLEND_CACHE_DIR.'modx/'); |
|
| 122 | 122 | $simpleCache->set($this->getSeedsDir().'-'.$this->method, $this->results); |
| 123 | 123 | } |
| 124 | 124 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | { |
| 130 | 130 | $key = 'install-config-v'.str_replace(['.', '-'], '_', $this->version).'_install'; |
| 131 | 131 | |
| 132 | - $simpleCache = new SimpleCache(BLEND_CACHE_DIR . 'modx/'); |
|
| 132 | + $simpleCache = new SimpleCache(BLEND_CACHE_DIR.'modx/'); |
|
| 133 | 133 | $this->install_config = $simpleCache->get($key); |
| 134 | 134 | } |
| 135 | 135 | |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | * @param mixed |
| 139 | 139 | * @return bool|mixed |
| 140 | 140 | */ |
| 141 | - protected function getUserInstallConfigValue($key, $default=false) |
|
| 141 | + protected function getUserInstallConfigValue($key, $default = false) |
|
| 142 | 142 | { |
| 143 | 143 | if (isset($this->install_config[$key])) { |
| 144 | 144 | return $this->install_config[$key]; |
@@ -152,6 +152,6 @@ discard block |
||
| 152 | 152 | */ |
| 153 | 153 | protected function loadCurrentVersionInfo() |
| 154 | 154 | { |
| 155 | - $this->current_version = include MODX_CORE_PATH . 'docs/version.inc.php'; |
|
| 155 | + $this->current_version = include MODX_CORE_PATH.'docs/version.inc.php'; |
|
| 156 | 156 | } |
| 157 | 157 | } |
| 158 | 158 | \ No newline at end of file |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | $this->modx->cacheManager->refresh(); |
| 58 | 58 | |
| 59 | 59 | $previous_version = $this->modx->getOption('blend.version'); |
| 60 | - if (!$previous_version || version_compare($this->getVersion(), $previous_version, '>') ) { |
|
| 60 | + if (!$previous_version || version_compare($this->getVersion(), $previous_version, '>')) { |
|
| 61 | 61 | |
| 62 | 62 | /** @var \xPDOManager $manager */ |
| 63 | 63 | $manager = $this->modx->getManager(); |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | $event = $this->modx->newObject('modEvent'); |
| 138 | 138 | $event->set('name', $event_name); |
| 139 | 139 | $event->set('service', 1); |
| 140 | - $event->set('groupname', 'Resources');// ?? |
|
| 140 | + $event->set('groupname', 'Resources'); // ?? |
|
| 141 | 141 | |
| 142 | 142 | if ($event->save()) { |
| 143 | 143 | $this->blender->out($event_name.' event has been installed'); |
@@ -156,12 +156,12 @@ discard block |
||
| 156 | 156 | $event = $this->modx->getObject('modEvent', ['name' => $event_name]); |
| 157 | 157 | if (is_object($event)) { |
| 158 | 158 | if ($event->remove()) { |
| 159 | - $this->blender->out($event_name . ' event was removed', true); |
|
| 159 | + $this->blender->out($event_name.' event was removed', true); |
|
| 160 | 160 | } else { |
| 161 | - $this->blender->out($event_name . ' event was not removed', true); |
|
| 161 | + $this->blender->out($event_name.' event was not removed', true); |
|
| 162 | 162 | } |
| 163 | 163 | } else { |
| 164 | - $this->blender->out($event_name . ' event has already been removed', true); |
|
| 164 | + $this->blender->out($event_name.' event has already been removed', true); |
|
| 165 | 165 | } |
| 166 | 166 | } |
| 167 | 167 | |